|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectbibliothek.gui.dock.station.toolbar.menu.CustomizationToolbarButton
public abstract class CustomizationToolbarButton
The CustomizationToolbarButton is a button that allows to add one
Dockable to a DockStation. This button also offers an
indication telling whether the Dockable is already shown on another
station.
| Nested Class Summary | |
|---|---|
static class |
CustomizationToolbarButton.ItemLocation
The different locations where a Dockable can be in respect to
this button |
| Constructor Summary | |
|---|---|
CustomizationToolbarButton()
|
|
| Method Summary | |
|---|---|
void |
bind(CustomizationMenuCallback callback)
Informs this item that is going to be used. |
protected abstract bibliothek.gui.Dockable |
getDockable()
Gets the element that is put onto a toolbar. |
protected CustomizationToolbarButton.ItemLocation |
getItemLocation()
Gets the current location of the Dockable that is described by
this button. |
Component |
getView()
Gets a Component which represents this item. |
protected abstract boolean |
hasDockable()
Tells whether the Dockable of this button, accessible by calling
getDockable(), is already present. |
void |
setController(bibliothek.gui.DockController controller)
Informs this content about the DockController in whose realm it is used. |
void |
setDescription(String description)
Sets a text which describes the meaning of the button. |
void |
setIcon(Icon icon)
Sets the icon which should be shown on the button. |
protected void |
setItemVisible(boolean visible)
Removes the Dockable from its current parent and maybe appends it
to the owner of this button. |
void |
setText(String text)
Sets the text which should be shown on the button. |
void |
unbind()
Informs this item that it is no longer used. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CustomizationToolbarButton()
| Method Detail |
|---|
public void setController(bibliothek.gui.DockController controller)
CustomizationMenuContentDockController in whose realm it is used.
setController in interface CustomizationMenuContentcontroller - the controller, can be nullpublic Component getView()
CustomizationMenuContentComponent which represents this item. If #bind() has not yet
been called, or CustomizationMenuContent.unbind() has been called, then a result of null is valid.
getView in interface CustomizationMenuContentnull if this item is not bound.public void bind(CustomizationMenuCallback callback)
CustomizationMenuContent
bind in interface CustomizationMenuContentcallback - access to more detailed information about the DockStation that is
showing the menuprotected CustomizationToolbarButton.ItemLocation getItemLocation()
Dockable that is described by
this button.
IllegalStateExceptione - if bind(CustomizationMenuCallback) was not calledprotected void setItemVisible(boolean visible)
Dockable from its current parent and maybe appends it
to the owner of this button.
visible - whether the item should be visible or notpublic void unbind()
CustomizationMenuContent#bind().
unbind in interface CustomizationMenuContentpublic void setIcon(Icon icon)
icon - the new icon, can be nullpublic void setText(String text)
icon - the new text, can be nullpublic void setDescription(String description)
description - the description, can be nullprotected abstract boolean hasDockable()
Dockable of this button, accessible by calling
getDockable(), is already present. If the item is not yet
present, then it cannot be visible or selected at this time.
Dockable already existsprotected abstract bibliothek.gui.Dockable getDockable()
Dockable lazily in the very moment it is used the first time.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||