Class AbstractTreeLocation
java.lang.Object
bibliothek.gui.dock.common.CLocation
bibliothek.gui.dock.common.location.AbstractStackholdingLocation
bibliothek.gui.dock.common.location.AbstractTreeLocation
- Direct Known Subclasses:
TreeLocationNode,TreeLocationRoot
A location that is child of the "normalized"-area, and describing a turn
in a path leading to the final element. A turn divides the basic rectangle
along a vertical or horizontal line, and continues the search in one of the
newly created, smaller rectangles.
- Author:
- Benjamin Sigg
-
Constructor Summary
ConstructorsConstructorDescriptionAbstractTreeLocation(double size, Side side, long nodeId) Creates a new location. -
Method Summary
Modifier and TypeMethodDescriptionaside()Deprecated.east(double size) Creates a new location which is based at the east side of this location.east(double size, long nodeId) Creates a new location which is based at the east side of this location.findMode()Gets the mode this location represents.protected abstract SplitDockPathPropertyAsks the parent, or in the case of the root creates, theDockablePropertydescribing the this location.findProperty(DockableProperty successor) Gets a path describing this location in terms of the DockingFrames.longGets the identifier of the node represented by this location.getSide()Given the rectangle yield by the parent-location, this property tells which part the rectangle yield by this location occupies.doublegetSize()Gets the size of this location.leaf(long leafId) Creates a new leaf of this path.north(double size) Creates a new location which is based at the north side of this location.north(double size, long nodeId) Creates a new location which is based at the north side of this location.south(double size) Creates a new location which is based at the south side of this location.south(double size, long nodeId) Creates a new location which is based at the south side of this location.toString()west(double size) Creates a new location which is based at the west side of this location.west(double size, long nodeId) Creates a new location which is based at the west side of this location.Methods inherited from class bibliothek.gui.dock.common.location.AbstractStackholdingLocation
stack, stackMethods inherited from class bibliothek.gui.dock.common.CLocation
base, base, equals, expandProperty, expandProperty, external, findProperty, findRoot, getParent, hashCode, maximized, maximized, maximized, maximized, minimized, minimized, normalized, working
-
Constructor Details
-
AbstractTreeLocation
Creates a new location.- Parameters:
size- the size of this location, the parent-location is taken and the area of the rectangle that location yields multiplied bysizegives the area of the rectangle yield by this location.side- given the rectangle yield by the parent-location, this parameters tells which part the rectangle yield by this location occupies.nodeId- a unique identifier for the node represented by this location, can be -1
-
-
Method Details
-
getSide
Given the rectangle yield by the parent-location, this property tells which part the rectangle yield by this location occupies.- Returns:
- the side
-
getSize
public double getSize()Gets the size of this location. The parent-location is taken and the area of the rectangle that location yields multiplied bysizegives the area of the rectangle yield by this location.- Returns:
- the relative size
-
getNodeId
public long getNodeId()Gets the identifier of the node represented by this location.- Returns:
- the identifier or -1 is not set
-
north
Creates a new location which is based at the north side of this location.- Parameters:
size- the relative size, a number between 0 and 1- Returns:
- the new location
-
north
Creates a new location which is based at the north side of this location.- Parameters:
size- the relative size, a number between 0 and 1nodeId- the unique identifier of the new node, can be -1- Returns:
- the new location
-
south
Creates a new location which is based at the south side of this location.- Parameters:
size- the relative size, a number between 0 and 1- Returns:
- the new location
-
south
Creates a new location which is based at the south side of this location.- Parameters:
size- the relative size, a number between 0 and 1nodeId- the unique identifier of the new node, can be -1- Returns:
- the new location
-
east
Creates a new location which is based at the east side of this location.- Parameters:
size- the relative size, a number between 0 and 1- Returns:
- the new location
-
east
Creates a new location which is based at the east side of this location.- Parameters:
size- the relative size, a number between 0 and 1nodeId- the unique identifier of the new node, can be -1- Returns:
- the new location
-
west
Creates a new location which is based at the west side of this location.- Parameters:
size- the relative size, a number between 0 and 1- Returns:
- the new location
-
west
Creates a new location which is based at the west side of this location.- Parameters:
size- the relative size, a number between 0 and 1nodeId- the unique identifier of the new node, can be -1- Returns:
- the new location
-
leaf
Creates a new leaf of this path.- Parameters:
leafId- the unique identifier of the leaf, can be -1- Returns:
- the new leaf
-
findMode
Description copied from class:CLocationGets the mode this location represents. -
findParentProperty
Asks the parent, or in the case of the root creates, theDockablePropertydescribing the this location.- Returns:
- the property
-
findProperty
Description copied from class:CLocationGets a path describing this location in terms of the DockingFrames.- Specified by:
findPropertyin classCLocation- Parameters:
successor- the path of the elements above this location ornull- Returns:
- the path to this location or
null, can also besuccessor
-
aside
Deprecated.seeCLocation.aside()for an explanation.Description copied from class:CLocationReturns aCLocationthat describes the location of an element that should be inserted next to this location. -
toString
-
CLocation.aside()for an explanation.