|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.ViewMode
y.view.MoveLabelMode
public class 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 |
|---|
ACTIVE_PROPERTY, ACTIVE_VIEW_PROPERTY, CHILD_MODE_PROPERTY, EDITING_PROPERTY, GRAB_FOCUS_ENABLED_PROPERTY, lastClickEvent, lastDragEvent, lastMoveEvent, lastPressEvent, lastReleaseEvent, MODIFIER_MASK_PROPERTY, NAME_PROPERTY, originalX, originalY, PARENT_MODE_PROPERTY, view |
| Constructor Summary | |
|---|---|
MoveLabelMode()
Instantiates a new MoveLabelMode |
|
MoveLabelMode(ViewContainer view)
Instantiates a new MoveLabelMode for a given ViewContainer |
|
| Method Summary | |
|---|---|
void |
cancelEditing()
This can be used to cleanly exit an edit that is currently in progress. |
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 ViewModeViewMode.setChild(ViewMode,MouseEvent,MouseEvent)
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 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 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 selectionMovedAction(double dx,
double dy,
double x,
double y)
public void cancelEditing()
throws UnsupportedOperationException
ViewModesetEditing(false) if
ViewMode.isEditing() returns true
cancelEditing in class ViewModeUnsupportedOperationException - if the editing cannot be canceled
for any reason.
|
© Copyright 2000-2008, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||