|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--edu.umd.cs.jazz.ZSceneGraphObject
|
+--edu.umd.cs.jazz.ZVisualComponent
|
+--edu.umd.cs.jazz.event.ZSelectionResizeHandler.ResizeHandles
Inner class used to render resize handles over a single component.
Terminology: A "compass position" is a pair of integers (x,y) drawn from the set {-1,0,1} that identifies a particular resize handle relative to a 3x3 square whose origin is the center. The upper-left resize handle is identified as (-1,-1), upper-right as (1,-1), etc.
| Field Summary | |
protected java.awt.geom.Point2D |
dragPtlocation of most recent drag, in global coordinates |
protected java.awt.geom.Rectangle2D[] |
handlesactual rectangles rendered for the handles |
protected java.awt.Point |
highLightHandlethe handle to highlight |
protected java.awt.Color |
penColorPen color for rendering of selection |
java.awt.Color |
penColor_DEFAULTDefault pen color |
protected java.awt.Point |
pressHandlerelative compass location of resize handle of last press |
protected ZNode |
pressNodethe node that was pressed |
protected java.awt.geom.Point2D |
pressPtlocation of most recent mouse press on a resize handle, in global coordinates. |
protected java.util.ArrayList |
selectionThe current selected list |
| Fields inherited from class edu.umd.cs.jazz.ZSceneGraphObject |
bounds, inTransaction, invalidBounds, invalidVolatileBounds, listenerList, volatileBounds, volatileBounds_DEFAULT |
| Constructor Summary | |
ZSelectionResizeHandler.ResizeHandles()Default constructor |
|
| Method Summary | |
protected void |
computeBounds()The resize handles don't have logical bounds |
java.awt.Point |
contains(double x, double y)Used by ZSelectionResizeHandler to determine whether or not the mouse is over a resize handle. |
boolean |
contains(java.awt.geom.Rectangle2D rect)Used by ZSelectionResizeHandler to determine whether or not the mouse is over a resize handle. |
protected java.awt.geom.Rectangle2D |
getHandle(double cx, double cy, double xLen, double yLen)Render a single resize handle, centered at the given x,y position. |
void |
mouseClicked(ZMouseEvent e)Invoked when the mouse has been clicked on a component. |
void |
mouseDragged(ZMouseEvent e)Mouse drag event handler |
void |
mouseEntered(ZMouseEvent e)Invoked when the mouse enters a component. |
void |
mouseExited(ZMouseEvent e)Invoked when the mouse exits a component. |
void |
mouseMoved(ZMouseEvent e)Invoked when the mouse button has been moved on a node (with no buttons no down). |
void |
mousePressed(ZMouseEvent e)Mouse press event handler |
void |
mouseReleased(ZMouseEvent e)Mouse release event handler |
boolean |
pick(java.awt.geom.Rectangle2D pickRect, ZSceneGraphPath path)Indicates a pick in case the underlying visual components aren't picked |
void |
render(ZRenderContext ctx)Renders the given ResizeHandles |
| Methods inherited from class edu.umd.cs.jazz.ZVisualComponent |
addParent, duplicateObject, getNumParents, getParents, getParentsReference, getRoot, paint, pickBounds, removeParent, repaint, repaint, setState, trimToSize, updateBounds, updateObjectReferences, updateVolatility, writeObject, writeObjectRecurse |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public final java.awt.Color penColor_DEFAULT
protected java.awt.Color penColor
protected java.awt.geom.Rectangle2D[] handles
protected java.awt.geom.Point2D pressPt
protected ZNode pressNode
protected java.awt.Point pressHandle
protected java.awt.Point highLightHandle
protected java.awt.geom.Point2D dragPt
protected java.util.ArrayList selection
| Constructor Detail |
public ZSelectionResizeHandler.ResizeHandles()
| Method Detail |
public boolean pick(java.awt.geom.Rectangle2D pickRect,
ZSceneGraphPath path)
pick in class ZVisualComponent
pickRect - The rectangle that is picking this visual component in local coordinates.path - The path through the scenegraph to the picked node. Modified by this call.ZDrawingSurface.pick(int, int)
protected java.awt.geom.Rectangle2D getHandle(double cx,
double cy,
double xLen,
double yLen)
public void render(ZRenderContext ctx)
render in class ZVisualComponent
ctx - The current render contextZVisualComponent.paint(Graphics2D)protected void computeBounds()
computeBounds in class ZSceneGraphObject
public java.awt.Point contains(double x,
double y)
cp to the compass position of the handle, and returns true. Otherwise returns false.
x - x position, in local coordinatesy - y position, in local coordinatespublic boolean contains(java.awt.geom.Rectangle2D rect)
public void mousePressed(ZMouseEvent e)
mousePressed in interface ZMouseListener
public void mouseDragged(ZMouseEvent e)
mouseDragged in interface ZMouseMotionListener
public void mouseReleased(ZMouseEvent e)
mouseReleased in interface ZMouseListener
public void mouseEntered(ZMouseEvent e)
mouseEntered in interface ZMouseListener
public void mouseExited(ZMouseEvent e)
mouseExited in interface ZMouseListener
public void mouseClicked(ZMouseEvent e)
mouseClicked in interface ZMouseListener
public void mouseMoved(ZMouseEvent e)
mouseMoved in interface ZMouseMotionListener
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||