public class PHandle
extends edu.umd.cs.piccolo.nodes.PPath
| Modifier and Type | Field and Description |
|---|---|
static Color |
DEFAULT_COLOR |
static Shape |
DEFAULT_HANDLE_SHAPE |
static double |
DEFAULT_HANDLE_SIZE |
static Color |
DEFAULT_SELECTED_COLOR |
PROPERTY_CODE_PATH, PROPERTY_CODE_STROKE, PROPERTY_CODE_STROKE_PAINT, PROPERTY_PATH, PROPERTY_STROKE, PROPERTY_STROKE_PAINTPROPERTY_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 |
|---|
PHandle(edu.umd.cs.piccolox.util.PLocator aLocator,
MappingComponent mc)
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(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 |
duplicateHandle()
DOCUMENT ME!
|
void |
endHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Override this method to get notified when the handle stops getting dragged.
|
protected Color |
getDefaultColor()
DOCUMENT ME!
|
protected Color |
getDefaultSelectedColor()
DOCUMENT ME!
|
edu.umd.cs.piccolo.event.PDragSequenceEventHandler |
getHandleDraggerHandler()
Return the event handler that is responsible for the drag handle interaction.
|
edu.umd.cs.piccolox.util.PLocator |
getLocator()
Get the locator that this handle uses to position itself on its parent node.
|
void |
handleClicked(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
DOCUMENT ME!
|
protected void |
installHandleEventHandlers()
DOCUMENT ME!
|
boolean |
isSelected()
double scale=-1; public void paint(PPaintContext aPaintContext) { super.paint(aPaintContext); //// double
newscale=aPaintContext.getScale(); //// if (scale!=newscale) { //// double
xxx=(double)(DEFAULT_HANDLE_SIZE/newscale); //// this.scale(1/aPaintContext.getScale()); //// } // // // //
double newscale=aPaintContext.getScale(); // if (scale!=newscale) { // // // double
xxx=(double)(DEFAULT_HANDLE_SIZE/newscale); //log.fatal("Breite:"+xxx+ "(x,y):
("+(double)locator.locateX()+","+(double)locator.locateY()+")"); //
setBounds((double)locator.locateX()-(xxx/2),(double)locator.locateY()+(xxx/2), xxx,xxx); //
//setPathToEllipse((double)0, (double)0, xxx,xxx); // // //centerBoundsOnPoint((double)locator.locateX(),
(double)locator.locateY()); // scale=newscale; // } } public void setPathToEllipse(double x, double y, double
width, double height) { TEMP_ELLIPSE.setFrame(x, y, width, height); setPathTo(TEMP_ELLIPSE); } //private static
final Ellipse2D.Double TEMP_ELLIPSE = new Ellipse2D.Double(); private static final Rectangle2D.Double
TEMP_ELLIPSE = new Rectangle2D.Double();
|
void |
mouseMovedNotInDragOperation(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
DOCUMENT ME!
|
void |
parentBoundsChanged() |
void |
relocateHandle()
Force this handle to relocate itself using its locator.
|
void |
removeHandle()
zum überschreiben.
|
void |
setLocator(edu.umd.cs.piccolox.util.PLocator aLocator)
Set the locator that this handle uses to position itself on its parent node.
|
void |
setParent(edu.umd.cs.piccolo.PNode newParent) |
void |
setSelected(boolean selected)
DOCUMENT ME!
|
void |
startHandleDrag(Point2D aLocalPoint,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
Override this method to get notified when the handle starts to get dragged.
|
append, closePath, createEllipse, createLine, createPolyline, createPolyline, createRectangle, curveTo, endResizeBounds, getPathBoundsWithStroke, getPathReference, getStroke, getStrokePaint, internalUpdateBounds, intersects, lineTo, moveTo, paint, paramString, quadTo, reset, setPathTo, setPathToEllipse, setPathToPolyline, setPathToPolyline, setPathToRectangle, setStroke, setStrokePaint, startResizeBounds, updateBoundsFromPathaddActivity, addAttribute, addChild, addChild, addChildren, addClientProperty, addInputEventListener, addPropertyChangeListener, addPropertyChangeListener, animateToBounds, animateToColor, animateToPositionScaleRotation, 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, getIntegerAttribute, getInverseTransform, getListenerList, getLocalToGlobalTransform, 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, 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, setOccluded, setOffset, setOffset, setPaint, setPaintInvalid, setPickable, setPropertyChangeParentMask, setRotation, setScale, setTransform, setTransparency, setVisible, setWidth, setX, setY, signalBoundsChanged, toImage, toImage, toImage, toString, transformBy, translate, validateFullBounds, validateFullPaintpublic static final double DEFAULT_HANDLE_SIZE
public static final Shape DEFAULT_HANDLE_SHAPE
public static final Color DEFAULT_COLOR
public static final Color DEFAULT_SELECTED_COLOR
public PHandle(edu.umd.cs.piccolox.util.PLocator aLocator,
MappingComponent mc)
aLocator - DOCUMENT ME!mc - DOCUMENT ME!protected Color getDefaultColor()
protected Color getDefaultSelectedColor()
public void removeHandle()
public void duplicateHandle()
protected void installHandleEventHandlers()
public edu.umd.cs.piccolo.event.PDragSequenceEventHandler getHandleDraggerHandler()
public edu.umd.cs.piccolox.util.PLocator getLocator()
public void setLocator(edu.umd.cs.piccolox.util.PLocator aLocator)
aLocator - DOCUMENT ME!public void startHandleDrag(Point2D aLocalPoint, edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalPoint - DOCUMENT ME!aEvent - DOCUMENT ME!public void dragHandle(edu.umd.cs.piccolo.util.PDimension aLocalDimension,
edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalDimension - DOCUMENT ME!aEvent - DOCUMENT ME!public void endHandleDrag(Point2D aLocalPoint, edu.umd.cs.piccolo.event.PInputEvent aEvent)
aLocalPoint - DOCUMENT ME!aEvent - DOCUMENT ME!public void handleClicked(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
pInputEvent - DOCUMENT ME!public void mouseMovedNotInDragOperation(edu.umd.cs.piccolo.event.PInputEvent pInputEvent)
pInputEvent - DOCUMENT ME!public void setParent(edu.umd.cs.piccolo.PNode newParent)
setParent in class edu.umd.cs.piccolo.PNodepublic void parentBoundsChanged()
parentBoundsChanged in class edu.umd.cs.piccolo.PNodepublic void relocateHandle()
public boolean isSelected()
public void setSelected(boolean selected)
selected - DOCUMENT ME!Copyright © 2012–2025 cismet GmbH. All rights reserved.