Package bibliothek.gui.dock.facile.menu
Class FrontendSettingsMenuPiece
java.lang.Object
bibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.facile.menu.NodeMenuPiece
bibliothek.gui.dock.facile.menu.FrontendSettingsMenuPiece
- Direct Known Subclasses:
CLayoutChoiceMenuPiece
A piece of a menu that allows to save, load and delete settings
from a
DockFrontend.- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionFrontendSettingsMenuPiece(DockFrontend frontend, boolean loadAsSubmenu) Creates a new piece. -
Method Summary
Modifier and TypeMethodDescriptionvoidbind()This method is called if there is a possibility for the user to see this menu.Gets the frontend which might be modified by this menu.voidSaves the current setting.voidSaves the current setting under a new name.voidsetFrontend(DockFrontend frontend) Sets the frontend which might be modified by this menu.voidunbind()This method is called if the user has no longer any possibility to see this menu.Methods inherited from class bibliothek.gui.dock.facile.menu.NodeMenuPiece
add, fill, getChild, getChildrenCount, getItemCount, insert, remove, removeMethods inherited from class bibliothek.gui.dock.support.menu.MenuPiece
addListener, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent
-
Constructor Details
-
FrontendSettingsMenuPiece
Creates a new piece.- Parameters:
frontend- the frontend which might be modified by this piece, can benullloadAsSubmenu- whether the list of loadable settings should be in a submenu
-
-
Method Details
-
getFrontend
Gets the frontend which might be modified by this menu.- Returns:
- the frontend, an be
null
-
setFrontend
Sets the frontend which might be modified by this menu.- Parameters:
frontend- the frontend, 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.- Overrides:
bindin classNodeMenuPiece- See Also:
-
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.- Overrides:
unbindin classNodeMenuPiece- See Also:
-
save
Saves the current setting.- Parameters:
owner- the component which should be used as owner of any necessary dialog
-
saveAs
Saves the current setting under a new name.- Parameters:
owner- which should be used as owner of any necessary dialog
-