bibliothek.gui.dock.station.toolbar
Class ToolbarDockPerspective

java.lang.Object
  extended by bibliothek.gui.dock.station.toolbar.ListDockableStationPerspective
      extended by bibliothek.gui.dock.station.toolbar.ToolbarDockPerspective
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>

public class ToolbarDockPerspective
extends ListDockableStationPerspective

A PerspectiveStation representing a ToolbarDockStation.

Author:
Benjamin Sigg

Constructor Summary
ToolbarDockPerspective()
          Creates a new, empty station.
ToolbarDockPerspective(ToolbarDockStationLayout layout, Map<Integer,bibliothek.gui.dock.perspective.PerspectiveDockable> children)
          Creates a new station.
 
Method Summary
protected  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 ListDockableStationPerspective.getDockableProperty(PerspectiveDockable, PerspectiveDockable), returns a new DockableProperty which matches the location described by index and placeholder.
 ExpandedState getExpandedState()
          Gets the preferred size of this station.
 String getFactoryID()
           
 bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders(Map<bibliothek.gui.dock.perspective.PerspectiveDockable,Integer> children)
          Converts the list of children of this perspective into a PlaceholderMap.
 void read(ToolbarDockStationLayout layout, Map<Integer,bibliothek.gui.dock.perspective.PerspectiveDockable> children)
          Updates the layout of this station.
 void setExpandedState(ExpandedState state)
          Sets the preferred size of this station.
 
Methods inherited from class bibliothek.gui.dock.station.toolbar.ListDockableStationPerspective
add, add, asDockable, asStation, getDockable, getDockableCount, getDockableProperty, getDockables, getParent, getPlaceholder, getPlaceholders, indexOf, remove, remove, replace, setDockables, setParent, setPlaceholders
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToolbarDockPerspective

public ToolbarDockPerspective()
Creates a new, empty station.


ToolbarDockPerspective

public ToolbarDockPerspective(ToolbarDockStationLayout layout,
                              Map<Integer,bibliothek.gui.dock.perspective.PerspectiveDockable> children)
Creates a new station.

Parameters:
layout - the layout of the station
children - the children of the station
Method Detail

read

public void read(ToolbarDockStationLayout layout,
                 Map<Integer,bibliothek.gui.dock.perspective.PerspectiveDockable> children)
Updates the layout of this station.

Parameters:
layout - the new layout
children - the new children

getPlaceholders

public bibliothek.gui.dock.station.support.PlaceholderMap getPlaceholders(Map<bibliothek.gui.dock.perspective.PerspectiveDockable,Integer> children)
Converts the list of children of this perspective into a PlaceholderMap.

Parameters:
children - the unique identifier of each child
Returns:
the map of children

getFactoryID

public String getFactoryID()

setExpandedState

public void setExpandedState(ExpandedState state)
Sets the preferred size of this station.

Parameters:
state - the preferred size, not null

getExpandedState

public ExpandedState getExpandedState()
Gets the preferred size of this station.

Returns:
the preferred size, not null

getDockableProperty

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

Specified by:
getDockableProperty in class ListDockableStationPerspective
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