com.partnersoft.v3x.apps.MapBrowser
Class MapTreeNode

java.lang.Object
  extended by com.partnersoft.v3x.apps.MapBrowser.MapPoint
      extended by com.partnersoft.v3x.apps.MapBrowser.MapTreeNode
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RedlineNode, StakingNode

public abstract class MapTreeNode
extends MapPoint

This is a MapPoint that can be used to create drawn trees of joined points.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.partnersoft.v3x.apps.MapBrowser.MapPoint
coords
 
Constructor Summary
MapTreeNode()
          Create a new, blank MapTreeNode.
MapTreeNode(Coord3D coord, MapTreeNode parent)
          Create a new MapTreeNode at coord with parent.
 
Method Summary
 void addChild(MapTreeNode newChild)
          Add a child to this point.
 java.util.Iterator children()
          Get the children of this point.
 boolean containsDescendent(MapTreeNode node)
           
 java.lang.Object deepCopy()
           
 java.util.Iterator descendents()
          Get all children, their children, etc.
 boolean formsLoop()
           
 java.lang.String getBackSpanDeflection()
          The deflection angle in degrees off the parent node.
 TurnVector getBackSpanVector()
          Returns a TurnVector representing the backspan (span to parent node).
 java.util.Set getChildrenSet()
           
 double getDistanceToParent()
          Distance in map units to the parent node.
 java.lang.String getFrontSpanDeflections()
          The backSpanDeflections of all the children.
 TurnVector getFrontSpanVector()
          Returns a TurnVector representing the frontspan (span to first child node).
 int getNumberOfChildren()
           
 MapTreeNode getParent()
          The parent node of this point; null if this is the root node.
 boolean hasChildren()
           
 boolean isLoopWith(MapTreeNode parentToBe)
           
 java.util.List<MapTreeNode> listAllConnectedNodes()
          Lists all nodes connected to this one, ancestors and descendents, including this one.
 java.util.List<MapTreeNode> listChildren()
           
 void remove()
          Removes current node from tree and database; children are assigned to parent.
 void removeChild(MapTreeNode victim)
          Remove a child.
 void setParent(MapTreeNode newParent)
          Set the parent node of this point.
 
Methods inherited from class com.partnersoft.v3x.apps.MapBrowser.MapPoint
clearGuid, copyFromExistingPoint, getCoords, getGuid, getPostprocessingPoint, getXyPoint, isSelected, paintOn, paintOn, setCoords, setGuid, setPostprocessingPoint, setSelected
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapTreeNode

public MapTreeNode(Coord3D coord,
                   MapTreeNode parent)
Create a new MapTreeNode at coord with parent.


MapTreeNode

public MapTreeNode()
Create a new, blank MapTreeNode.

Method Detail

hasChildren

public boolean hasChildren()

children

public java.util.Iterator children()
Get the children of this point.


listChildren

public java.util.List<MapTreeNode> listChildren()

descendents

public java.util.Iterator descendents()
Get all children, their children, etc.


remove

public void remove()
Removes current node from tree and database; children are assigned to parent.


addChild

public void addChild(MapTreeNode newChild)
Add a child to this point.


removeChild

public void removeChild(MapTreeNode victim)
Remove a child.


getParent

public MapTreeNode getParent()
The parent node of this point; null if this is the root node.


setParent

public void setParent(MapTreeNode newParent)
Set the parent node of this point.


getBackSpanVector

public TurnVector getBackSpanVector()
Returns a TurnVector representing the backspan (span to parent node).


getFrontSpanVector

public TurnVector getFrontSpanVector()
Returns a TurnVector representing the frontspan (span to first child node).


getDistanceToParent

public double getDistanceToParent()
Distance in map units to the parent node.


getBackSpanDeflection

public java.lang.String getBackSpanDeflection()
The deflection angle in degrees off the parent node. Uses AngleFormat.getGlobalDefault().


getFrontSpanDeflections

public java.lang.String getFrontSpanDeflections()
The backSpanDeflections of all the children.


deepCopy

public java.lang.Object deepCopy()

getChildrenSet

public java.util.Set getChildrenSet()

getNumberOfChildren

public int getNumberOfChildren()

isLoopWith

public boolean isLoopWith(MapTreeNode parentToBe)

formsLoop

public boolean formsLoop()

containsDescendent

public boolean containsDescendent(MapTreeNode node)

listAllConnectedNodes

public java.util.List<MapTreeNode> listAllConnectedNodes()
Lists all nodes connected to this one, ancestors and descendents, including this one.