ini.trakem2.display
Class Treeline

java.lang.Object
  extended by ini.trakem2.persistence.DBObject
      extended by ini.trakem2.display.Displayable
          extended by ini.trakem2.display.ZDisplayable
              extended by ini.trakem2.display.Tree<java.lang.Float>
                  extended by ini.trakem2.display.Treeline
All Implemented Interfaces:
Paintable, VectorData
Direct Known Subclasses:
Connector

public class Treeline
extends Tree<java.lang.Float>


Nested Class Summary
static class Treeline.RadiusNode
           
 
Nested classes/interfaces inherited from class ini.trakem2.display.Tree
Tree.MeasurePathDistance<I>, Tree.MeshData
 
Nested classes/interfaces inherited from class ini.trakem2.display.Displayable
Displayable.DataPackage, Displayable.DoEdit, Displayable.DoEdits, Displayable.DoTransforms, Displayable.SliderListener
 
Field Summary
protected static float last_radius
           
 
Fields inherited from class ini.trakem2.display.Tree
end_nodes, node_layer_map, root
 
Fields inherited from class ini.trakem2.display.ZDisplayable
layer_set
 
Fields inherited from class ini.trakem2.display.Displayable
alpha, annotation, at, color, COMPOSITE_ADD, COMPOSITE_COLOR_YCBCR, COMPOSITE_DIFFERENCE, COMPOSITE_MULTIPLY, COMPOSITE_NORMAL, COMPOSITE_SUBTRACT, compositeModes, height, hs_linked, last_color, layer, linked_props, linked_props_origins, locked, props, TAG_ATTR1, TAG_ATTR2, title, visible, width
 
Fields inherited from class ini.trakem2.persistence.DBObject
id, project
 
Constructor Summary
Treeline(Project project, long id, java.util.HashMap<java.lang.String,java.lang.String> ht_attr, java.util.HashMap<Displayable,java.lang.String> ht_links)
          Reconstruct from XML.
Treeline(Project project, long id, java.lang.String title, float width, float height, float alpha, boolean visible, java.awt.Color color, boolean locked, java.awt.geom.AffineTransform at)
          For cloning purposes, does not call addToDatabase()
Treeline(Project project, java.lang.String title)
           
 
Method Summary
protected  Node<java.lang.Float> adjustNodeRadius(float inc, float x, float y, Layer layer, DisplayCanvas dc)
           
 Treeline clone(Project pr, boolean copy_id)
          Performs a deep copy of this object, obtaining its unique id either from the given project or the exact same as this object's id.
static void exportDTD(java.lang.StringBuilder sb_header, java.util.HashSet<java.lang.String> hs, java.lang.String indent)
           
protected  boolean exportXMLNodeAttributes(java.lang.StringBuilder indent, java.lang.StringBuilder sb, Node<java.lang.Float> node)
          Export the radius only if it is larger than zero.
protected  boolean exportXMLNodeData(java.lang.StringBuilder indent, java.lang.StringBuilder sb, Node<java.lang.Float> node)
           
 Tree.MeshData generateMesh(double scale_, int parallels)
          Returns a list of two lists: the List and the corresponding List.
protected  java.awt.Rectangle getBounds(java.util.Collection<Node<java.lang.Float>> nodes)
           
 void keyPressed(java.awt.event.KeyEvent ke)
           
 void mouseDragged(java.awt.event.MouseEvent me, Layer la, int x_p, int y_p, int x_d, int y_d, int x_d_old, int y_d_old)
           
 void mousePressed(java.awt.event.MouseEvent me, Layer la, int x_p, int y_p, double mag)
           
 void mouseReleased(java.awt.event.MouseEvent me, Layer la, int x_p, int y_p, int x_d, int y_d, int x_r, int y_r)
           
 void mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
          Does nothing unless overriden.
 Tree<java.lang.Float> newInstance()
          Create a new instance, intialized with same ZDisplayable-level parameters (affine, color, title, etc.).
 Node<java.lang.Float> newNode(float lx, float ly, Layer la, Node<?> modelNode)
           
 Node<java.lang.Float> newNode(java.util.HashMap<java.lang.String,java.lang.String> ht_attr)
          To reconstruct from XML.
