bibliothek.gui.dock.toolbar.expand
Class ExpandableStateController

java.lang.Object
  extended by bibliothek.gui.dock.toolbar.expand.ExpandableStateController

public class ExpandableStateController
extends Object

The ExpandableStateController is a helper class intended for ExpandableToolbarItems, it finds the first parent of a ExpandableToolbarItem which is acknowledged by the current ExpandableToolbarItemStrategy and changes the ExpandedState of the item to the ExpandedState of the parent.

Author:
Benjamin Sigg

Constructor Summary
ExpandableStateController(ExpandableToolbarItem item)
          Creates a new controller.
 
Method Summary
 ExpandableToolbarItem getItem()
          Gets the item which is observed by this controller.
 void refresh()
          Searches the first parent of the item which is acknowledged by the current ExpandableToolbarItemStrategy and updates the ExpandedState of the item such that it has the same state as its parent.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpandableStateController

public ExpandableStateController(ExpandableToolbarItem item)
Creates a new controller.

Parameters:
item - the item to observe
Method Detail

getItem

public ExpandableToolbarItem getItem()
Gets the item which is observed by this controller.

Returns:
the observed item, not null

refresh

public void refresh()
Searches the first parent of the item which is acknowledged by the current ExpandableToolbarItemStrategy and updates the ExpandedState of the item such that it has the same state as its parent.