|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cs.piccolo.PNode
edu.umd.cs.piccolo.nodes.PPath
edu.umd.cs.piccolox.handles.PHandle
public class PHandle
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.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class edu.umd.cs.piccolo.PNode |
|---|
edu.umd.cs.piccolo.PNode.PSceneGraphDelegate |
| Field Summary | |
|---|---|
static Color |
DEFAULT_COLOR
Default color to paint handles. |
static Shape |
DEFAULT_HANDLE_SHAPE
Default shape to use when drawing handles. |
static float |
DEFAULT_HANDLE_SIZE
The default size for a handle. |
| 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 |
|---|
FILL_STRATEGY_ASPECT_COVER, FILL_STRATEGY_ASPECT_FIT, FILL_STRATEGY_EXACT_FIT, 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 | |
|---|---|
PHandle(PLocator aLocator)
Construct a new handle that will use the given locator to locate itself on its parent node. |
|
| Method Summary | |
|---|---|
void |
dragHandle(edu.umd.cs.piccolo.util.PDimension aLocalDimension,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Override this method to get notified as the handle is dragged. |
void |
endHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Override this method to get notified when the handle stops getting dragged. |
edu.umd.cs.piccolo.event.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()
Installs the handler that notify its subclasses of handle interaction. |
void |
parentBoundsChanged()
Forces the handles to reposition themselves using their associated locator. |
void |
relocateHandle()
Force this handle to relocate itself using its locator. |
void |
setLocator(PLocator locator)
Set the locator that this handle uses to position itself on its parent node. |
void |
setParent(edu.umd.cs.piccolo.PNode newParent)
Set's this handle's parent. |
void |
startHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Override this method to get notified when the handle starts to get dragged. |
| Methods inherited from class edu.umd.cs.piccolo.nodes.PPath |
|---|
append, closePath, createEllipse, createLine, createPolyline, createPolyline, createRectangle, createRoundRectangle, curveTo, endResizeBounds, getPathBoundsWithStroke, getPathReference, getStroke, getStrokePaint, internalUpdateBounds, intersects, lineTo, moveTo, paint, 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, animateToRelativePosition, animateToTransform, animateToTransparency, animateTransformToBounds, centerBoundsOnPoint, centerFullBoundsOnPoint, clone, computeFullBounds, 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, getInputEventListeners, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, getName, 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, paramString, 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, setName, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, toImage, toImage, toImage, toImage, transformBy, translate, validateFullBounds, validateFullPaint |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static float DEFAULT_HANDLE_SIZE
public static Shape DEFAULT_HANDLE_SHAPE
public static Color DEFAULT_COLOR
| Constructor Detail |
|---|
public PHandle(PLocator aLocator)
aLocator - locator to use when laying out the handle| Method Detail |
|---|
protected void installHandleEventHandlers()
public edu.umd.cs.piccolo.event.PDragSequenceEventHandler getHandleDraggerHandler()
public PLocator getLocator()
public void setLocator(PLocator locator)
locator - the locator to assign to this handle
public void startHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalPoint - point on the handle at which the event occurredaEvent - the event responsible for starting the dragging
public void dragHandle(edu.umd.cs.piccolo.util.PDimension aLocalDimension,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalDimension - size of the drag in handle coordinatesaEvent - event representing the drag
public void endHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalPoint - point in handle coordinate system of the end of the
dragaEvent - event responsible for ending the dragpublic void setParent(edu.umd.cs.piccolo.PNode newParent)
setParent in class edu.umd.cs.piccolo.PNodenewParent - the new parent to assign to this handlepublic void parentBoundsChanged()
parentBoundsChanged in class edu.umd.cs.piccolo.PNodepublic void relocateHandle()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||