|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.view.ViewMode | +--y.view.AbstractSelectionBoxMode
An abstract view mode that draws a temporary box in a view
The bounds of this box can be controlled by dragging a
corner of the box.
When the box is closed the abstract callback method
AbstractSelectionBoxMode.selectionBoxAction(java.awt.Rectangle, boolean)
is invoked.
Field Summary |
Fields inherited from class y.view.ViewMode |
lastClickEvent, lastDragEvent, lastPressEvent, lastReleaseEvent, originalX, originalY, view |
Constructor Summary | |
AbstractSelectionBoxMode()
Instantiates a new AbstactSelectionBoxMode. |
|
AbstractSelectionBoxMode(ViewContainer view)
Instantiates a new AbstactSelectionBoxMode for a given ViewContainer. |
Method Summary | |
void |
mouseDraggedLeft(double x,
double y)
Changes the size of the selection box in such a way that the dragged corner of the box is at the given world coordinate. |
void |
mousePressedLeft(double x,
double y)
Initiates the selection box action, by opening a selection box at the given world coordinates. |
void |
mouseReleasedLeft(double x,
double y)
Terminates the selection box action and calls the hook method AbstractSelectionBoxMode.selectionBoxAction(Rectangle sb, boolean shiftMode) . |
void |
mouseShiftPressedLeft(double x,
double y)
Initiates the selection box action, by opening a selection box at the given world coordinates. |
void |
mouseShiftReleasedLeft(double x,
double y)
Terminates the selection box action and calls the hook method AbstractSelectionBoxMode.selectionBoxAction(Rectangle sb, boolean shiftMode) . |
protected void |
selectionBoxAction(Rectangle2D.Double sb,
boolean shiftMode)
This method is called when the selection box is closed. |
protected abstract void |
selectionBoxAction(Rectangle sb,
boolean shiftMode)
This method is called when the selection box is closed. |
protected Rectangle2D.Double |
updateDoubleSelectionBox(double x,
double y)
Updates the bounds of the active selection box. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbstractSelectionBoxMode(ViewContainer view)
public AbstractSelectionBoxMode()
Method Detail |
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 mouseShiftPressedLeft(double x, double y)
mouseShiftPressedLeft
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.public void mouseReleasedLeft(double x, double y)
AbstractSelectionBoxMode.selectionBoxAction(Rectangle sb, boolean shiftMode)
.
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 mouseShiftReleasedLeft(double x, double y)
AbstractSelectionBoxMode.selectionBoxAction(Rectangle sb, boolean shiftMode)
.
mouseShiftReleasedLeft
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 Rectangle2D.Double updateDoubleSelectionBox(double x, double y)
protected abstract void selectionBoxAction(Rectangle sb, boolean shiftMode)
sb
- The position and size of the selection box.shiftMode
- true if shift was pressed when
box was closed, false otherwise.
protected void selectionBoxAction(Rectangle2D.Double sb, boolean shiftMode)
sb
- The position and size of the selection box.shiftMode
- true if shift was pressed when
box was closed, false otherwise.
|
© 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 |