public class DisabledExpandableToolbarItemStrategy extends Object implements ExpandableToolbarItemStrategy
ExpandableToolbarItemStrategy
does not do anything, it just disables
any feature related to expandable items.STRATEGY
Constructor and Description |
---|
DisabledExpandableToolbarItemStrategy() |
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 . |
public DisabledExpandableToolbarItemStrategy()
public void install(bibliothek.gui.DockController controller)
ExpandableToolbarItemStrategy
controller
.install
in interface ExpandableToolbarItemStrategy
controller
- the controller using this strategypublic void uninstall(bibliothek.gui.DockController controller)
ExpandableToolbarItemStrategy
controller
.uninstall
in interface ExpandableToolbarItemStrategy
controller
- the controller which is no longer using this strategypublic boolean isEnabled(bibliothek.gui.Dockable item, ExpandedState state)
ExpandableToolbarItemStrategy
Dockable
item
can have the state
state
.isEnabled
in interface ExpandableToolbarItemStrategy
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
public ExpandedState getState(bibliothek.gui.Dockable item)
ExpandableToolbarItemStrategy
item
has.getState
in interface ExpandableToolbarItemStrategy
item
- some Dockable
null
if item
is not supported by this strategy.public void setState(bibliothek.gui.Dockable item, ExpandedState state)
ExpandableToolbarItemStrategy
item
to state
. The strategy may refuse to do anything or
replace state
if state
is not enabled for item
.setState
in interface ExpandableToolbarItemStrategy
item
- the item whose state is changedstate
- the new state, this is a state which is enabled
public void addExpandedListener(ExpandableToolbarItemStrategyListener listener)
ExpandableToolbarItemStrategy
addExpandedListener
in interface ExpandableToolbarItemStrategy
listener
- the new listener, not null
public void removeExpandedListener(ExpandableToolbarItemStrategyListener listener)
ExpandableToolbarItemStrategy
removeExpandedListener
in interface ExpandableToolbarItemStrategy
listener
- the listener to remove