|
|||||||||
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.piccolox.swt.PSWTPath
edu.umd.cs.piccolox.swt.PSWTHandle
public class PSWTHandle
PSWTHandle 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 PSWTBoundsHandle 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 |
---|
PNode.PSceneGraphDelegate |
Field Summary | |
---|---|
static java.awt.Color |
DEFAULT_COLOR
The default color to use when drawing a handle. |
static java.awt.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. |
Fields inherited from class edu.umd.cs.piccolox.swt.PSWTPath |
---|
PROPERTY_SHAPE |
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()
Installs the handler that will reposition the handle when it is dragged, and invoke appropriate call backs. |
void |
parentBoundsChanged()
|
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)
|
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, createRoundRectangle, getCenter, getStrokePaint, internalUpdateBounds, intersects, paint, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setPathToRoundRectangle, setShape, setStrokeColor, updateBoundsFromPath, updateShapePoints |
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 java.awt.Shape DEFAULT_HANDLE_SHAPE
public static java.awt.Color DEFAULT_COLOR
Constructor Detail |
---|
public PSWTHandle(PLocator aLocator)
aLocator
- locator to use when positioning this handleMethod Detail |
---|
protected void installHandleEventHandlers()
public PDragSequenceEventHandler getHandleDraggerHandler()
public PLocator getLocator()
public void setLocator(PLocator aLocator)
aLocator
- used to position this handlepublic void startHandleDrag(java.awt.geom.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(java.awt.geom.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)
setParent
in class PNode
public void parentBoundsChanged()
parentBoundsChanged
in class PNode
public void relocateHandle()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |