bibliothek.gui.dock.layout
Interface LocationEstimationMap

All Known Implementing Classes:
DefaultLocationEstimationMap

public interface LocationEstimationMap

A map used for DockFactory, telling what children a DockElement has.
This map is also a list of DockLayoutInfos. The element at index in this list matches the Dockable that was stored with key index in the map of DockConverter.getLayout(DockElement, java.util.Map).

Author:
Benjamin Sigg

Method Summary
 DockLayoutInfo getChild(int childIndex)
          Gets the DockLayoutInfo that is associated with key childIndex.
 int getChildCount()
          Gets the number of children of this map
 DockLayoutInfo getSubChild(int childIndex, int subChildIndex)
          Gets the subChildIndex'th child of childIndex.
 int getSubChildCount(int childIndex)
          Gets the number of children the item childIndex has.
 void setLocation(int childIndex, DockableProperty location)
          Informs this map that the jump from this station to childIndex can be described by location.
 void setLocation(int childIndex, int subChildIndex, DockableProperty location)
          Informs this map that the path to child childIndex, subChildIndex contains location.
 

Method Detail

getChildCount

int getChildCount()
Gets the number of children of this map

Returns:
the total number of keys

getChild

DockLayoutInfo getChild(int childIndex)
Gets the DockLayoutInfo that is associated with key childIndex.

Parameters:
childIndex - some key between 0 and getChildCount()
Returns:
the info, not null

getSubChildCount

int getSubChildCount(int childIndex)
Gets the number of children the item childIndex has.

Parameters:
childIndex - the key of some element
Returns:
the number of children of childIndex

getSubChild

DockLayoutInfo getSubChild(int childIndex,
                           int subChildIndex)
Gets the subChildIndex'th child of childIndex.

Parameters:
childIndex - the key to some child
subChildIndex - the index of some child of childIndex
Returns:
the info, not null

setLocation

void setLocation(int childIndex,
                 DockableProperty location)
Informs this map that the jump from this station to childIndex can be described by location.

Parameters:
childIndex - the key of some child
location - the location of childIndex, null will be ignored

setLocation

void setLocation(int childIndex,
                 int subChildIndex,
                 DockableProperty location)
Informs this map that the path to child childIndex, subChildIndex contains location. The part location describes the jump from this station to the child childIndex.

Parameters:
childIndex - the key of some child
subChildIndex - the index of some grand-child
location - the location, null will be ignored