|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.support.menu.BaseMenuPiece
public class BaseMenuPiece
A very simple piece, subclasses can add or remove items from this piece at any time.
| Constructor Summary | |
|---|---|
BaseMenuPiece()
|
|
| Method Summary | |
|---|---|
protected void |
add(Component item)
Adds item at the end of this piece. |
protected void |
addSeparator()
Adds a separator at the end of this piece. |
void |
fill(List<Component> items)
Inserts all items of this piece into items. |
protected Component |
getItem(int index)
Gets the index'th item of this piece. |
int |
getItemCount()
Gets the number of items this MenuPiece added to its menu. |
protected void |
insert(int index,
Component item)
Inserts a new item into the menu. |
protected void |
insertSeparator(int index)
Inserts a separator into this piece. |
protected void |
remove(Component item)
Removes item from the menu. |
protected void |
remove(int index)
Removes the index'th item of this piece. |
protected void |
removeAll()
Removes all items of this piece. |
| Methods inherited from class bibliothek.gui.dock.support.menu.MenuPiece |
|---|
addListener, fireInsert, fireRemove, getMenu, getParent, items, removeListener, setParent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BaseMenuPiece()
| Method Detail |
|---|
public void fill(List<Component> items)
MenuPieceitems.
fill in class MenuPieceitems - the list which has to be filled in the same order as the items
will appear on the menupublic int getItemCount()
MenuPieceMenuPiece added to its menu.
getItemCount in class MenuPieceprotected Component getItem(int index)
index - the location of the item
protected void addSeparator()
protected void insertSeparator(int index)
index - the location of the separator
protected void insert(int index,
Component item)
index - the location of the new item, measured in the coordinate
space of this piece.item - the new item.protected void add(Component item)
item at the end of this piece.
item - the item to add.protected void remove(Component item)
item from the menu.
item - the item to removeprotected void remove(int index)
index - the location of the item to remove.protected void removeAll()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||