public class CToolbarItem
extends bibliothek.gui.dock.common.intern.AbstractCDockable
implements bibliothek.gui.dock.common.SingleCDockable
CToolbarItem
is an item (e.g. a button) that is shown in a toolbar.CToolbarItem
consists of several Component
s, 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() );
Constructor and Description |
---|
CToolbarItem(String id)
Creates a new item.
|
Modifier and Type | Method and Description |
---|---|
bibliothek.gui.dock.common.CStation<?> |
asStation() |
protected CommonToolbarItemDockable |
createCommonDockable() |
String |
getUniqueId() |
CommonToolbarItemDockable |
intern() |
boolean |
isCloseable() |
boolean |
isExternalizable() |
boolean |
isMaximizable() |
boolean |
isMinimizable() |
boolean |
isStackable() |
void |
setItem(bibliothek.gui.dock.common.action.CAction item)
Sets a component which should be shown when this dockable is in state
ExpandedState.SHRUNK . |
void |
setItem(bibliothek.gui.dock.common.action.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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCDockableLocationListener, 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, setWorkingArea
public CToolbarItem(String id)
id
- the unique identifier of this item, not null
public void setItem(bibliothek.gui.dock.common.action.CAction item)
ExpandedState.SHRUNK
.item
- the item to show, can be null
public void setItem(Component item)
ExpandedState.SHRUNK
.item
- the item to show, can be null
public void setItem(Component item, ExpandedState state)
state
.item
- the item to show, can be null
state
- the state when to show item
public void setItem(bibliothek.gui.dock.common.action.CAction item, ExpandedState state)
state
.item
- the item to show, can be null
state
- the state when to show item
public void setItem(ToolbarItem item, ExpandedState state)
state
.item
- the item to show, can be null
state
- the state when to show item
public String getUniqueId()
getUniqueId
in interface bibliothek.gui.dock.common.SingleCDockable
public boolean isMinimizable()
isMinimizable
in interface bibliothek.gui.dock.common.intern.CDockable
public boolean isMaximizable()
isMaximizable
in interface bibliothek.gui.dock.common.intern.CDockable
public boolean isExternalizable()
isExternalizable
in interface bibliothek.gui.dock.common.intern.CDockable
public boolean isStackable()
isStackable
in interface bibliothek.gui.dock.common.intern.CDockable
public boolean isCloseable()
isCloseable
in interface bibliothek.gui.dock.common.intern.CDockable
public bibliothek.gui.dock.common.CStation<?> asStation()
asStation
in interface bibliothek.gui.dock.common.intern.CDockable
public CommonToolbarItemDockable intern()
intern
in interface bibliothek.gui.dock.common.intern.CDockable
intern
in class bibliothek.gui.dock.common.intern.AbstractCDockable
protected CommonToolbarItemDockable createCommonDockable()
createCommonDockable
in class bibliothek.gui.dock.common.intern.AbstractCDockable