public class DefaultExpandableToolbarItemStrategy extends Object implements ExpandableToolbarItemStrategy
ExpandableToolbarItemStrategy
searches for ExpandableToolbarItems.STRATEGY| Constructor and Description |
|---|
DefaultExpandableToolbarItemStrategy() |
| 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(Dockable item)
Gets the current state
item has. |
protected void |
handleAdd(Dockable dockable) |
protected void |
handleAdd(DockStation station) |
protected void |
handleRemove(Dockable dockable) |
protected void |
handleRemove(DockStation station) |
void |
install(DockController controller)
Called if this strategy is used by
controller. |
boolean |
isEnabled(Dockable item,
ExpandedState state)
|
protected ExpandableToolbarItemStrategyListener[] |
listeners()
Gets all the
ExpandableToolbarItemStrategyListeners that are
currently registered. |
void |
removeExpandedListener(ExpandableToolbarItemStrategyListener listener)
Removes a listener from this strategy.
|
void |
setState(Dockable item,
ExpandedState state)
Changes the state of
item to state. |
void |
uninstall(DockController controller)
Called if this strategy is no longer used by
controller. |
public DefaultExpandableToolbarItemStrategy()
protected void handleAdd(Dockable dockable)
protected void handleAdd(DockStation station)
protected void handleRemove(Dockable dockable)
protected void handleRemove(DockStation station)
public void install(DockController controller)
ExpandableToolbarItemStrategycontroller.install in interface ExpandableToolbarItemStrategycontroller - the controller using this strategypublic void uninstall(DockController controller)
ExpandableToolbarItemStrategycontroller.uninstall in interface ExpandableToolbarItemStrategycontroller - the controller which is no longer using this strategypublic boolean isEnabled(Dockable item, ExpandedState state)
ExpandableToolbarItemStrategyisEnabled in interface ExpandableToolbarItemStrategyitem - the item to checkstate - the state that might be applied to itemtrue if this strategy knows how to change the state
of item to statepublic ExpandedState getState(Dockable item)
ExpandableToolbarItemStrategyitem has.getState in interface ExpandableToolbarItemStrategyitem - some Dockablenull if item is not supported by this strategy.public void setState(Dockable item, ExpandedState state)
ExpandableToolbarItemStrategyitem to state. The strategy may refuse to do anything or
replace state if state is not enabled for item.setState in interface ExpandableToolbarItemStrategyitem - the item whose state is changedstate - the new state, this is a state which is enabledpublic void addExpandedListener(ExpandableToolbarItemStrategyListener listener)
ExpandableToolbarItemStrategyaddExpandedListener in interface ExpandableToolbarItemStrategylistener - the new listener, not nullpublic void removeExpandedListener(ExpandableToolbarItemStrategyListener listener)
ExpandableToolbarItemStrategyremoveExpandedListener in interface ExpandableToolbarItemStrategylistener - the listener to removeprotected ExpandableToolbarItemStrategyListener[] listeners()
ExpandableToolbarItemStrategyListeners that are
currently registered.Copyright © 2018. All rights reserved.