bibliothek.gui.dock.toolbar.perspective
Class CToolbarPerspective

java.lang.Object
  extended by bibliothek.gui.dock.toolbar.perspective.CToolbarPerspective

public class CToolbarPerspective
extends Object

A wrapper around a ToolbarDockPerspective, represents a single toolbar.

Author:
Benjamin Sigg

Constructor Summary
CToolbarPerspective(ToolbarDockPerspective delegate)
          Creates a new perspective wrapping around delegate.
 
Method Summary
 void add(bibliothek.gui.dock.common.perspective.CDockablePerspective item)
          Adds item at the end of this toolbar.
 void add(int index, bibliothek.gui.dock.common.perspective.CDockablePerspective item)
          Inserts item at location index in this toolbar.
 void add(int index, String id)
          Creates and adds a new SingleCDockablePerspective at location index in this toolbar.
 void add(String id)
          Creates and adds a new SingleCDockablePerspective at the end of this toolbar.
 ToolbarDockPerspective getDelegate()
          Allows access to the internal representation of this perspective.
 bibliothek.gui.dock.common.perspective.CDockablePerspective getItem(int index)
          Gets the item at location index.
 int getItemCount()
          Gets the number of children of this toolbar.
 void remove(bibliothek.gui.dock.common.perspective.CDockablePerspective item)
          Removes item from this toolbar
 void remove(int index)
          Removes the index'th child of this toolbar.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CToolbarPerspective

public CToolbarPerspective(ToolbarDockPerspective delegate)
Creates a new perspective wrapping around delegate.

Parameters:
delegate - the internal representation, not null
Method Detail

getDelegate

public ToolbarDockPerspective getDelegate()
Allows access to the internal representation of this perspective.

Returns:
the internal representation, not null

getItemCount

public int getItemCount()
Gets the number of children of this toolbar.

Returns:
the total number of children

getItem

public bibliothek.gui.dock.common.perspective.CDockablePerspective getItem(int index)
Gets the item at location index.

Parameters:
index - the location of the item
Returns:
the item or null if the item has the wrong type, the item usually is of type SingleCDockablePerspective

add

public void add(String id)
Creates and adds a new SingleCDockablePerspective at the end of this toolbar.

Parameters:
id - the unique identifier of the item

add

public void add(int index,
                String id)
Creates and adds a new SingleCDockablePerspective at location index in this toolbar.

Parameters:
index - the location of the new item
id - the unique identifier of the item

add

public void add(bibliothek.gui.dock.common.perspective.CDockablePerspective item)
Adds item at the end of this toolbar.

Parameters:
item - the item to add, not null

add

public void add(int index,
                bibliothek.gui.dock.common.perspective.CDockablePerspective item)
Inserts item at location index in this toolbar.

Parameters:
index - the location of the new item
item - the new item

remove

public void remove(int index)
Removes the index'th child of this toolbar.

Parameters:
index - the location of the item to remove

remove

public void remove(bibliothek.gui.dock.common.perspective.CDockablePerspective item)
Removes item from this toolbar

Parameters:
item - the item to remove