bibliothek.gui.dock.toolbar.perspective
Class CToolbarGroupPerspective.Column

java.lang.Object
  extended by bibliothek.gui.dock.toolbar.perspective.CToolbarGroupPerspective.Column
Enclosing class:
CToolbarGroupPerspective

public class CToolbarGroupPerspective.Column
extends Object

Represents a single column of toolbars in a group of toolbars. A column is a concept of the user interface, as a result a column must contain at least one child. If a column does not have children, it is not part of the group. It will however store its last index and can insert itself at that last index again if new children are added. If several columns have no children, then their order can change depending on the order in which new children are added.

Author:
Benjamin Sigg

Method Summary
 int getToolbarCount()
          Gets the number of toolbars in this column.
 CToolbarPerspective insert(int index)
          Creates a new toolbar at index.
 void remove(CToolbarPerspective toolbar)
          Removes toolbar from this column.
 void remove(int index)
          Removes the toolbar at location index from this column.
 CToolbarPerspective toolbar(int index)
          Gets or creates the toolbar at index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getToolbarCount

public int getToolbarCount()
Gets the number of toolbars in this column.

Returns:
the number of toolbars

toolbar

public CToolbarPerspective toolbar(int index)
Gets or creates the toolbar at index.

Parameters:
index - the location of the toolbar, -1 or getToolbarCount()
Returns:
the toolbar or null. A value of null is only returned if the child has a wrong type, this happens only if the client changed the ToolbarStrategy

insert

public CToolbarPerspective insert(int index)
Creates a new toolbar at index.

Parameters:
index - the location of the new toolbar
Returns:
the new toolbar

remove

public void remove(int index)
Removes the toolbar at location index from this column.

Parameters:
index - the index of the toolbar to remove

remove

public void remove(CToolbarPerspective toolbar)
Removes toolbar from this column.

Parameters:
toolbar - the toolbar to remove