|
||||||||||
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.BaseMenuPiece bibliothek.gui.dock.facile.menu.CloseableDockableMenuPiece
public class CloseableDockableMenuPiece
A piece of a menu allowing to close or reopen some Dockable
s that
are registered in a DockFrontend
.
Nested Class Summary | |
---|---|
protected class |
CloseableDockableMenuPiece.Item
An item showing the visibility state of one Dockable . |
Constructor Summary | |
---|---|
CloseableDockableMenuPiece()
Creates a new piece |
|
CloseableDockableMenuPiece(DockFrontend frontend)
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 |
check(Dockable dockable)
Ensures that dockable has an item if it is included ,
and does not have otherwise. |
protected CloseableDockableMenuPiece.Item |
create(Dockable dockable)
Creates a new item for the menu. |
DockFrontend |
getFrontend()
Gets the frontend which is observed by this piece. |
protected void |
hide(Dockable dockable)
Ensures that dockable is not visible. |
protected boolean |
include(Dockable dockable)
Tells whether an item should be inserted into the menu for the given dockable or not. |
protected void |
insert(CloseableDockableMenuPiece.Item item)
Adds an earlier created item into the menu, subclasses might override this method to add the item at a different location. |
void |
setFrontend(DockFrontend frontend)
Sets the frontend which will be observed by this piece. |
protected void |
show(Dockable dockable)
Ensures that dockable is visible. |
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.BaseMenuPiece |
---|
add, addSeparator, fill, getItem, getItemCount, insert, insertSeparator, remove, remove, removeAll |
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 CloseableDockableMenuPiece()
public CloseableDockableMenuPiece(DockFrontend frontend)
frontend
- the list of Dockable
s, can be null
Method Detail |
---|
public DockFrontend getFrontend()
null
setFrontend(DockFrontend)
public void setFrontend(DockFrontend frontend)
Dockable
that is registered at the frontend
will
get an item in the menu of this piece.
frontend
- the list of Dockable
s, can be null
public void bind()
MenuPiece
bind
in class MenuPiece
MenuPiece.unbind()
public void unbind()
MenuPiece
unbind
in class MenuPiece
MenuPiece.bind()
protected CloseableDockableMenuPiece.Item create(Dockable dockable)
dockable
- the element which will be shown/hidden when the user
clicks onto the item.
protected void insert(CloseableDockableMenuPiece.Item item)
item
- the item to insertprotected void show(Dockable dockable)
dockable
is visible.
dockable
- the element to showprotected void hide(Dockable dockable)
dockable
is not visible.
dockable
- the element to hideprotected boolean include(Dockable dockable)
dockable
or not.
dockable
- the element to check
true
if there should be an item added to the menupublic void check(Dockable dockable)
dockable
has an item if it is included
,
and does not have otherwise.
dockable
- the element whose item is to be checked
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |