public class PSWTHandle extends PSWTPath
PNode.PSceneGraphDelegate
Modifier and Type | Field and Description |
---|---|
static Color |
DEFAULT_COLOR
The default color to use when drawing a handle.
|
static Shape |
DEFAULT_HANDLE_SHAPE
The default shape to use when drawing handles.
|
static float |
DEFAULT_HANDLE_SIZE
The Default Size of a handle not including its border.
|
PROPERTY_SHAPE
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
NO_SUCH_PAGE, PAGE_EXISTS
Constructor and Description |
---|
PSWTHandle(PLocator aLocator)
Construct a new handle that will use the given locator to locate itself
on its parent node.
|
Modifier and Type | Method and Description |
---|---|
void |
dragHandle(PDimension aLocalDimension,
PInputEvent aEvent)
Override this method to get notified as the handle is dragged.
|
void |
endHandleDrag(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()
Installs the handler that will reposition the handle when it is dragged,
and invoke appropriate call backs.
|
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(Point2D aLocalPoint,
PInputEvent aEvent)
Override this method to get notified when the handle starts to get
dragged.
|
cloneShape, createEllipse, createPolyline, createPolyline, createRectangle, createRoundRectangle, getCenter, getStrokePaint, internalUpdateBounds, intersects, paint, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setPathToRoundRectangle, setShape, setStrokeColor, updateBoundsFromPath, updateShapePoints
addActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, animateToRelativePosition, 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, 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, startResizeBounds, toImage, toImage, toImage, toImage, transformBy, translate, validateFullBounds, validateFullPaint
public static float DEFAULT_HANDLE_SIZE
public static Shape DEFAULT_HANDLE_SHAPE
public static Color DEFAULT_COLOR
public PSWTHandle(PLocator aLocator)
aLocator
- locator to use when positioning this handleprotected void installHandleEventHandlers()
public PDragSequenceEventHandler getHandleDraggerHandler()
public PLocator getLocator()
public void setLocator(PLocator aLocator)
aLocator
- used to position this handlepublic void startHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
aLocalPoint
- point at which dragging was started relative to the
handle's coordinate systemaEvent
- event representing the start of the dragpublic void dragHandle(PDimension aLocalDimension, PInputEvent aEvent)
aLocalDimension
- magnitude of the dragHandle event in the
dimensions of the handle's coordinate system.aEvent
- event representing the dragpublic void endHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
aLocalPoint
- point at which dragging was ended relative to the
handle's coordinate systemaEvent
- event representing the end of the dragpublic void setParent(PNode newParent)
public void parentBoundsChanged()
parentBoundsChanged
in class PNode
public void relocateHandle()
Copyright © 1995–2013 Piccolo2D. All rights reserved.