|
||||||||||
| 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.facile.menu.SubmenuPiece
public class SubmenuPiece
A MenuPiece which consists only of one JMenu. There is a
new subtree attached to this SubmenuPiece.
| Constructor Summary | |
|---|---|
SubmenuPiece()
Creates a new submenu-piece, using a normal JMenu to inserts
its content. |
|
SubmenuPiece(JMenu menu)
Creates a new submenu-piece. |
|
SubmenuPiece(String text,
boolean disableWhenEmpty,
MenuPiece... pieces)
Creates a new submenu-piece, using a normal JMenu. |
|
| Method Summary | |
|---|---|
void |
fill(List<Component> items)
Inserts all items of this piece into items. |
int |
getItemCount()
Gets the number of items this MenuPiece added to its menu. |
JMenu |
getMenu()
Gets the menu into which this MenuPiece adds its items. |
RootMenuPiece |
getRoot()
Gets the root of this subtree. |
boolean |
isDisableWhenEmpty()
Whether to disable the menu when it is empty or not. |
void |
setDisableWhenEmpty(boolean disableWhenEmpty)
Disables the menu if there are no items in the menu. |
| Methods inherited from class bibliothek.gui.dock.support.menu.MenuPiece |
|---|
addListener, fireInsert, fireRemove, 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 SubmenuPiece()
JMenu to inserts
its content.
public SubmenuPiece(String text,
boolean disableWhenEmpty,
MenuPiece... pieces)
JMenu.
text - the text of the menudisableWhenEmpty - whether to disable the menu when it is emptypieces - the elements of this piecepublic SubmenuPiece(JMenu menu)
menu - the menu into which this piece will insert its content| 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 MenuPiecepublic void setDisableWhenEmpty(boolean disableWhenEmpty)
disableWhenEmpty - true if the menu should be
disabled when emptypublic boolean isDisableWhenEmpty()
true if the menu gets disabledpublic JMenu getMenu()
MenuPieceMenuPiece adds its items.
getMenu in class MenuPiecepublic RootMenuPiece getRoot()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||