protected  boolean requireAltDownToEditRadius()
           
 
Methods inherited from class ini.trakem2.display.Tree
addNode, addToLinkLater, adjustEdgeConfidence, apply, apply, asVertices, cacheSubtree, calculateBoundingBox, canJoin, clearCache, clearState, computeAllDegrees, computeCentrality, contains, copyAs, createCoordinate, createMultiTableView, createNewNode, createReviewStack, crop, deselect, destroy, duplicateAs, exportXML, findClosestNode, findClosestNodeW, findClosestNodeW, findConnectors, findFirstIntersectingNode, findIntersecting, findNearAndGetNext, findNearAndGetPrevious, findNearestEdge, findNearestEndNode, findNearestNode, findNextBranchOrEndPoint, findNode, findNodeNear, findNodeNear, findPreviousBranchOrRootPoint, findTags, fireNodeRemoved, fix, flyThrough, flyThroughMarked, generateAllReviewStacks, generateRegions, generateReviewStackForSlab, generateReviewStackForSlab, generateSkeleton, generateSubtreeReviewStacks, generateSubtreeReviewStacks, generateTriangles, getActive, getAreaAt, getBounds, getBranchAndEndNodes, getBranchNodes, getEndNodes, getFirstLayer, getLastAdded, getLastEdited, getLastVisited, getLayerIds, getLayersWithData, getMarked, getNodesToPaint, getNodesToPaint, getOriginPoint, getPaintingBounds, getRoot, getShortTitle, insertNode, intersects, intersects, intersects, isAnyNear, isDeletable, isRoughlyInside, isTagging, join, layerRemoved, linkPatches, markNear, measure, measurePathDistance, measurePathDistance, paint, paint, paintsAt, paintSnapshot, popNode, remove2, removeFromLinkLater, removeNode, removeReviews, repaint, reRoot, reRoot, setActive, setEdgeConfidence, setLastAdded, setLastEdited, setLastMarked, setLastVisited, setRoot, splitAt, splitNear, toClosestPaintedNode, unmark, updateView, updateViewData
 
Methods inherited from class ini.trakem2.display.ZDisplayable
exportDTD, getBucketable, getLayerSet, remove, setColor, setLayer, setLayerSet, setLayerSet, setPosition, setVisible, softRemove, transformPoints, updateBucket, updateBucket
 
Methods inherited from class ini.trakem2.display.Displayable
adjustProperties, areThereLayerCrossLinks, canSendTo, clone, clone, commonDTDChildren, contains, displacePoints, exportSVG, findById, findNearestPoint, findNearestPoint, getAffineTransform, getAffineTransformCopy, getAlpha, getAnnotation, getArea, getAreaForBucket, getBoundingBox, getBoundingBox, getBoundingBox, getBounds, getColor, getComposite, getComposite, getCompositeMode, getHeight, getIntersection, getLayer, getLinked, getLinked, getLinkedBox, getLinkedGroup, getLinkedProperties, getLinkedProperties, getLinkedProperty, getLinkedProperty, getMinimalBoundingBox, getNameId, getPerimeter, getPerimeter, getProperties, getProperty, getProperty, getTitle, getWidth, getX, getXMLSafeValue, getXMLSafeValue, getY, hasLinkedGroupWithinLayer, hasProperties, intersects, intersects, inverseTransformPoint, isLinked, isLinked, isLinked, isLocked, isLocked2, isOnlyLinkedTo, isOnlyLinkedTo, isOutOfRepaintingClip, isOutOfRepaintingClip, isVisible, link, link, makeAdjustPropertiesDialog, paintAsBox, paintOffscreen, prePaint, preTransform, processAdjustPropertiesDialog, removeLinkedProperties, removeLinkedPropertiesFromOrigins, repaint, restXML, rotate, rotate, rotatePoints, scale, scale, scalePoints, setAffineTransform, setAlpha, setAlpha, setAnnotation, setCompositeMode, setDimensions, setDimensions, setLayer, setLinkedProperties, setLinkedProperty, setLocation, setLocked, setProperty, setTitle, setVisible, snapTo, toString, transform, transformPoint, transformPoint, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformPoints, transformRectangle, translate, translate, unlink, unlink, unlinkAll, updateInDatabase, xmlError, xmlError
 
