bibliothek.gui.dock.toolbar.perspective
Class CToolbarAreaPerspective

java.lang.Object
  extended by bibliothek.gui.dock.toolbar.perspective.CToolbarAreaPerspective
All Implemented Interfaces:
bibliothek.gui.dock.common.perspective.CElementPerspective, bibliothek.gui.dock.common.perspective.CStationPerspective

public class CToolbarAreaPerspective
extends Object
implements bibliothek.gui.dock.common.perspective.CStationPerspective

Represents a CToolbarArea as perspective.

Author:
Benjamin Sigg

Constructor Summary
CToolbarAreaPerspective(String id)
          Creates a new perspective.
 
Method Summary
 bibliothek.gui.dock.common.perspective.CDockablePerspective asDockable()
           
 bibliothek.gui.dock.common.perspective.CStationPerspective asStation()
           
 int getGroupCount()
          Gets the number of groups this station currently has.
 bibliothek.gui.dock.common.perspective.CPerspective getPerspective()
           
 bibliothek.util.Path getTypeId()
           
 String getUniqueId()
           
 CToolbarGroupPerspective group(int index)
          Gets or creates a group of toolbars at location index.
 CToolbarGroupPerspective insert(int index)
          Creates a new CToolbarGroupPerspective and inserts the new group at index.
 CommonToolbarContainerDockPerspective intern()
           
 boolean isRoot()
           
 boolean isWorkingArea()
           
 void remove(CToolbarGroupPerspective group)
          Removes group from this station.
 void remove(int index)
          Removes the group at location index from this station.
 void setPerspective(bibliothek.gui.dock.common.perspective.CPerspective perspective)
           
 void setRoot(boolean root)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CToolbarAreaPerspective

public CToolbarAreaPerspective(String id)
Creates a new perspective.

Parameters:
id - the unique identifier of this station
Method Detail

getGroupCount

public int getGroupCount()
Gets the number of groups this station currently has. This method assumes that the client did not modify the ToolbarStrategy.

Returns:
the number of groups

group

public CToolbarGroupPerspective group(int index)
Gets or creates a group of toolbars at location index.

Parameters:
index - the index of an existing group, -1 or getGroupCount()
Returns:
the group at index or null if the child at index has the wrong type. A result of null can only happen if the client modified the ToolbarStrategy.

insert

public CToolbarGroupPerspective insert(int index)
Creates a new CToolbarGroupPerspective and inserts the new group at index.

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

remove

public void remove(int index)
Removes the group at location index from this station.

Parameters:
index - the index of the group to remove

remove

public void remove(CToolbarGroupPerspective group)
Removes group from this station.

Parameters:
group - the group to remove, not null

intern

public CommonToolbarContainerDockPerspective intern()
Specified by:
intern in interface bibliothek.gui.dock.common.perspective.CElementPerspective

asDockable

public bibliothek.gui.dock.common.perspective.CDockablePerspective asDockable()
Specified by:
asDockable in interface bibliothek.gui.dock.common.perspective.CElementPerspective

asStation

public bibliothek.gui.dock.common.perspective.CStationPerspective asStation()
Specified by:
asStation in interface bibliothek.gui.dock.common.perspective.CElementPerspective

getUniqueId

public String getUniqueId()
Specified by:
getUniqueId in interface bibliothek.gui.dock.common.perspective.CStationPerspective

getTypeId

public bibliothek.util.Path getTypeId()
Specified by:
getTypeId in interface bibliothek.gui.dock.common.perspective.CStationPerspective

setPerspective

public void setPerspective(bibliothek.gui.dock.common.perspective.CPerspective perspective)
Specified by:
setPerspective in interface bibliothek.gui.dock.common.perspective.CStationPerspective

getPerspective

public bibliothek.gui.dock.common.perspective.CPerspective getPerspective()
Specified by:
getPerspective in interface bibliothek.gui.dock.common.perspective.CStationPerspective

isWorkingArea

public boolean isWorkingArea()
Specified by:
isWorkingArea in interface bibliothek.gui.dock.common.perspective.CStationPerspective

isRoot

public boolean isRoot()
Specified by:
isRoot in interface bibliothek.gui.dock.common.perspective.CStationPerspective

setRoot

public void setRoot(boolean root)
Specified by:
setRoot in interface bibliothek.gui.dock.common.perspective.CStationPerspective