bibliothek.gui.dock.station.toolbar
Class ListDockableStationPerspective

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.ListDockableStationPerspective
All Implemented Interfaces:
bibliothek.gui.dock.perspective.PerspectiveDockable, bibliothek.gui.dock.perspective.PerspectiveElement, bibliothek.gui.dock.perspective.PerspectiveStation, bibliothek.gui.dock.station.support.PlaceholderListItem<bibliothek.gui.dock.perspective.PerspectiveDockable>
Direct Known Subclasses:
ToolbarContainerDockPerspective, ToolbarDockPerspective

public abstract class ListDockableStationPerspective
extends Object
implements bibliothek.gui.dock.perspective.PerspectiveStation, bibliothek.gui.dock.perspective.PerspectiveDockable

An abstract implementation of a PerspectiveStation whose children are organized in a list.

Author:
Benjamin Sigg

Constructor Summary
ListDockableStationPerspective()
          Creates a new, empty perspective
ListDockableStationPerspective(bibliothek.gui.dock.perspective.PerspectiveDockable[] children)
          Creates a new perspective, adds children to this station.
 
Method Summary
 void add(int index, bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
          Adds dockable at location index in the list of children.
 void add(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
          Adds dockable at the end of the list of children.
 bibliothek.gui.dock.perspective.PerspectiveDockable asDockable()
           
 bibliothek.gui.dock.perspective.PerspectiveStation asStation()
           
 bibliothek.gui.dock.perspective.PerspectiveDockable getDockable(int index)
           
 int getDockableCount()
           
protected abstract  bibliothek.gui.dock.layout.DockableProperty getDockableProperty(int index, bibliothek.util.Path placeholder, bibliothek.gui.dock.perspective.PerspectiveDockable child, bibliothek.gui.dock.perspective.PerspectiveDockable target)
          Called by getDockableProperty(PerspectiveDockable, PerspectiveDockable), returns a new DockableProperty which matches the location described by index and placeholder.
 bibliothek.gui.dock.layout.DockableProperty getDockableProperty(bibliothek.gui.dock.perspective.PerspectiveDockable child, bibliothek.gui.dock.perspective.PerspectiveDockable target)
           
 bibliothek.gui.dock.station.support.PerspectivePlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable> getDockables()
          Gets direct access to the list of dockables, should be used with care.
 bibliothek.gui.dock.perspective.PerspectiveStation getParent()
           
 bibliothek.util.Path getPlaceholder()
           
 bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders()
           
 int indexOf(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
          Gets the location of dockable on this station.
 bibliothek.gui.dock.perspective.PerspectiveDockable remove(int index)
          Removes the PerspectiveDockable which is stored at location index.
 boolean remove(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
           
 void replace(bibliothek.gui.dock.perspective.PerspectiveDockable oldDockable, bibliothek.gui.dock.perspective.PerspectiveDockable newDockable)
           
protected  void setDockables(bibliothek.gui.dock.station.support.PerspectivePlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable> dockables)
          Sets the list which contains all the children.
 void setParent(bibliothek.gui.dock.perspective.PerspectiveStation parent)
           
 void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface bibliothek.gui.dock.perspective.PerspectiveElement
getFactoryID
 

Constructor Detail

ListDockableStationPerspective

public ListDockableStationPerspective()
Creates a new, empty perspective


ListDockableStationPerspective

public ListDockableStationPerspective(bibliothek.gui.dock.perspective.PerspectiveDockable[] children)
Creates a new perspective, adds children to this station.

Parameters:
children - the children to add
Method Detail

asStation

public bibliothek.gui.dock.perspective.PerspectiveStation asStation()
Specified by:
asStation in interface bibliothek.gui.dock.perspective.PerspectiveElement

asDockable

public bibliothek.gui.dock.perspective.PerspectiveDockable asDockable()
Specified by:
asDockable in interface bibliothek.gui.dock.perspective.PerspectiveElement
Specified by:
asDockable in interface bibliothek.gui.dock.station.support.PlaceholderListItem<bibliothek.gui.dock.perspective.PerspectiveDockable>

getDockableCount

public int getDockableCount()
Specified by:
getDockableCount in interface bibliothek.gui.dock.perspective.PerspectiveStation

getDockable

public bibliothek.gui.dock.perspective.PerspectiveDockable getDockable(int index)
Specified by:
getDockable in interface bibliothek.gui.dock.perspective.PerspectiveStation

indexOf

public int indexOf(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
Gets the location of dockable on this station.

Parameters:
dockable - the item to search
Returns:
the location or -1 if not found

add

public void add(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
Adds dockable at the end of the list of children.

Parameters:
dockable - the item to add, not null

add

public void add(int index,
                bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
Adds dockable at location index in the list of children.

Parameters:
index - the location of the new child
dockable - the new child, not null

getDockables

@FrameworkOnly
public bibliothek.gui.dock.station.support.PerspectivePlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable> getDockables()
Gets direct access to the list of dockables, should be used with care.

Returns:
the list of dockables

setDockables

protected void setDockables(bibliothek.gui.dock.station.support.PerspectivePlaceholderList<bibliothek.gui.dock.perspective.PerspectiveDockable> dockables)
Sets the list which contains all the children.

Parameters:
dockables - the list of the children

getDockableProperty

public bibliothek.gui.dock.layout.DockableProperty getDockableProperty(bibliothek.gui.dock.perspective.PerspectiveDockable child,
                                                                       bibliothek.gui.dock.perspective.PerspectiveDockable target)
Specified by:
getDockableProperty in interface bibliothek.gui.dock.perspective.PerspectiveStation

getDockableProperty

protected abstract bibliothek.gui.dock.layout.DockableProperty getDockableProperty(int index,
                                                                                   bibliothek.util.Path placeholder,
                                                                                   bibliothek.gui.dock.perspective.PerspectiveDockable child,
                                                                                   bibliothek.gui.dock.perspective.PerspectiveDockable target)
Called by getDockableProperty(PerspectiveDockable, PerspectiveDockable), returns a new DockableProperty which matches the location described by index and placeholder.

Parameters:
index - the index of the item in the list of dockables, can be -1
placeholder - the name of the item, can be null
child - the child whose location is requested
target - the item whose location is requested, this may be child
Returns:
the location of child

getPlaceholders

public bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders()
Specified by:
getPlaceholders in interface bibliothek.gui.dock.perspective.PerspectiveStation

setPlaceholders

public void setPlaceholders(bibliothek.gui.dock.station.support.PlaceholderMap placeholders)
Specified by:
setPlaceholders in interface bibliothek.gui.dock.perspective.PerspectiveStation

remove

public bibliothek.gui.dock.perspective.PerspectiveDockable remove(int index)
Removes the PerspectiveDockable which is stored at location index.

Parameters:
index - the index of the item to remove
Returns:
the item that was removed

remove

public boolean remove(bibliothek.gui.dock.perspective.PerspectiveDockable dockable)
Specified by:
remove in interface bibliothek.gui.dock.perspective.PerspectiveStation

replace

public void replace(bibliothek.gui.dock.perspective.PerspectiveDockable oldDockable,
                    bibliothek.gui.dock.perspective.PerspectiveDockable newDockable)
Specified by:
replace in interface bibliothek.gui.dock.perspective.PerspectiveStation

getPlaceholder

public bibliothek.util.Path getPlaceholder()
Specified by:
getPlaceholder in interface bibliothek.gui.dock.perspective.PerspectiveDockable

getParent

public bibliothek.gui.dock.perspective.PerspectiveStation getParent()
Specified by:
getParent in interface bibliothek.gui.dock.perspective.PerspectiveDockable

setParent

public void setParent(bibliothek.gui.dock.perspective.PerspectiveStation parent)
Specified by:
setParent in interface bibliothek.gui.dock.perspective.PerspectiveDockable