public interface ToolbarItem
ToolbarItem is an item that is shown as part of a toolbar. ToolbarItems must
be wrapped into a ToolbarItemDockable to be shown.| Modifier and Type | Method and Description |
|---|---|
void |
addMouseInputListener(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. |
Component |
getComponent()
Gets the
Component which is wrapped by this item. |
void |
removeMouseInputListener(MouseInputListener listener)
Urges this item to remove
listener from its component. |
void |
setController(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. |
Component getComponent()
void 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(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 nullvoid setDockable(ToolbarItemDockable dockable)
Dockable that is using it.dockable - the owner of this itemvoid addMouseInputListener(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(MouseInputListener listener)
listener from its component. This method
must only be called if bind() was executed.listener - the MouseListener and MouseMotionListener that should be removedCopyright © 2018. All rights reserved.