Methods inherited from class ini.trakem2.persistence.DBObject
addToDatabase, getId, getInfo, getProject, getUniqueIdentifier, removeFromDatabase, updateInDatabase
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

last_radius

protected static float last_radius
Constructor Detail

Treeline

public Treeline(Project project,
                java.lang.String title)

Treeline

public Treeline(Project project,
                long id,
                java.util.HashMap<java.lang.String,java.lang.String> ht_attr,
                java.util.HashMap<Displayable,java.lang.String> ht_links)
Reconstruct from XML.


Treeline

public Treeline(Project project,
                long id,
                java.lang.String title,
                float width,
                float height,
                float alpha,
                boolean visible,
                java.awt.Color color,
                boolean locked,
                java.awt.geom.AffineTransform at)
For cloning purposes, does not call addToDatabase()

Method Detail

newInstance

public Tree<java.lang.Float> newInstance()
Description copied from class: Tree
Create a new instance, intialized with same ZDisplayable-level parameters (affine, color, title, etc.).

Specified by:
newInstance in class Tree<java.lang.Float>

newNode

public Node<java.lang.Float> newNode(float lx,
                                     float ly,
                                     Layer la,
                                     Node<?> modelNode)
Specified by:
newNode in class Tree<java.lang.Float>

newNode

public Node<java.lang.Float> newNode(java.util.HashMap<java.lang.String,java.lang.String> ht_attr)
Description copied from class: Tree
To reconstruct from XML.

Specified by:
newNode in class Tree<java.lang.Float>

clone

public Treeline clone(Project pr,
                      boolean copy_id)
Description copied from class: Displayable
Performs a deep copy of this object, obtaining its unique id either from the given project or the exact same as this object's id. The visibility, though, is set to true at all times.

Specified by:
clone in class Displayable

mousePressed

public void mousePressed(java.awt.event.MouseEvent me,
                         Layer la,
                         int x_p,
                         int y_p,
                         double mag)
Overrides:
mousePressed in class Tree<java.lang.Float>

requireAltDownToEditRadius

protected boolean requireAltDownToEditRadius()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me,
                         Layer la,
                         int x_p,
                         int y_p,
                         int x_d,
                         int y_d,
                         int x_d_old,
                         int y_d_old)
Overrides:
mouseDragged in class Tree<java.lang.Float>

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me,
                          Layer la,
                          int x_p,
                          int y_p,
                          int x_d,
                          int y_d,
                          int x_r,
                          int y_r)
Overrides:
mouseReleased in class Tree<java.lang.Float>

mouseWheelMoved

public void mouseWheelMoved(java.awt.event.MouseWheelEvent mwe)
Description copied from class: Displayable
Does nothing unless overriden.

Overrides:
mouseWheelMoved in class Tree<java.lang.Float>

adjustNodeRadius

protected Node<java.lang.Float> adjustNodeRadius(float inc,
                                                 float x,
                                                 float y,
                                                 Layer layer,
                                                 DisplayCanvas dc)

exportDTD

public static void exportDTD(java.lang.StringBuilder sb_header,
                             java.util.HashSet<java.lang.String> hs,
                             java.lang.String indent)

exportXMLNodeAttributes

protected boolean exportXMLNodeAttributes(java.lang.StringBuilder indent,
                                          java.lang.StringBuilder sb,
                                          Node<java.lang.Float> node)
Export the radius only if it is larger than zero.

Specified by:
exportXMLNodeAttributes in class Tree<java.lang.Float>

exportXMLNodeData

protected boolean exportXMLNodeData(java.lang.StringBuilder indent,
                                    java.lang.StringBuilder sb,
                                    Node<java.lang.Float> node)
Specified by:
exportXMLNodeData in class Tree<java.lang.Float>

generateMesh

public Tree.MeshData generateMesh(double scale_,
                                  int parallels)
Returns a list of two lists: the List and the corresponding List.


keyPressed

public void keyPressed(java.awt.event.KeyEvent ke)
Overrides:
keyPressed in class Tree<java.lang.Float>

getBounds

protected java.awt.Rectangle getBounds(java.util.Collection<Node<java.lang.Float>> nodes)
Overrides:
getBounds in class Tree<java.lang.Float>