com.hp.hpl.guess.piccolo
Class ConvexHullNode

java.lang.Object
  extended byedu.umd.cs.piccolo.PNode
      extended byedu.umd.cs.piccolo.nodes.PPath
          extended bycom.hp.hpl.guess.piccolo.ConvexHullNode
All Implemented Interfaces:
Cloneable, ConvexHull, Printable, Serializable

public class ConvexHullNode
extends PPath
implements ConvexHull

See Also:
Serialized Form

Nested Class Summary
static class ConvexHullNode.HullNode
           
 
Nested classes inherited from class edu.umd.cs.piccolo.PNode
PNode.PSceneGraphDelegate
 
Field Summary
static int ELLIPSE
           
static int RECTANGLE
           
static int REGULAR
           
static int ROUNDED_RECTANGLE
           
 
Fields inherited from class edu.umd.cs.piccolo.nodes.PPath
PROPERTY_CODE_PATH, PROPERTY_CODE_STROKE, PROPERTY_CODE_STROKE_PAINT, PROPERTY_PATH, PROPERTY_STROKE, PROPERTY_STROKE_PAINT
 
Fields inherited from class edu.umd.cs.piccolo.PNode
PROPERTY_BOUNDS, PROPERTY_CHILDREN, PROPERTY_CHILDREN_PICKABLE, PROPERTY_CLIENT_PROPERTIES, PROPERTY_CODE_BOUNDS, PROPERTY_CODE_CHILDREN, PROPERTY_CODE_CHILDREN_PICKABLE, PROPERTY_CODE_CLIENT_PROPERTIES, PROPERTY_CODE_FULL_BOUNDS, PROPERTY_CODE_PAINT, PROPERTY_CODE_PARENT, PROPERTY_CODE_PICKABLE, PROPERTY_CODE_TRANSFORM, PROPERTY_CODE_TRANSPARENCY, PROPERTY_CODE_VISIBLE, PROPERTY_FULL_BOUNDS, PROPERTY_PAINT, PROPERTY_PARENT, PROPERTY_PICKABLE, PROPERTY_TRANSFORM, PROPERTY_TRANSPARENCY, PROPERTY_VISIBLE, SCENE_GRAPH_DELEGATE
 
Fields inherited from interface java.awt.print.Printable
NO_SUCH_PAGE, PAGE_EXISTS
 
Constructor Summary
ConvexHullNode(Collection nds, Color c)
           
 
Method Summary
 void addNode(Node n)
          adds a node from the hull
 void addNodes(Collection s)
          adds the nodes to the hull
static Node[] convexHull(List nodes)
           
 void destroyHull()
           
 Color getColor()
          gets the color
 Collection getNodes()
          get the nodes in this hull
 float[] getX3()
           
 float[] getY3()
           
static boolean isLeft(ConvexHullNode.HullNode p0, ConvexHullNode.HullNode p1, ConvexHullNode.HullNode p2)
           
 void nodeMoved(PNode moved)
           
 void removeNode(Node n)
          remove nodes from the hull
 void removeNodes(Collection s)
          remove nodes from the hull
 void setColor(Color c)
          sets the color
 void setFrozen(boolean state)
           
 void setStyle(int style)
           
 String toString()
           
 
Methods inherited from class edu.umd.cs.piccolo.nodes.PPath
append, closePath, createEllipse, createLine, createPolyline, createPolyline, createRectangle, curveTo, endResizeBounds, getPathBoundsWithStroke, getPathReference, getStroke, getStrokePaint, intersects, lineTo, moveTo, quadTo, reset, setPathTo, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setStroke, setStrokePaint, startResizeBounds, updateBoundsFromPath
 
Methods inherited from class edu.umd.cs.piccolo.PNode
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, findIntersectingNodes, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsReference, getChild, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsReference, getGlobalBounds, getGlobalFullBounds, getGlobalRotation, getGlobalScale, getGlobalToLocalTransform, getGlobalTranslation, getHeight, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getOccluded, getOffset, getPaint, getPaintInvalid, getParent, getPickable, getPropertyChangeParentMask, getRoot, getRotation, getScale, getTransform, getTransformReference, getTransparency, getUnionOfChildrenBounds, getVisible, getWidth, getX, getXOffset, getY, getYOffset, globalToLocal, globalToLocal, globalToLocal, indexOfChild, invalidateFullBounds, invalidateLayout, invalidatePaint, isAncestorOf, isDescendentOf, isDescendentOfRoot, isOpaque, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, parentToLocal, parentToLocal, parentToLocal, position, print, print, removeAllChildren, removeChild, removeChild, removeChildren, removeFromParent, removeInputEventListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaintFrom, reparent, replaceWith, resetBounds, rotate, rotateAboutPoint, rotateAboutPoint, rotateInPlace, scale, scaleAboutPoint, scaleAboutPoint, setBounds, setBounds, setChildPaintInvalid, setChildrenPickable, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setParent, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, toImage, toImage, toImage, transformBy, translate, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.hp.hpl.guess.ui.ConvexHull
getVisible, setVisible
 

Field Detail

REGULAR

public static final int REGULAR
See Also:
Constant Field Values

ROUNDED_RECTANGLE

public static final int ROUNDED_RECTANGLE
See Also:
Constant Field Values

RECTANGLE

public static final int RECTANGLE
See Also:
Constant Field Values

ELLIPSE

public static final int ELLIPSE
See Also:
Constant Field Values
Constructor Detail

ConvexHullNode

public ConvexHullNode(Collection nds,
                      Color c)
Method Detail

getX3

public float[] getX3()

getY3

public float[] getY3()

setFrozen

public void setFrozen(boolean state)

toString

public String toString()

addNodes

public void addNodes(Collection s)
adds the nodes to the hull

Specified by:
addNodes in interface ConvexHull

removeNodes

public void removeNodes(Collection s)
remove nodes from the hull

Specified by:
removeNodes in interface ConvexHull

addNode

public void addNode(Node n)
adds a node from the hull

Specified by:
addNode in interface ConvexHull

removeNode

public void removeNode(Node n)
remove nodes from the hull

Specified by:
removeNode in interface ConvexHull

destroyHull

public void destroyHull()

getNodes

public Collection getNodes()
get the nodes in this hull

Specified by:
getNodes in interface ConvexHull

setColor

public void setColor(Color c)
sets the color

Specified by:
setColor in interface ConvexHull

getColor

public Color getColor()
gets the color

Specified by:
getColor in interface ConvexHull

setStyle

public void setStyle(int style)

nodeMoved

public void nodeMoved(PNode moved)

convexHull

public static Node[] convexHull(List nodes)

isLeft

public static boolean isLeft(ConvexHullNode.HullNode p0,
                             ConvexHullNode.HullNode p1,
                             ConvexHullNode.HullNode p2)