Package bibliothek.gui.dock.support.menu
Class FrontendSettingsList
java.lang.Object
bibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.support.menu.BaseMenuPiece
bibliothek.gui.dock.support.menu.FrontendSettingsList
- Direct Known Subclasses:
FrontendSettingsDeleteList,FrontendSettingsLoadList
A list of settings (=layouts or perspectives) that are available for a
DockFrontend.
The list contains the elements of DockFrontend.getSettings().- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidCalled when the user clicks on an item of this list.voidbind()This method is called if there is a possibility for the user to see this menu.Gets the frontend which is currently observedprotected intpreferredIndex(String name) voidsetFrontend(DockFrontend frontend) Changes the frontend which is observed by this list.voidunbind()This method is called if the user has no longer any possibility to see this menu.voidUpdates the selection state of theJRadioButtonMenuItems that are used on this menu.Methods inherited from class bibliothek.gui.dock.support.menu.BaseMenuPiece
add, addSeparator, fill, getItem, getItemCount, insert, insertSeparator, remove, remove, removeAllMethods inherited from class bibliothek.gui.dock.support.menu.MenuPiece
addListener, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent
-
Constructor Details
-
FrontendSettingsList
Creates a new list.- Parameters:
frontend- the frontend to observe, can benull
-
-
Method Details
-
getFrontend
Gets the frontend which is currently observed- Returns:
- the frontend or
null
-
setFrontend
Changes the frontend which is observed by this list. The list will always show one item for each setting that can be found inDockFrontend.getSettings().- Parameters:
frontend- the frontend to observe, can benull
-
bind
public void bind()Description copied from class:MenuPieceThis method is called if there is a possibility for the user to see this menu. The menu should register listeners, update its text etc. to be ready for that event. This method must never be called twice in a row. -
unbind
public void unbind()Description copied from class:MenuPieceThis method is called if the user has no longer any possibility to see this menu. The menu should unregister its listeners. This method must never be called twice in a row. -
action
Called when the user clicks on an item of this list.- Parameters:
name- the name of the item
-
preferredIndex
-
updateSelection
public void updateSelection()Updates the selection state of theJRadioButtonMenuItems that are used on this menu. Only the one item representing the current layout of theDockFrontendis selected.
-