|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--y.view.ViewMode
|
+--y.view.HotSpotMode
Handles hotspot drags. Causes selected nodes to change their size. when the user drags on a hot spot visible around such a node.
The mode is activated when the mouse is moved over an hotspot point. It changes the mouse-cursor according to the hotspot point. In this state the HotSpotMode is *inactive*. When the left mouse button is pressed it goes into *active* mode.
| Field Summary |
| Fields inherited from class y.view.ViewMode |
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view |
| Constructor Summary | |
HotSpotMode()
Instantiates a new HotSportMode. |
|
HotSpotMode(ViewContainer vc)
Instantiates a new HotSpotMode for a given ViewContainer |
|
| Method Summary | |
static Cursor |
getCursor(byte hotSpotType)
Returns a suitable cursor for the given hotSpotType. |
void |
mouseDraggedLeft(double x,
double y)
Resizes selected nodes. |
void |
mousePressedLeft(double x,
double y)
Initiates resizing of selected nodes. |
void |
mouseReleasedLeft(double x,
double y)
Terminates resizing of selected nodes. |
protected void |
updateNodeRealizerBounds(NodeRealizer vr,
double x,
double y,
double w,
double h)
This method will be invoked by this view mode when the current bounds of a node need to be updated. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public HotSpotMode(ViewContainer vc)
public HotSpotMode()
| Method Detail |
public void mousePressedLeft(double x,
double y)
mousePressedLeft in class ViewModex - the x-coordinate of the mouse event in world coordinates.y - the y-coordinate of the mouse event in world coordinates.
public void mouseDraggedLeft(double x,
double y)
mouseDraggedLeft in class ViewModex - the x-coordinate of the mouse event in world coordinates.y - the y-coordinate of the mouse event in world coordinates.
protected void updateNodeRealizerBounds(NodeRealizer vr,
double x,
double y,
double w,
double h)
vr - the realizer of the node whose bounds shoud change.x - the desired x-coordinate of the node bounds.y - the desired y-coordinate of the node bounds.w - the desired width of the node.h - the desired height of the node.
public void mouseReleasedLeft(double x,
double y)
mouseReleasedLeft in class ViewModex - the x-coordinate of the mouse event in world coordinates.y - the y-coordinate of the mouse event in world coordinates.public static Cursor getCursor(byte hotSpotType)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||