public class ToolbarItemDockable extends AbstractDockable implements ExpandableToolbarItem
ToolbarItemDockable is a Dockable that can be shown as child of a ToolbarDockStation. This
class acts as wrapper around a ToolbarItem which can just be any kind of Component.ExpandableToolbarItem, clients can call setItem(ToolbarItem, ExpandedState) to
fill up the different positions.| Constructor and Description |
|---|
ToolbarItemDockable()
Creates a new dockable
|
ToolbarItemDockable(Component component)
Creates a new dockable
|
ToolbarItemDockable(Component component,
Icon icon)
Creates a new dockable
|
ToolbarItemDockable(Component component,
String title)
Creates a new dockable
|
ToolbarItemDockable(Component component,
String title,
Icon icon)
Creates a new dockable
|
ToolbarItemDockable(DockAction action)
Creates a new dockable
|
ToolbarItemDockable(DockAction action,
Icon icon)
Creates a new dockable
|
ToolbarItemDockable(DockAction action,
String title)
Creates a new dockable
|
ToolbarItemDockable(DockAction action,
String title,
Icon icon)
Creates a new dockable
|
ToolbarItemDockable(Icon icon)
Creates a new dockable
|
ToolbarItemDockable(String title)
Creates a new dockable
|
ToolbarItemDockable(ToolbarItem item)
Creates a new dockable
|
ToolbarItemDockable(ToolbarItem item,
Icon icon)
Creates a new dockable
|
ToolbarItemDockable(ToolbarItem item,
String title)
Creates a new dockable
|
ToolbarItemDockable(ToolbarItem item,
String title,
Icon icon)
Creates a new dockable
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accept(DockStation station) |
boolean |
accept(DockStation base,
Dockable neighbour) |
void |
addExpandableListener(ExpandableToolbarItemListener listener)
Adds the observer
listener to this item. |
void |
addMouseInputListener(MouseInputListener listener) |
DockStation |
asDockStation() |
protected DockComponentRootHandler |
createRootHandler() |
protected DockIcon |
createTitleIcon() |
Component |
getComponent() |
ExpandedState |
getExpandedState()
Gets the current state of this item.
|
String |
getFactoryID() |
Orientation |
getOrientation()
Gets the latest known orientation of this dockable
|
boolean |
isEnabled(ExpandedState state)
Tells whether this
ExpandableToolbarItem likes to be in state state. |
void |
removeExpandableListener(ExpandableToolbarItemListener listener)
Removes the observer
listener from this item. |
void |
removeMouseInputListener(MouseInputListener listener) |
void |
setAction(DockAction action,
ExpandedState state)
Sets the
DockAction which should be shown if in state state. |
void |
setComponent(Component component,
ExpandedState state)
Sets the
Component which should be shown if in state state. |
void |
setController(DockController controller) |
void |
setExpandedState(ExpandedState state)
Changes the state of this item to
state. |
void |
setItem(ToolbarItem item,
ExpandedState state)
Sets the
ToolbarItem which should be shown if in state
state. |
String |
toString() |
addDockableListener, addDockableStateListener, addDockHierarchyListener, addKeyListener, asDockable, bind, configureDisplayerHints, fireTitleBound, fireTitleExchanged, fireTitleExchanged, fireTitleIconChanged, fireTitleTextChanged, fireTitleTooltipChanged, fireTitleUnbound, getComponentConfiguration, getConfigurableDisplayerHints, getController, getDockableStateListeners, getDockElementObserver, getDockParent, getElement, getGlobalActionOffers, getLocalActionOffers, getPopupLocation, getRootHandler, getTitleIcon, getTitleIconHandling, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, isUsedAsTitle, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, removeKeyListener, requestDisplayer, requestDockTitle, resetTitleIcon, setActionOffers, setComponentConfiguration, setDockParent, setTitleIcon, setTitleIconHandling, setTitleText, setTitleToolTip, shouldFocus, shouldTransfersFocus, unbindclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddDockableListener, addDockableStateListener, addDockHierarchyListener, bind, configureDisplayerHints, getController, getDockParent, getGlobalActionOffers, getLocalActionOffers, getTitleIcon, getTitleText, getTitleToolTip, isDockableShowing, isDockableVisible, listBoundTitles, removeDockableListener, removeDockableStateListener, removeDockHierarchyListener, requestDisplayer, requestDockTitle, setDockParent, unbindasDockablegetComponentConfiguration, setComponentConfigurationgetElement, getPopupLocation, isUsedAsTitle, shouldFocus, shouldTransfersFocusasDockablepublic ToolbarItemDockable()
public ToolbarItemDockable(Icon icon)
icon - the icon of this dockable, can be nullpublic ToolbarItemDockable(String title)
title - the title of this dockable, can be nullpublic ToolbarItemDockable(DockAction action)
action - the item to show in the ExpandedState.SHRUNK, can be nullpublic ToolbarItemDockable(Component component)
component - the item to show in the ExpandedState.SHRUNK, can be nullpublic ToolbarItemDockable(ToolbarItem item)
item - the item to show in the ExpandedState.SHRUNK, can be nullpublic ToolbarItemDockable(DockAction action, Icon icon)
action - the item to show in the ExpandedState.SHRUNK, can be nullicon - the icon of this dockable, can be nullpublic ToolbarItemDockable(Component component, Icon icon)
component - the item to show in the ExpandedState.SHRUNK, can be nullicon - the icon of this dockable, can be nullpublic ToolbarItemDockable(ToolbarItem item, Icon icon)
item - the item to show in the ExpandedState.SHRUNK, can be nullicon - the icon of this dockable, can be nullpublic ToolbarItemDockable(DockAction action, String title)
action - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullpublic ToolbarItemDockable(Component component, String title)
component - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullpublic ToolbarItemDockable(ToolbarItem item, String title)
item - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullpublic ToolbarItemDockable(DockAction action, String title, Icon icon)
action - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullicon - the icon of this dockable, can be nullpublic ToolbarItemDockable(Component component, String title, Icon icon)
component - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullicon - the icon of this dockable, can be nullpublic ToolbarItemDockable(ToolbarItem item, String title, Icon icon)
item - the item to show in the ExpandedState.SHRUNK, can be nulltitle - the title of this dockable, can be nullicon - the icon of this dockable, can be nullprotected DockComponentRootHandler createRootHandler()
createRootHandler in class AbstractDockablepublic void addMouseInputListener(MouseInputListener listener)
addMouseInputListener in interface DockElementRepresentativeaddMouseInputListener in interface DockableaddMouseInputListener in class AbstractDockablepublic void removeMouseInputListener(MouseInputListener listener)
removeMouseInputListener in interface DockElementRepresentativeremoveMouseInputListener in interface DockableremoveMouseInputListener in class AbstractDockablepublic void setAction(DockAction action, ExpandedState state)
DockAction which should be shown if in state state.
Please note that the same DockAction cannot be used for more than one state.action - the item to setstate - the state in which to show actionpublic void setComponent(Component component, ExpandedState state)
Component which should be shown if in state state.
Please note that the same Component cannot be used for more than one state.component - the item to setstate - the state in which to show componentpublic void setItem(ToolbarItem item, ExpandedState state)
ToolbarItem which should be shown if in state
state. Please note that the same ToolbarItem cannot be
used for more than one state.item - the item to setstate - the state in which to show itempublic void setController(DockController controller)
setController in interface DockablesetController in class AbstractDockablepublic void setExpandedState(ExpandedState state)
ExpandableToolbarItemstate. Note that state
can be any state, including those for which ExpandableToolbarItem.isEnabled(ExpandedState) returned
false.setExpandedState in interface ExpandableToolbarItemstate - the new statepublic boolean isEnabled(ExpandedState state)
ExpandableToolbarItemExpandableToolbarItem likes to be in state state.isEnabled in interface ExpandableToolbarItemstate - a possible statethis item likes to be in statepublic ExpandedState getExpandedState()
ExpandableToolbarItemgetExpandedState in interface ExpandableToolbarItempublic Orientation getOrientation()
null if unknownpublic Component getComponent()
getComponent in interface DockElementRepresentativegetComponent in interface Dockablepublic void addExpandableListener(ExpandableToolbarItemListener listener)
ExpandableToolbarItemlistener to this item.addExpandableListener in interface ExpandableToolbarItemlistener - the new listener, not nullpublic void removeExpandableListener(ExpandableToolbarItemListener listener)
ExpandableToolbarItemlistener from this item.removeExpandableListener in interface ExpandableToolbarItemlistener - the listener to removepublic DockStation asDockStation()
asDockStation in interface DockElementpublic String getFactoryID()
getFactoryID in interface DockElementprotected DockIcon createTitleIcon()
createTitleIcon in class AbstractDockablepublic boolean accept(DockStation station)
accept in interface Dockableaccept in class AbstractDockablepublic boolean accept(DockStation base, Dockable neighbour)
accept in interface Dockableaccept in class AbstractDockableCopyright © 2018. All rights reserved.