public class DefaultLocationEstimationMap extends Object implements LocationEstimationMap
LocationEstimationMap works directly with the tree built
by DockLayoutCompositions. It is to be used as follows:DockLayoutComposition.subMap(int) until a leaf is reached.setLocation-methods.finish() once all locations for a node is set.| Constructor and Description |
|---|
DefaultLocationEstimationMap(DockLayoutComposition root)
Creates a new map
|
| Modifier and Type | Method and Description |
|---|---|
void |
finish()
Closes up this node.
|
DockLayoutInfo |
getChild(int childIndex)
Gets the
DockLayoutInfo that is associated with key childIndex. |
int |
getChildCount()
Gets the number of children of this map
|
DockLayoutComposition |
getRoot()
Gets the element which is represented by 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 |
prepare()
Prepares this map for estimating locations.
|
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. |
DefaultLocationEstimationMap |
subMap(int childIndex)
Returns a newly created map that centers around the child with index
childIndex. |
public DefaultLocationEstimationMap(DockLayoutComposition root)
root - the representation of this stationpublic void prepare()
finish().public DefaultLocationEstimationMap subMap(int childIndex)
childIndex.childIndex - the index of the childpublic DockLayoutComposition getRoot()
public void finish()
prepare()public int getChildCount()
LocationEstimationMapgetChildCount in interface LocationEstimationMappublic DockLayoutInfo getChild(int childIndex)
LocationEstimationMapDockLayoutInfo that is associated with key childIndex.getChild in interface LocationEstimationMapchildIndex - some key between 0 and LocationEstimationMap.getChildCount()nullpublic int getSubChildCount(int childIndex)
LocationEstimationMapchildIndex has. This includes direct
children and grand-children.getSubChildCount in interface LocationEstimationMapchildIndex - the key of some elementchildIndexpublic DockLayoutInfo getSubChild(int childIndex, int subChildIndex)
LocationEstimationMapsubChildIndex'th child of childIndex. This includes direct
children and grand-children.getSubChild in interface LocationEstimationMapchildIndex - the key to some childsubChildIndex - the index of some child of childIndexnullpublic void setLocation(int childIndex,
DockableProperty location)
LocationEstimationMapchildIndex can be described
by location.setLocation in interface LocationEstimationMapchildIndex - the key of some childlocation - the location of childIndex, null will be ignoredpublic void setLocation(int childIndex,
int subChildIndex,
DockableProperty location)
LocationEstimationMapchildIndex, subChildIndex contains
location. The part location describes the jump from this
station to the child childIndex.setLocation in interface LocationEstimationMapchildIndex - the key of some childsubChildIndex - the index of some grand-childlocation - the location, null will be ignoredCopyright © 2017 Docking Frames. All rights reserved.