public interface ExpandableToolbarItemStrategy
ExpandableToolbarItemStrategy
is a strategy that allows to expand
and to shrink items of a toolbar.Modifier and Type | Field and Description |
---|---|
static bibliothek.gui.dock.util.PropertyKey<ExpandableToolbarItemStrategy> |
STRATEGY
An identifier to exchange the strategy.
|
Modifier and Type | Method and Description |
---|---|
void |
addExpandedListener(ExpandableToolbarItemStrategyListener listener)
Adds a listener to this strategy, the listener is to be informed if the
state of an item changes.
|
ExpandedState |
getState(bibliothek.gui.Dockable item)
Gets the current state
item has. |
void |
install(bibliothek.gui.DockController controller)
Called if this strategy is used by
controller . |
boolean |
isEnabled(bibliothek.gui.Dockable item,
ExpandedState state)
Tells whether the
Dockable item can have the state
state . |
void |
removeExpandedListener(ExpandableToolbarItemStrategyListener listener)
Removes a listener from this strategy.
|
void |
setState(bibliothek.gui.Dockable item,
ExpandedState state)
Changes the state of
item to state . |
void |
uninstall(bibliothek.gui.DockController controller)
Called if this strategy is no longer used by
controller . |
static final bibliothek.gui.dock.util.PropertyKey<ExpandableToolbarItemStrategy> STRATEGY
DefaultExpandableToolbarItemStrategy
void install(bibliothek.gui.DockController controller)
controller
.controller
- the controller using this strategyvoid uninstall(bibliothek.gui.DockController controller)
controller
.controller
- the controller which is no longer using this strategyboolean isEnabled(bibliothek.gui.Dockable item, ExpandedState state)
Dockable
item
can have the state
state
.item
- the item to checkstate
- the state that might be applied to item
true
if this strategy knows how to change the state
of item
to state
ExpandedState getState(bibliothek.gui.Dockable item)
item
has.item
- some Dockable
null
if item
is not supported by this strategy.void setState(bibliothek.gui.Dockable item, ExpandedState state)
item
to state
. The strategy may refuse to do anything or
replace state
if state
is not enabled for item
.item
- the item whose state is changedstate
- the new state, this is a state which is enabled
void addExpandedListener(ExpandableToolbarItemStrategyListener listener)
listener
- the new listener, not null
void removeExpandedListener(ExpandableToolbarItemStrategyListener listener)
listener
- the listener to remove