public class PSWTBoundsHandle extends PSWTHandle
PNode.PSceneGraphDelegateDEFAULT_COLOR, DEFAULT_HANDLE_SHAPE, DEFAULT_HANDLE_SIZEPROPERTY_SHAPEFILL_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_DELEGATENO_SUCH_PAGE, PAGE_EXISTS| Constructor and Description |
|---|
PSWTBoundsHandle(PBoundsLocator locator)
Creates a bounds handle that will use the provided bounds locator to
position itself.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addBoundsHandlesTo(PNode node)
Adds bounds handles to all corners and edges of the provided node.
|
static void |
addStickyBoundsHandlesTo(PNode node,
PCamera camera)
Adds sticky bounds handles to all corners and edges of the provided node
and for display on the provided camera.
|
void |
dragHandle(PDimension aLocalDimension,
PInputEvent aEvent)
Callback invoked when the user is dragging the handle.
|
void |
endHandleDrag(Point2D aLocalPoint,
PInputEvent aEvent)
Callback invoked when the handle stops being dragged.
|
void |
flipHandleIfNeeded(boolean flipX,
boolean flipY)
Flips this particular handle around if needed.
|
void |
flipSiblingBoundsHandles(boolean flipX,
boolean flipY)
Iterates over all of this node's handles flipping them if necessary.
|
Cursor |
getCursorFor(int side)
Returns an appropriate cursor to display when the mouse is over a handle
on the side provided.
|
PBasicInputEventHandler |
getHandleCursorEventHandler()
Return the event handler that is responsible for setting the mouse cursor
when it enters/exits this handle.
|
protected void |
installHandleEventHandlers()
Installs handlers responsible for updating the attached node's bounds and
for updating the cursor when the mous enters a handle.
|
static void |
removeBoundsHandlesFrom(PNode node)
Removes all bounds handles from the specified node.
|
void |
startHandleDrag(Point2D aLocalPoint,
PInputEvent aEvent)
Callback invoked when the user has started to drag a handle.
|
getHandleDraggerHandler, getLocator, parentBoundsChanged, relocateHandle, setLocator, setParentcloneShape, createEllipse, createPolyline, createPolyline, createRectangle, createRoundRectangle, getCenter, getStrokePaint, internalUpdateBounds, intersects, paint, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setPathToRoundRectangle, setShape, setStrokeColor, updateBoundsFromPath, updateShapePointsaddActivity, 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, validateFullPaintpublic PSWTBoundsHandle(PBoundsLocator locator)
locator - locator to use when positioning this handlepublic static void addBoundsHandlesTo(PNode node)
node - to decorate with bounds handles.public static void addStickyBoundsHandlesTo(PNode node, PCamera camera)
node - to decorate with bounds handles.camera - camera onto which the handles should be stuckpublic static void removeBoundsHandlesFrom(PNode node)
node - node from which to remove bounds handlesprotected void installHandleEventHandlers()
installHandleEventHandlers in class PSWTHandlepublic PBasicInputEventHandler getHandleCursorEventHandler()
public void startHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
startHandleDrag in class PSWTHandleaLocalPoint - point in the handle's coordinate system at which the
drag was startedaEvent - Piccolo2d Event representing the start of the dragpublic void dragHandle(PDimension aLocalDimension, PInputEvent aEvent)
dragHandle in class PSWTHandleaLocalDimension - magnitude of drag in the handle's coordinate
systemaEvent - Piccolo2d Event representing the start of the dragpublic void endHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
endHandleDrag in class PSWTHandleaLocalPoint - point in the handle's coordinate system at which the
drag was stoppedaEvent - Piccolo2d Event representing the stop of the dragpublic void flipSiblingBoundsHandles(boolean flipX,
boolean flipY)
flipX - whether to allow flipping in the horizontal directionflipY - whether to allow flipping in the vertical directionpublic void flipHandleIfNeeded(boolean flipX,
boolean flipY)
flipX - whether to allow flipping in the horizontal directionflipY - whether to allow flipping in the vertical directionpublic Cursor getCursorFor(int side)
side - value from SwingConstantsCopyright © 1995-2012 Piccolo2D. All Rights Reserved.