public class CToolbarItem extends AbstractCDockable implements SingleCDockable
CToolbarItem is an item (e.g. a button) that is shown in a toolbar.CToolbarItem consists of several Components, but only one of them is shown. Which
one depends on the ExpandedState which is set by the toolbar itself. In order to use this feature clients
have to call
CControl control = ...
control.putProperty( ExpandableToolbarItemStrategy.STRATEGY, new DefaultExpandableToolbarItemStrategy() );listenerCollectionACTION_KEY_CLOSE, ACTION_KEY_EXTERNALIZE, ACTION_KEY_MAXIMIZE, ACTION_KEY_MINIMIZE, ACTION_KEY_MINIMIZE_HOLD, ACTION_KEY_NORMALIZE, ACTION_KEY_UNEXTERNALIZE, ACTION_KEY_UNMAXIMIZE_EXTERNALIZED| Constructor and Description |
|---|
CToolbarItem(String id)
Creates a new item.
|
| Modifier and Type | Method and Description |
|---|---|
CStation<?> |
asStation() |
protected CommonToolbarItemDockable |
createCommonDockable() |
String |
getUniqueId() |
CommonToolbarItemDockable |
intern() |
boolean |
isCloseable() |
boolean |
isExternalizable() |
boolean |
isMaximizable() |
boolean |
isMinimizable() |
boolean |
isStackable() |
void |
setItem(CAction item)
Sets a component which should be shown when this dockable is in state
ExpandedState.SHRUNK. |
void |
setItem(CAction item,
ExpandedState state)
Sets a component which should be shown when this dockable is in state
state. |
void |
setItem(Component item)
Sets a component which should be shown when this dockable is in state
ExpandedState.SHRUNK. |
void |
setItem(Component item,
ExpandedState state)
Sets a component which should be shown when this dockable is in state
state. |
void |
setItem(ToolbarItem item,
ExpandedState state)
Sets a component which should be shown when this dockable is in state
state. |
addCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, control, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getClose, getColors, getControl, getControlAccess, getDefaultLocation, getDockableUniqueId, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, init, isDockableVisible, isEnabled, isNormalizeable, isResizeLocked, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, propertyListeners, putAction, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControlAccess, setDefaultLocation, setEnabled, setExtendedMode, setFocusComponent, setGrouping, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setResizeLocked, setResizeLockedHorizontally, setResizeLockedVertically, setResizeRequest, setResizeRequest, setSingleTabShown, setSticky, setStickySwitchable, setTitleShown, setVisible, setWorkingArea, stateListeners, toFront, toFront, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitaddCDockableLocationListener, addCDockablePropertyListener, addCDockableStateListener, addDoubleClickListener, addFocusListener, addKeyboardListener, addVetoClosingListener, getAction, getAndClearResizeRequest, getAutoBaseLocation, getBaseLocation, getColors, getControl, getControlAccess, getExtendedMode, getFocusComponent, getFonts, getGrouping, getMinimizedSize, getParentStation, getWorkingArea, hasParent, isDockableVisible, isEnabled, isNormalizeable, isResizeLockedHorizontally, isResizeLockedVertically, isShowing, isSingleTabShown, isSticky, isStickySwitchable, isTitleShown, isVisible, removeCDockableLocationListener, removeCDockablePropertyListener, removeCDockableStateListener, removeDoubleClickListener, removeFocusListener, removeKeyboardListener, removeVetoClosingListener, setControlAccess, setExtendedMode, setLocation, setLocationsAside, setLocationsAside, setLocationsAsideFocused, setMinimizedSize, setSticky, setStickySwitchable, setVisible, setWorkingAreapublic CToolbarItem(String id)
id - the unique identifier of this item, not nullpublic void setItem(CAction item)
ExpandedState.SHRUNK.item - the item to show, can be nullpublic void setItem(Component item)
ExpandedState.SHRUNK.item - the item to show, can be nullpublic void setItem(Component item, ExpandedState state)
state.item - the item to show, can be nullstate - the state when to show itempublic void setItem(CAction item, ExpandedState state)
state.item - the item to show, can be nullstate - the state when to show itempublic void setItem(ToolbarItem item, ExpandedState state)
state.item - the item to show, can be nullstate - the state when to show itempublic String getUniqueId()
getUniqueId in interface SingleCDockablepublic boolean isMinimizable()
isMinimizable in interface CDockablepublic boolean isMaximizable()
isMaximizable in interface CDockablepublic boolean isExternalizable()
isExternalizable in interface CDockablepublic boolean isStackable()
isStackable in interface CDockablepublic boolean isCloseable()
isCloseable in interface CDockablepublic CommonToolbarItemDockable intern()
intern in interface CDockableintern in class AbstractCDockableprotected CommonToolbarItemDockable createCommonDockable()
createCommonDockable in class AbstractCDockableCopyright © 2018. All rights reserved.