public class PBoundsHandle extends PHandle
PNode.PSceneGraphDelegateDEFAULT_COLOR, DEFAULT_HANDLE_SHAPE, DEFAULT_HANDLE_SIZEPROPERTY_CODE_PATH, PROPERTY_CODE_STROKE, PROPERTY_CODE_STROKE_PAINT, PROPERTY_PATH, PROPERTY_STROKE, PROPERTY_STROKE_PAINTFILL_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 |
|---|
PBoundsHandle(PBoundsLocator locator)
Creates a bounds handle that will be attached to the provided locator.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
addBoundsHandlesTo(PNode node)
Adds bounds handles to the corners and edges of the provided node.
|
static void |
addStickyBoundsHandlesTo(PNode node,
PCamera camera)
Adds stick handles (always visible regardless of scale since they are
attached to the camera) to the node provided.
|
void |
dragHandle(PDimension aLocalDimension,
PInputEvent aEvent)
Is invoked when the handle is being dragged.
|
void |
endHandleDrag(Point2D aLocalPoint,
PInputEvent aEvent)
Call back invoked when the drag is finished.
|
void |
flipHandleIfNeeded(boolean flipX,
boolean flipY)
Flips this bounds around if it needs to be.
|
void |
flipSiblingBoundsHandles(boolean flipX,
boolean flipY)
Moves locators around so that they are still logically positioned.
|
Cursor |
getCursorFor(int side)
Returns an appropriate handle for the given side of a node.
|
PBasicInputEventHandler |
getHandleCursorEventHandler()
Return the event handler that is responsible for setting the mouse cursor
when it enters/exits this handle.
|
protected void |
installHandleEventHandlers()
Installs the handlers to this particular bounds handle.
|
static void |
removeBoundsHandlesFrom(PNode node)
Removes all bounds from the node provided.
|
void |
startHandleDrag(Point2D aLocalPoint,
PInputEvent aEvent)
Is invoked when the a drag starts on this handle.
|
getHandleDraggerHandler, getLocator, parentBoundsChanged, relocateHandle, setLocator, setParentappend, 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, updateBoundsFromPathaddActivity, 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, validateFullPaintpublic PBoundsHandle(PBoundsLocator locator)
locator - locator used to position the nodepublic static void addBoundsHandlesTo(PNode node)
node - node to be extended with bounds handlespublic static void addStickyBoundsHandlesTo(PNode node, PCamera camera)
node - node being extended with bounds handlescamera - camera onto which handles will appearpublic static void removeBoundsHandlesFrom(PNode node)
node - node having its handles removed fromprotected void installHandleEventHandlers()
installHandleEventHandlers in class PHandlepublic PBasicInputEventHandler getHandleCursorEventHandler()
public void startHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
startHandleDrag in class PHandleaLocalPoint - point in the handle's coordinate system that is
pressedaEvent - event representing the start of the dragpublic void dragHandle(PDimension aLocalDimension, PInputEvent aEvent)
dragHandle in class PHandleaLocalDimension - dimension representing the magnitude of the handle
dragaEvent - event responsible for the callpublic void endHandleDrag(Point2D aLocalPoint, PInputEvent aEvent)
endHandleDrag in class PHandleaLocalPoint - point on the handle where the drag was endedaEvent - event responsible for the end of the dragpublic void flipSiblingBoundsHandles(boolean flipX,
boolean flipY)
flipX - whether to allow flipping along the x directionflipY - whether to allow flipping along the y directionpublic void flipHandleIfNeeded(boolean flipX,
boolean flipY)
flipX - whether to allow flipping along the x directionflipY - whether to allow flipping along the y directionpublic Cursor getCursorFor(int side)
side - side given as SwingConstants values.Copyright © 1995-2012 Piccolo2D. All Rights Reserved.