ini.trakem2.display
Class AreaTree.AreaNode

java.lang.Object
  extended by ini.trakem2.display.Node<java.awt.geom.Area>
      extended by ini.trakem2.display.AreaTree.AreaNode
All Implemented Interfaces:
Taggable
Enclosing class:
AreaTree

public static final class AreaTree.AreaNode
extends Node<java.awt.geom.Area>


Nested Class Summary
 
Nested classes/interfaces inherited from class ini.trakem2.display.Node
Node.BranchAndEndNodeIterator<I>, Node.BranchNodeIterator<I>, Node.BreadthFirstSubtreeIterator<I>, Node.EndNodeIterator<I>, Node.FilteredIterator<I>, Node.NodeCollection<I>, Node.NodeIterator<I>, Node.Operation<I>, Node.SlabIterator<I>, Node.SubtreeIterator<I>
 
Field Summary
 
Fields inherited from class ini.trakem2.display.Node
children, color, confidence, FALSE, la, MAX_EDGE_CONFIDENCE, parent, TEST, TRUE, x, y
 
Fields inherited from interface ini.trakem2.display.Taggable
DASHED_STROKE, TAG_BACKGROUND
 
Constructor Summary
AreaTree.AreaNode(float lx, float ly, Layer la)
           
AreaTree.AreaNode(java.util.HashMap<java.lang.String,java.lang.String> attr)
          To reconstruct from XML, without a layer.
 
Method Summary
 void apply(mpicbg.models.CoordinateTransform ct, java.awt.geom.Area roi)
           
 void apply(VectorDataTransform vlocal)
           
 java.util.Collection<Displayable> findLinkTargets(java.awt.geom.AffineTransform aff)
          Returns a list of Patch to link, which lay under the node.
 java.awt.geom.Area getArea()
          Return Area in local coords.
 java.awt.geom.Area getData()
           
 java.awt.geom.Area getDataCopy()
           
 boolean intersects(java.awt.geom.Area a)
          Expects @param a in local coords.
 boolean isRoughlyInside(java.awt.Rectangle localbox)
          May return a false positive but never a false negative.
 Node<java.awt.geom.Area> newInstance(float lx, float ly, Layer layer)
           
 void paintData(java.awt.Graphics2D g, java.awt.Rectangle srcRect, Tree<java.awt.geom.Area> tree, java.awt.geom.AffineTransform to_screen, java.awt.Color cc, Layer active_layer)
           
protected  void paintHandle(java.awt.Graphics2D g, java.awt.Rectangle srcRect, double magnification, Tree<java.awt.geom.Area> t)
           
 boolean setData(java.awt.geom.Area area)
           
protected  void transformData(java.awt.geom.AffineTransform aff)
          Apply @param aff to the data, not to the x,y position.
 
Methods inherited from class ini.trakem2.display.Node
add, addTag, adjustConfidence, apply, applyToSlab, applyToSubtree, asPoint, clone, computeAllDegrees, computeDegree, copyProperties, findNextBranchOrEndPoint, findPath, findPreviousBranchOrRootPoint, getBranchAndEndNodes, getBranchNodes, getChildren, getChildrenCount, getChildrenNodes, getColor, getConfidence, getEdgeConfidence, getEdgeConfidence, getEndNodes, getLayer, getParent, getSlabNodes, getSubtreeNodes, getTags, getX, getY, hasChildren, hasSameTags, hasTag, paintHandle, remove, removeAllTags, removeTag, setColor, setConfidence, setLayer, toString, translate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AreaTree.AreaNode

public AreaTree.AreaNode(float lx,
                         float ly,
                         Layer la)

AreaTree.AreaNode

public AreaTree.AreaNode(java.util.HashMap<java.lang.String,java.lang.String> attr)
To reconstruct from XML, without a layer.

Method Detail

newInstance

public final Node<java.awt.geom.Area> newInstance(float lx,
                                                  float ly,
                                                  Layer layer)
Specified by:
newInstance in class Node<java.awt.geom.Area>

setData

public final boolean setData(java.awt.geom.Area area)
Specified by:
setData in class Node<java.awt.geom.Area>

getData

public final java.awt.geom.Area getData()
Specified by:
getData in class Node<java.awt.geom.Area>

getDataCopy

public final java.awt.geom.Area getDataCopy()
Specified by:
getDataCopy in class Node<java.awt.geom.Area>

getArea

public final java.awt.geom.Area getArea()
Return Area in local coords. The area includes a little square for the point, always.

Overrides:
getArea in class Node<java.awt.geom.Area>

paintData

public void paintData(java.awt.Graphics2D g,
                      java.awt.Rectangle srcRect,
                      Tree<java.awt.geom.Area> tree,
                      java.awt.geom.AffineTransform to_screen,
                      java.awt.Color cc,
                      Layer active_layer)
Specified by:
paintData in class Node<java.awt.geom.Area>

paintHandle

protected void paintHandle(java.awt.Graphics2D g,
                           java.awt.Rectangle srcRect,
                           double magnification,
                           Tree<java.awt.geom.Area> t)
Overrides:
paintHandle in class Node<java.awt.geom.Area>

intersects

public boolean intersects(java.awt.geom.Area a)
Expects @param a in local coords.

Specified by:
intersects in class Node<java.awt.geom.Area>

isRoughlyInside

public boolean isRoughlyInside(java.awt.Rectangle localbox)
Description copied from class: Node
May return a false positive but never a false negative. Checks only for itself and towards its parent.

Overrides:
isRoughlyInside in class Node<java.awt.geom.Area>

findLinkTargets

public java.util.Collection<Displayable> findLinkTargets(java.awt.geom.AffineTransform aff)
Description copied from class: Node
Returns a list of Patch to link, which lay under the node. Use the given @param aff to transform the Node data before looking up targets.

Overrides:
findLinkTargets in class Node<java.awt.geom.Area>

apply

public void apply(mpicbg.models.CoordinateTransform ct,
                  java.awt.geom.Area roi)
Overrides:
apply in class Node<java.awt.geom.Area>

apply

public void apply(VectorDataTransform vlocal)
Overrides:
apply in class Node<java.awt.geom.Area>

transformData

protected void transformData(java.awt.geom.AffineTransform aff)
Description copied from class: Node
Apply @param aff to the data, not to the x,y position.

Overrides:
transformData in class Node<java.awt.geom.Area>