public interface ToolbarItem
ToolbarItem
is an item that is shown as part of a toolbar. ToolbarItem
s must
be wrapped into a ToolbarItemDockable
to be shown.Modifier and Type | Method and Description |
---|---|
void |
addMouseInputListener(javax.swing.event.MouseInputListener listener)
Urges this item to add
listener to its component . |
void |
bind()
Informs this item that it is now in use, the result of
getComponent() must not be null
and must not change after this method has been called. |
java.awt.Component |
getComponent()
Gets the
Component which is wrapped by this item. |
void |
removeMouseInputListener(javax.swing.event.MouseInputListener listener)
Urges this item to remove
listener from its component . |
void |
setController(bibliothek.gui.DockController controller)
Informs this item about the
DockController in whose realm it is used. |
void |
setDockable(ToolbarItemDockable dockable)
Informs this item about the
Dockable that is using it. |
void |
setOrientation(Orientation orientation)
Tells this item the orientation of the toolbar
|
void |
setSelected(boolean selected)
Informs this item whether it is actually shown or not.
|
void |
unbind()
Informs this item that it is no longer in use, the result of
getComponent() can be null
or change after this method has been called. |
java.awt.Component getComponent()
Component
which is wrapped by this item. The result of this method must not be
null
after bind()
has been called, it may not change until unbind()
was called.Component
, can be null
unless bind()
was calledvoid bind()
getComponent()
must not be null
and must not change after this method has been called.void unbind()
getComponent()
can be null
or change after this method has been called.void setOrientation(Orientation orientation)
orientation
- the orientation of the toolbarvoid setSelected(boolean selected)
selected
- true
if the item is shownvoid setController(bibliothek.gui.DockController controller)
DockController
in whose realm it is used. This method will always
be called before bind()
, or after unbind()
, is executed.controller
- the controller in whose realm this item works, can be null
void setDockable(ToolbarItemDockable dockable)
Dockable
that is using it.dockable
- the owner of this itemvoid addMouseInputListener(javax.swing.event.MouseInputListener listener)
listener
to its component
. This method
must only be called if bind()
was executed.listener
- the MouseListener
and MouseMotionListener
that should be addedvoid removeMouseInputListener(javax.swing.event.MouseInputListener listener)
listener
from its component
. This method
must only be called if bind()
was executed.listener
- the MouseListener
and MouseMotionListener
that should be removed