public class EagerCustomizationToolbarButton extends CustomizationToolbarButton
CustomizationToolbarButton
which uses an already existing
Dockable
to gain access to icon and description.CustomizationToolbarButton.ItemLocation
Constructor and Description |
---|
EagerCustomizationToolbarButton(bibliothek.gui.Dockable dockable)
Creates a new button, a
DockableListener is added to
dockable to read icon and description. |
Modifier and Type | Method and Description |
---|---|
void |
bind(CustomizationMenuCallback callback)
Informs this item that is going to be used.
|
protected bibliothek.gui.Dockable |
getDockable()
Gets the element that is put onto a toolbar.
|
protected boolean |
hasDockable()
Tells whether the
Dockable of this button, accessible by calling
CustomizationToolbarButton.getDockable() , is already present. |
void |
unbind()
Informs this item that it is no longer used.
|
getItemLocation, getView, setController, setDescription, setIcon, setItemVisible, setText
public EagerCustomizationToolbarButton(bibliothek.gui.Dockable dockable)
DockableListener
is added to
dockable
to read icon and description.dockable
- the item represented by this buttonprotected boolean hasDockable()
CustomizationToolbarButton
Dockable
of this button, accessible by calling
CustomizationToolbarButton.getDockable()
, is already present. If the item is not yet
present, then it cannot be visible or selected at this time.hasDockable
in class CustomizationToolbarButton
Dockable
already existsprotected bibliothek.gui.Dockable getDockable()
CustomizationToolbarButton
Dockable
lazily in the very moment it is used the first time.getDockable
in class CustomizationToolbarButton
public void bind(CustomizationMenuCallback callback)
CustomizationMenuContent
bind
in interface CustomizationMenuContent
bind
in class CustomizationToolbarButton
callback
- access to more detailed information about the DockStation
that is
showing the menupublic void unbind()
CustomizationMenuContent
#bind()
.unbind
in interface CustomizationMenuContent
unbind
in class CustomizationToolbarButton