Package gov.nasa.worldwind.util.tree
Class BasicTreeLayout.NodeLayout
- java.lang.Object
-
- gov.nasa.worldwind.util.tree.BasicTreeLayout.NodeLayout
-
- Enclosing class:
- BasicTreeLayout
protected static class BasicTreeLayout.NodeLayout extends java.lang.Object
Class to hold information about how a tree node is laid out.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.awt.Rectangle
bounds
Node bounds, relative to the bottom left corner of the tree.protected java.awt.Point
drawPoint
Point at which the next component should be drawn.protected TreeNode
node
Node that this layout applies to.protected int
numLines
Number of lines of wrapped description text in this layout.protected java.awt.Rectangle
pickBounds
protected java.awt.Rectangle
pickScreenBounds
protected java.awt.Rectangle
screenBounds
Node bounds relative to the bottom left corner of the viewport.protected int
textWrapWidth
The width used to wrap the description text.protected java.lang.String
wrappedText
Wrapped version of the node description text.
-
Constructor Summary
Constructors Modifier Constructor Description protected
NodeLayout(TreeNode node)
Create a new node layout.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
reset(java.awt.Point treePoint)
Reset the draw point to the lower left corner of the node bounds.
-
-
-
Field Detail
-
node
protected TreeNode node
Node that this layout applies to.
-
bounds
protected java.awt.Rectangle bounds
Node bounds, relative to the bottom left corner of the tree.
-
pickBounds
protected java.awt.Rectangle pickBounds
-
screenBounds
protected java.awt.Rectangle screenBounds
Node bounds relative to the bottom left corner of the viewport. This field is set byreset(java.awt.Point)
.
-
pickScreenBounds
protected java.awt.Rectangle pickScreenBounds
-
wrappedText
protected java.lang.String wrappedText
Wrapped version of the node description text. Computed once and then cached here.
-
textWrapWidth
protected int textWrapWidth
The width used to wrap the description text.
-
numLines
protected int numLines
Number of lines of wrapped description text in this layout.
-
drawPoint
protected java.awt.Point drawPoint
Point at which the next component should be drawn. Nodes are drawn left to right, and the draw point is updated as parts of the node are rendered. For example, the toggle triangle is drawn first at the draw point, and then the draw point is moved to the right by the width of the triangle, so the next component will draw at the correct point. The draw point is reset to the lower left corner of the node bounds before each render cycle.
-
-
Constructor Detail
-
NodeLayout
protected NodeLayout(TreeNode node)
Create a new node layout.- Parameters:
node
- Node that is being laid out.
-
-