public class NodeMenuPiece extends MenuPiece
Constructor and Description |
---|
NodeMenuPiece() |
Modifier and Type | Method and Description |
---|---|
void |
add(MenuPiece piece)
Adds a new child to the end of this piece.
|
void |
bind()
This method is called if there is a possibility for the user to see this menu.
|
void |
fill(List<Component> items)
Inserts all items of this piece into
items . |
MenuPiece |
getChild(int index)
Gets the index'th child of this piece.
|
int |
getChildrenCount()
Gets the number of children this piece has.
|
int |
getItemCount()
|
void |
insert(int index,
MenuPiece piece)
Inserts a new child in this piece.
|
void |
remove(int index)
Removes a child from this piece.
|
void |
remove(MenuPiece piece)
Removes a child from this piece.
|
void |
unbind()
This method is called if the user has no longer any possibility to see this menu.
|
addListener, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent
public void add(MenuPiece piece)
piece
- the new childpublic void insert(int index, MenuPiece piece)
index
- the location of the childpiece
- the new childpublic void remove(MenuPiece piece)
piece
- the child to removepublic void remove(int index)
index
- the index of the childpublic int getChildrenCount()
public MenuPiece getChild(int index)
index
- the location of the childpublic void fill(List<Component> items)
MenuPiece
items
.public int getItemCount()
MenuPiece
getItemCount
in class MenuPiece
public void bind()
MenuPiece
bind
in class MenuPiece
MenuPiece.unbind()
public void unbind()
MenuPiece
unbind
in class MenuPiece
MenuPiece.bind()