Package bibliothek.gui.dock.facile.menu
Class FreeMenuPiece
java.lang.Object
bibliothek.gui.dock.support.menu.MenuPiece
bibliothek.gui.dock.support.menu.BaseMenuPiece
bibliothek.gui.dock.facile.menu.FreeMenuPiece
A
MenuPiece that does not add any children by itself. All items
have to be added or removed directly by the client.- Author:
- Benjamin Sigg
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAddsitemat the end of this piece.voidAdds a separator at the end of this piece.getItem(int index) Gets the index'th item of this piece.intvoidInserts a new item into the menu.voidinsertSeparator(int index) Inserts a separator into this piece.voidremove(int index) Removes the index'th item of this piece.voidRemovesitemfrom the menu.Methods inherited from class bibliothek.gui.dock.support.menu.BaseMenuPiece
fill, removeAllMethods inherited from class bibliothek.gui.dock.support.menu.MenuPiece
addListener, bind, fireInsert, fireRemove, getMenu, getParent, isBound, items, removeListener, setParent, unbind
-
Constructor Details
-
FreeMenuPiece
public FreeMenuPiece()
-
-
Method Details
-
getItemCount
public int getItemCount()Description copied from class:MenuPiece- Overrides:
getItemCountin classBaseMenuPiece- Returns:
- the number of items
-
getItem
Description copied from class:BaseMenuPieceGets the index'th item of this piece.- Overrides:
getItemin classBaseMenuPiece- Parameters:
index- the location of the item- Returns:
- the item
-
add
Description copied from class:BaseMenuPieceAddsitemat the end of this piece.- Overrides:
addin classBaseMenuPiece- Parameters:
item- the item to add.
-
addSeparator
public void addSeparator()Description copied from class:BaseMenuPieceAdds a separator at the end of this piece.- Overrides:
addSeparatorin classBaseMenuPiece
-
insert
Description copied from class:BaseMenuPieceInserts a new item into the menu.- Overrides:
insertin classBaseMenuPiece- Parameters:
index- the location of the new item, measured in the coordinate space of this piece.item- the new item.
-
insertSeparator
public void insertSeparator(int index) Description copied from class:BaseMenuPieceInserts a separator into this piece.- Overrides:
insertSeparatorin classBaseMenuPiece- Parameters:
index- the location of the separator
-
remove
public void remove(int index) Description copied from class:BaseMenuPieceRemoves the index'th item of this piece.- Overrides:
removein classBaseMenuPiece- Parameters:
index- the location of the item to remove.
-
remove
Description copied from class:BaseMenuPieceRemovesitemfrom the menu.- Overrides:
removein classBaseMenuPiece- Parameters:
item- the item to remove
-