com.hp.hpl.guess.piccolo
Class GuessShapeNode

java.lang.Object
  extended byedu.umd.cs.piccolo.PNode
      extended byedu.umd.cs.piccolo.nodes.PPath
          extended bycom.hp.hpl.guess.piccolo.GuessShapeNode
All Implemented Interfaces:
Cloneable, GraphElementListener, GuessPNode, NodeListener, Printable, Serializable
Direct Known Subclasses:
GuessShapeNode3D

public class GuessShapeNode
extends PPath
implements GuessPNode

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class edu.umd.cs.piccolo.PNode
PNode.PSceneGraphDelegate
 
Field Summary
 HashSet hulls
           
static int ZOOM_SIZE
           
 
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
GuessShapeNode(Shape aShape, Node owner, GFrame frame, int style)
           
 
Method Summary
 void addHullListener(ConvexHullNode chn)
           
static String[] breakupLines(String text)
           
 void centerDisplay()
           
 Object get(String field)
           
 Point2D[] getAllPorts()
           
 double getDrawHeight()
           
 double getDrawWidth()
           
 Node getOwner()
           
 Point2D[] getPrefPorts()
           
 int getStyle()
           
 void highlight(boolean state)
           
 void inTransition(double x, double y)
           
 void keyTyped(PInputEvent aEvent)
           
 void mouseClicked(PInputEvent aEvent)
           
 void mouseEntered(PInputEvent aEvent)
           
 void mouseExited(PInputEvent aEvent)
           
 void moveDone(double x, double y)
           
 void paint(PPaintContext apc)
           
 void paintLabel(Graphics2D g, float labelX, float labelY, Font font)
           
 void paintOverload(PPaintContext apc)
           
 void removeHullListener(ConvexHullNode chn)
           
 void set(String field, Object o)
           
 boolean setBounds(Rectangle2D newBounds)
           
 void setColor(Color c)
           
 void setLabel(String str)
           
 void setLabelVisible(boolean state)
           
 void setLocation(double x1, double y1)
           
 void setLocation(double x1, double y1, double width, double height)
           
 void setPaint(Color c)
           
 void setShape(int type)
           
 void setShape(Shape shp, int type)
           
 void setSize(double width, double height)
           
 void setStyle(int s)
           
 
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, 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, toString, 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.piccolo.GuessPNode
getHeight, getPaint, getWidth, getX, getY
 

Field Detail

ZOOM_SIZE

public static int ZOOM_SIZE

hulls

public HashSet hulls
Constructor Detail

GuessShapeNode

public GuessShapeNode(Shape aShape,
                      Node owner,
                      GFrame frame,
                      int style)
Method Detail

getOwner

public Node getOwner()
Specified by:
getOwner in interface GuessPNode

set

public void set(String field,
                Object o)
Specified by:
set in interface GraphElementListener

get

public Object get(String field)
Specified by:
get in interface GraphElementListener

getStyle

public int getStyle()
Specified by:
getStyle in interface GuessPNode

setStyle

public void setStyle(int s)
Specified by:
setStyle in interface GuessPNode

setBounds

public boolean setBounds(Rectangle2D newBounds)

setPaint

public void setPaint(Color c)

setColor

public void setColor(Color c)
Specified by:
setColor in interface GuessPNode

setShape

public void setShape(int type)

setShape

public void setShape(Shape shp,
                     int type)
Specified by:
setShape in interface GuessPNode

setLabel

public void setLabel(String str)

setLocation

public void setLocation(double x1,
                        double y1,
                        double width,
                        double height)
Specified by:
setLocation in interface NodeListener

setLocation

public void setLocation(double x1,
                        double y1)
Specified by:
setLocation in interface NodeListener

setSize

public void setSize(double width,
                    double height)

mouseEntered

public void mouseEntered(PInputEvent aEvent)
Specified by:
mouseEntered in interface GuessPNode

mouseExited

public void mouseExited(PInputEvent aEvent)
Specified by:
mouseExited in interface GuessPNode

highlight

public void highlight(boolean state)
Specified by:
highlight in interface GraphElementListener

setLabelVisible

public void setLabelVisible(boolean state)

breakupLines

public static String[] breakupLines(String text)

paintLabel

public void paintLabel(Graphics2D g,
                       float labelX,
                       float labelY,
                       Font font)

paintOverload

public void paintOverload(PPaintContext apc)

paint

public void paint(PPaintContext apc)

getDrawWidth

public double getDrawWidth()
Specified by:
getDrawWidth in interface GuessPNode

getDrawHeight

public double getDrawHeight()
Specified by:
getDrawHeight in interface GuessPNode

moveDone

public void moveDone(double x,
                     double y)
Specified by:
moveDone in interface GuessPNode

inTransition

public void inTransition(double x,
                         double y)
Specified by:
inTransition in interface GuessPNode

keyTyped

public void keyTyped(PInputEvent aEvent)

mouseClicked

public void mouseClicked(PInputEvent aEvent)
Specified by:
mouseClicked in interface GuessPNode

centerDisplay

public void centerDisplay()
Specified by:
centerDisplay in interface GuessPNode

addHullListener

public void addHullListener(ConvexHullNode chn)
Specified by:
addHullListener in interface GuessPNode

removeHullListener

public void removeHullListener(ConvexHullNode chn)
Specified by:
removeHullListener in interface GuessPNode

getAllPorts

public Point2D[] getAllPorts()
Specified by:
getAllPorts in interface GuessPNode

getPrefPorts

public Point2D[] getPrefPorts()
Specified by:
getPrefPorts in interface GuessPNode