Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #3591

Dynamic Components, Focus

From "ram" <ram@THRWHITE.remove-dii-this>
Subject Dynamic Components, Focus
Message-ID <menus-20080601183307@ram.dialup.fu-berlin.de> (permalink)
Newsgroups comp.lang.java.gui
Date 2011-04-27 15:45 +0000
Organization TDS.net

Show all headers | View raw


  To: comp.lang.java.gui
  I would like to build a Swing-GUI application, and I imagine
  dynamic components with menus.

  It is important to me that the whole application can easily be
  operated solely via keyboard.

  One should be able to add a component to a Swing container at
  run-time.

  When this component has gained focus, I want to append its
  menu to the outer JFrame's menu bar. When it loses focus, its
  menu shall be removed. When a subcomponent gains focus, its
  menu shall be appended to the menu of the component.

  So by moving the focus, the user can access the menus of the
  components via the applications main menu bar.

  When the upper component and its left subcomponent has the
  focus, the window shall look as follows.

  .------------------------------------------------------------.
  | Main Menu   Upper Components Menu     Left Components Menu |
  |                                                            |
  | ########################################################## |  
  | #                                                        # |
  | #  ########################  ++++++++++++++++++++++++++  # |
  | #  #                      #  +                        +  # |
  | #  #                      #  +                        +  # |
  | #  #                      #  +                        +  # |
  | #  #                      #  +                        +  # |
  | #  #                      #  +                        +  # |
  | #  ########################  ++++++++++++++++++++++++++  # |
  | #                                                        # |
  | ########################################################## |  
  |                                                            |
  | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
  | +                                                        + |
  | +                                                        + |
  | +                                                        + |
  | +                                                        + |
  | ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
  |                                                            |
  '------------------------------------------------------------'

  Because focus is so important to this concept of operation, I
  would like some prominent way to highlight components who owns
  the focus: Whenever a component obtains the focus the color of
  its fat border should change.

  When thinking about it, this architecture seems quite natural
  to me, but I am not aware of programs actually built like this.

  Has someone already seen or built a Swing application, whose
  content pane consists of several (possibly nested) components,
  with clearly visible focus indicators and a menu bar adapting
  to focus changes, possibly with a prominent focus indicator,
  so that I can look at it to get some ideas for the implementation.

  Or are there any comments or criticism?

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

Back to comp.lang.java.gui | Previous | Next | Find similar | Unroll thread


Thread

Dynamic Components, Focus "ram" <ram@THRWHITE.remove-dii-this> - 2011-04-27 15:45 +0000

csiph-web