NASA World Wind

gov.nasa.worldwind.util.tree
Class BasicTreeLayout.NodeLayout

java.lang.Object
  extended by gov.nasa.worldwind.util.tree.BasicTreeLayout.NodeLayout
Enclosing class:
BasicTreeLayout

protected static class BasicTreeLayout.NodeLayout
extends Object

Class to hold information about how a tree node is laid out.


Field Summary
protected  Rectangle bounds
          Node bounds, relative to the bottom left corner of the tree.
protected  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  Rectangle pickBounds
           
protected  Rectangle pickScreenBounds
           
protected  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  String wrappedText
          Wrapped version of the node description text.
 
Constructor Summary
protected BasicTreeLayout.NodeLayout(TreeNode node)
          Create a new node layout.
 
Method Summary
protected  void reset(Point treePoint)
          Reset the draw point to the lower left corner of the node bounds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bounds

protected Rectangle bounds
Node bounds, relative to the bottom left corner of the tree.


drawPoint

protected 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.


node

protected TreeNode node
Node that this layout applies to.


numLines

protected int numLines
Number of lines of wrapped description text in this layout.


pickBounds

protected Rectangle pickBounds

pickScreenBounds

protected Rectangle pickScreenBounds

screenBounds

protected Rectangle screenBounds
Node bounds relative to the bottom left corner of the viewport. This field is set by reset(java.awt.Point).


textWrapWidth

protected int textWrapWidth
The width used to wrap the description text.


wrappedText

protected String wrappedText
Wrapped version of the node description text. Computed once and then cached here.

Constructor Detail

BasicTreeLayout.NodeLayout

protected BasicTreeLayout.NodeLayout(TreeNode node)
Create a new node layout.

Parameters:
node - Node that is being laid out.
Method Detail

reset

protected void reset(Point treePoint)
Reset the draw point to the lower left corner of the node bounds.

Parameters:
treePoint - location of the lower left corner of the tree, measured in GL coordinates (origin lower left corner of the screen).

NASA World Wind