|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.ViewMode
y.view.MoveSelectionMode
public class MoveSelectionMode
This view mode is responsible for moving selected parts of the displayed graph. On a left press this mode starts to move selected graph elements around. While the mouse is being dragged the selected parts will be moved around. If the mouse gets released the operation will end and all registered views will receive an update event.
![]() |
![]() |
| 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 | |
|---|---|
MoveSelectionMode()
Initializes a new MoveSelectionMode. |
|
MoveSelectionMode(ViewContainer view)
Initializes a new MoveSelectionMode for a given ViewContainer |
|
| Method Summary | |
|---|---|
void |
activate(boolean b)
Invoked when the Mode is activated/deactivated from the ViewControl or via the setChild() and reactivateParent operations This behaves like a bound property using ViewMode.ACTIVE_PROPERTY as the property name. |
void |
cancelEditing()
This can be used to cleanly exit an edit that is currently in progress. |
protected BendList |
getBendsToBeMoved()
Returns the bends that should will be moved by this view mode. |
protected NodeList |
getNodesToBeMoved()
Returns the nodes that should will be moved by this view mode. |
protected boolean |
isOrthogonalRouting(Edge edge)
Determines whether the given edge instance should be routed orthogonally. |
void |
mouseDraggedLeft(double x,
double y)
Moves the selected graph elements around. |
void |
mousePressedLeft(double x,
double y)
Initiates the movement of the selected graph elements. |
void |
mouseReleasedLeft(double x,
double y)
Terminates the movements of the selected graph elements. |
void |
mouseShiftPressedLeft(double x,
double y)
Initiates the movement of the selected graph elements. |
void |
mouseShiftReleasedLeft(double x,
double y)
Terminates the movements of the selected graph elements. |
protected void |
selectionMovedAction(double dx,
double dy,
double x,
double y)
Performs an action after the selection was moved. |
protected void |
selectionMoveStarted(double x,
double y)
Performs an action when the selection is about to be moved. |
protected void |
selectionOnMove(double dx,
double dy,
double x,
double y)
Performs an action when the selection is moving. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MoveSelectionMode(ViewContainer view)
public MoveSelectionMode()
| Method Detail |
|---|
public void activate(boolean b)
ViewModeViewMode.ACTIVE_PROPERTY as the property name.
activate in class ViewModeb - set true when mode was activated
false otherwise
public void mouseShiftPressedLeft(double x,
double y)
mouseShiftPressedLeft 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 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 mouseShiftReleasedLeft(double x,
double y)
mouseShiftReleasedLeft 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 selectionMoveStarted(double x,
double y)
protected void selectionOnMove(double dx,
double dy,
double x,
double y)
protected void selectionMovedAction(double dx,
double dy,
double x,
double y)
protected NodeList getNodesToBeMoved()
protected BendList getBendsToBeMoved()
protected boolean isOrthogonalRouting(Edge edge)
DataProvider bound to the current
graph via the EditMode.ORTHOGONAL_ROUTING_DPKEY data provider key
to determine whether the given edge should be routed orthogonally.
edge - the edge to decide
true if the edge should be routed orthogonally.EditMode.isOrthogonalRouting(y.base.Edge)
public void cancelEditing()
throws UnsupportedOperationException
ViewModesetEditing(false) if
ViewMode.isEditing() returns true
cancelEditing in class ViewModeUnsupportedOperationException - if the editing cannot be cancelled
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 | ||||||||