|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.ViewMode | +--y.view.MoveLabelMode
This view mode allows interactive reassignment of label positions.
A label can be moved to another position by pressing with the left mouse button on it and then by dragging the label around. While dragging label candidate boxes will appear. These boxes mark the positions that are available for the label. the set of available label positions depend on the LabelModel that is associated which the label. The move terminates it's action when the mouse is released again. The label will then automatically snap to the closest available label position.
Field Summary |
Fields inherited from class y.view.ViewMode |
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view |
Constructor Summary | |
MoveLabelMode()
Instantiates a new MoveLabelMode |
|
MoveLabelMode(ViewContainer view)
Instantiates a new MoveLabelMode for a given ViewContainer |
Method Summary | |
void |
init()
Called when this mode gets activeted. |
void |
mouseDraggedLeft(double x,
double y)
Moves the label. |
void |
mousePressedLeft(double x,
double y)
Initiates the movement of a hit label. |
void |
mouseReleasedLeft(double x,
double y)
Terminates the movement of a label. |
protected void |
selectionMovedAction(double dx,
double dy,
double x,
double y)
Performs an action after the selection was moved. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public MoveLabelMode(ViewContainer view)
public MoveLabelMode()
Method Detail |
public void init()
init
in class ViewMode
ViewMode.setChild(ViewMode,MouseEvent,MouseEvent)
public void mousePressedLeft(double x, double y)
mousePressedLeft
in class ViewMode
x
- the x-coordinate of the mouse event in world coordinates.y
- the y-coordinate of the mouse event in world coordinates.public void mouseReleasedLeft(double x, double y)
mouseReleasedLeft
in class ViewMode
x
- 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 ViewMode
x
- the x-coordinate of the mouse event in world coordinates.y
- the y-coordinate of the mouse event in world coordinates.protected void selectionMovedAction(double dx, double dy, double x, double y)
|
© 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 |