Package bibliothek.gui.dock.facile.menu
Class NodeMenuPiece
java.lang.Object
bibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.facile.menu.NodeMenuPiece
- Direct Known Subclasses:
FrontendSettingsMenuPiece,RootMenuPiece
A piece which uses a set of other pieces to create a composite.
- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a new child to the end of this piece.voidbind()This method is called if there is a possibility for the user to see this menu.voidInserts all items of this piece intoitems.getChild(int index) Gets the index'th child of this piece.intGets the number of children this piece has.intvoidInserts a new child in this piece.voidremove(int index) Removes a child from this piece.voidRemoves a child from this piece.voidunbind()This method is called if the user has no longer any possibility to see this menu.Methods inherited from class bibliothek.gui.dock.support.menu.MenuPiece
addListener, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent
-
Constructor Details
-
NodeMenuPiece
public NodeMenuPiece()
-
-
Method Details
-
remove
public void remove(int index) Removes a child from this piece.- Parameters:
index- the index of the child
-
getChildrenCount
public int getChildrenCount()Gets the number of children this piece has.- Returns:
- the number of children
-
getChild
Gets the index'th child of this piece.- Parameters:
index- the location of the child- Returns:
- the child
-
fill
Description copied from class:MenuPieceInserts all items of this piece intoitems. -
getItemCount
public int getItemCount()Description copied from class:MenuPiece- Specified by:
getItemCountin classMenuPiece- Returns:
- the number of items
-
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.