Class WindowMenu

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, MenuElement, SwingConstants

public class WindowMenu extends JMenu
A JMenu that lists available windows and provides a dialog for selecting them. A list of open windows is provided at the bottom of the menu. All of the WindowArranger code needs to un-maximize the windows to prevent some odd bugs that occur when multiple maximized internal frames are present.
WindowMenu

Typical usage:

        final EnhancedDesktopPane desktop = getDesktop();
        final WindowMenu menu = new WindowMenu();
        menu.setDesktop(desktop);
        menu.setWindowListModel(desktop.getListModel());
 
TODO: Ctrl-[Shift-]Tab
See Also:
  • Field Details

    • DEFAULT_INSERTION_INDEX

      public static final int DEFAULT_INSERTION_INDEX
      Index at which to insert new menu items (if so desired). If additional menu items are required, they should generally be located after the window arrangement items but before all other items.
      See Also:
  • Constructor Details

  • Method Details

    • getDesktop

      public JDesktopPane getDesktop()
      Desktop pane associated with menu.
    • getWindowCascadeAction

      public CascadeWindowAction getWindowCascadeAction()
    • getWindowTileHorizontallyAction

      public TileHorizontallyWindowAction getWindowTileHorizontallyAction()
    • getWindowTileVerticallyAction

      public TileVerticallyWindowAction getWindowTileVerticallyAction()
    • getLaunchWindowDialogAction

      public LaunchWindowDialogWindowAction getLaunchWindowDialogAction()
    • getWindowListDialog

      public WindowListBoxDialog<?> getWindowListDialog()
    • selectFrame

      public static void selectFrame(JInternalFrame pFrame)
      Grant focus to the argument frame.
    • getFrameName

      protected String getFrameName(JInternalFrame pFrame)
    • add

      public final JMenuItem add(Action pAction)
      Adjusts internal indices after calling super implementation.
      Overrides:
      add in class JMenu
    • add

      public final Component add(Component pComponent)
      Adjusts internal indices after calling super implementation.
      Overrides:
      add in class JMenu
    • add

      public final Component add(Component pComponent, int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      add in class JMenu
    • add

      public final JMenuItem add(JMenuItem pMenuItem)
      Adjusts internal indices after calling super implementation.
      Overrides:
      add in class JMenu
    • add

      public final JMenuItem add(String pStr)
      Adjusts internal indices after calling super implementation.
      Overrides:
      add in class JMenu
    • addSeparator

      public void addSeparator()
      Adjusts internal indices after calling super implementation.
      Overrides:
      addSeparator in class JMenu
    • insert

      public final JMenuItem insert(Action pAction, int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      insert in class JMenu
    • insert

      public final JMenuItem insert(JMenuItem pMenuItem, int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      insert in class JMenu
    • insert

      public final void insert(String pStr, int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      insert in class JMenu
    • insertSeparator

      public void insertSeparator(int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      insertSeparator in class JMenu
    • remove

      public final void remove(Component pComponent)
      Adjusts internal indices after calling super implementation.
      Overrides:
      remove in class JMenu
    • remove

      public final void remove(JMenuItem pItem)
      Adjusts internal indices after calling super implementation.
      Overrides:
      remove in class JMenu
    • remove

      public final void remove(int pIdx)
      Adjusts internal indices after calling super implementation.
      Overrides:
      remove in class JMenu