edu.umd.cs.piccolox.swt
Class PSWTHandle

java.lang.Object
  extended by edu.umd.cs.piccolo.PNode
      extended by edu.umd.cs.piccolox.swt.PSWTPath
          extended by edu.umd.cs.piccolox.swt.PSWTHandle
All Implemented Interfaces:
java.awt.print.Printable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
PSWTBoundsHandle

public class PSWTHandle
extends PSWTPath

PHandle is used to modify some aspect of Piccolo when it is dragged. Each handle has a PLocator that it uses to automatically position itself. See PBoundsHandle for an example of a handle that resizes the bounds of another node.

Version:
1.0
Author:
Jesse Grosjean
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode
PNode.PSceneGraphDelegate
 
Field Summary
static java.awt.Color DEFAULT_COLOR
           
static java.awt.Shape DEFAULT_HANDLE_SHAPE
           
static float DEFAULT_HANDLE_SIZE
           
 
Fields inherited from class edu.umd.cs.piccolox.swt.PSWTPath
PROPERTY_SHAPE
 
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
PSWTHandle(PLocator aLocator)
          Construct a new handle that will use the given locator to locate itself on its parent node.
 
Method Summary
 void dragHandle(PDimension aLocalDimension, PInputEvent aEvent)
          Override this method to get notified as the handle is dragged.
 void endHandleDrag(java.awt.geom.Point2D aLocalPoint, PInputEvent aEvent)
          Override this method to get notified when the handle stops getting dragged.
 PDragSequenceEventHandler getHandleDraggerHandler()
          Return the event handler that is responsible for the drag handle interaction.
 PLocator getLocator()
          Get the locator that this handle uses to position itself on its parent node.
protected  void installHandleEventHandlers()
           
 void parentBoundsChanged()
          A notification that the bounds of this node's parent have changed.
 void relocateHandle()
          Force this handle to relocate itself using its locator.
 void setLocator(PLocator aLocator)
          Set the locator that this handle uses to position itself on its parent node.
 void setParent(PNode newParent)
          Set the parent of this node.
 void startHandleDrag(java.awt.geom.Point2D aLocalPoint, PInputEvent aEvent)
          Override this method to get notified when the handle starts to get dragged.
 
Methods inherited from class edu.umd.cs.piccolox.swt.PSWTPath
cloneShape, createEllipse, createPolyline, createPolyline, createRectangle, getStrokePaint, internalUpdateBounds, intersects, paint, paramString, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setShape, setStrokeColor, updateBoundsFromPath, updateShapePoints
 
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, endResizeBounds, findIntersectingNodes, fireChildPropertyChange, firePropertyChange, fullIntersects, fullPaint, fullPick, getAllNodes, getAllNodes, getAttribute, getAttribute, getBooleanAttribute, getBounds, getBoundsChanged, getBoundsReference, getBoundsVolatile, getChild, getChildBoundsInvalid, getChildBoundsVolatile, getChildPaintInvalid, getChildrenCount, getChildrenIterator, getChildrenPickable, getChildrenReference, getClientProperties, getClientProperty, getClientPropertyKeysEnumeration, getClientPropertyKeysIterator, getDoubleAttribute, getFullBounds, getFullBoundsInvalid, 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, layoutChildren, lerp, localToGlobal, localToGlobal, localToGlobal, localToParent, localToParent, localToParent, moveInBackOf, moveInFrontOf, moveToBack, moveToFront, offset, paintAfterChildren, parentToLocal, parentToLocal, parentToLocal, pick, pickAfterChildren, 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, setBoundsChanged, setChildBoundsInvalid, setChildBoundsVolatile, setChildPaintInvalid, setChildrenPickable, setFullBoundsInvalid, setGlobalRotation, setGlobalScale, setGlobalTranslation, setHeight, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, startResizeBounds, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaint
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_HANDLE_SIZE

public static float DEFAULT_HANDLE_SIZE

DEFAULT_HANDLE_SHAPE

public static java.awt.Shape DEFAULT_HANDLE_SHAPE

DEFAULT_COLOR

public static java.awt.Color DEFAULT_COLOR
Constructor Detail

PSWTHandle

public PSWTHandle(PLocator aLocator)
Construct a new handle that will use the given locator to locate itself on its parent node.

Method Detail

installHandleEventHandlers

protected void installHandleEventHandlers()

getHandleDraggerHandler

public PDragSequenceEventHandler getHandleDraggerHandler()
Return the event handler that is responsible for the drag handle interaction.


getLocator

public PLocator getLocator()
Get the locator that this handle uses to position itself on its parent node.


setLocator

public void setLocator(PLocator aLocator)
Set the locator that this handle uses to position itself on its parent node.


startHandleDrag

public void startHandleDrag(java.awt.geom.Point2D aLocalPoint,
                            PInputEvent aEvent)
Override this method to get notified when the handle starts to get dragged.


dragHandle

public void dragHandle(PDimension aLocalDimension,
                       PInputEvent aEvent)
Override this method to get notified as the handle is dragged.


endHandleDrag

public void endHandleDrag(java.awt.geom.Point2D aLocalPoint,
                          PInputEvent aEvent)
Override this method to get notified when the handle stops getting dragged.


setParent

public void setParent(PNode newParent)
Description copied from class: PNode
Set the parent of this node. Note this is set automatically when adding and removing children.

Overrides:
setParent in class PNode

parentBoundsChanged

public void parentBoundsChanged()
Description copied from class: PNode
A notification that the bounds of this node's parent have changed.

Overrides:
parentBoundsChanged in class PNode

relocateHandle

public void relocateHandle()
Force this handle to relocate itself using its locator.



Copyright 2005 by University of Maryland, College Park, MD 20742, USA All rights reserved.

Web Accessibility