|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object bibliothek.gui.dock.support.menu.MenuPiece bibliothek.gui.dock.support.menu.SeparatingMenuPiece
public class SeparatingMenuPiece
A piece which envelops another piece with separators.
Constructor Summary | |
---|---|
SeparatingMenuPiece()
Creates a new piece |
|
SeparatingMenuPiece(boolean topSeparator,
boolean emptySeparator,
boolean bottomSeparator)
Creates a new piece |
|
SeparatingMenuPiece(MenuPiece piece)
Creates a new piece |
|
SeparatingMenuPiece(MenuPiece piece,
boolean topSeparator,
boolean emptySeparator,
boolean bottomSeparator)
Creates a new piece |
Method Summary | |
---|---|
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 . |
int |
getItemCount()
Gets the number of items this MenuPiece added to its menu . |
MenuPiece |
getPiece()
Gets the piece which is embraced by separators. |
protected int |
getSeparatorCount()
Gets the number of separators which were added by this piece. |
boolean |
isBottomSeparator()
Tells whether there is a separator below this piece. |
boolean |
isEmptySeparator()
Tells whether there should be a single separator shown when this piece is empty. |
boolean |
isTopSeparator()
Tells whether there is a separator shown above the content of this piece. |
void |
setBottomSeparator(boolean bottomSeparator)
Sets whether there should be a separator added to the menu after the contents described in this piece. |
void |
setEmptySeparator(boolean emptySeparator)
Sets whether there should be a separator shown when this piece is empty. |
void |
setPiece(MenuPiece piece)
Sets the piece which will be embraced by separators. |
void |
setTopSeparator(boolean topSeparator)
Sets whether there should be a separator shown above the content of this piece. |
void |
unbind()
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SeparatingMenuPiece()
public SeparatingMenuPiece(boolean topSeparator, boolean emptySeparator, boolean bottomSeparator)
topSeparator
- whether to show a separator at the topemptySeparator
- whether to show a separator if piece
is emptybottomSeparator
- whether to show a separator at the bottompublic SeparatingMenuPiece(MenuPiece piece)
piece
- the piece which might be covered by separatorspublic SeparatingMenuPiece(MenuPiece piece, boolean topSeparator, boolean emptySeparator, boolean bottomSeparator)
piece
- the piece which might be covered by separatorstopSeparator
- whether to show a separator at the topemptySeparator
- whether to show a separator if piece
is emptybottomSeparator
- whether to show a separator at the bottomMethod Detail |
---|
public MenuPiece getPiece()
public void bind()
MenuPiece
bind
in class MenuPiece
MenuPiece.unbind()
public void unbind()
MenuPiece
unbind
in class MenuPiece
MenuPiece.bind()
public void setPiece(MenuPiece piece)
piece
- the child of this piecepublic int getItemCount()
MenuPiece
MenuPiece
added to its menu
.
getItemCount
in class MenuPiece
public void fill(List<Component> items)
MenuPiece
items
.
fill
in class MenuPiece
items
- the list which has to be filled in the same order as the items
will appear on the menuprotected int getSeparatorCount()
public boolean isBottomSeparator()
true
if there is a separatorsetBottomSeparator(boolean)
public void setBottomSeparator(boolean bottomSeparator)
bottomSeparator
- true
if there should be a separatorpublic boolean isEmptySeparator()
true
if there is a separatorpublic void setEmptySeparator(boolean emptySeparator)
emptySeparator
- true
if a separator should be
made visiblepublic boolean isTopSeparator()
true
if there is a separatorpublic void setTopSeparator(boolean topSeparator)
topSeparator
- true
if the separator should be shown
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |