|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.ViewMode
y.view.AbstractSelectionBoxMode
public abstract class 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
selectionBoxAction(java.awt.Rectangle, boolean) is invoked.
![]() |
![]() |
| 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 | |
|---|---|
AbstractSelectionBoxMode()
Instantiates a new AbstractSelectionBoxMode. |
|
AbstractSelectionBoxMode(ViewContainer view)
Instantiates a new AbstractSelectionBoxMode for a given ViewContainer. |
|
| Method Summary | |
|---|---|
void |
cancelEditing()
Aborts the selection box action and removes the temporary box drawn in the view. |
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 selectionBoxAction(Rectangle sb, boolean shiftMode). |
void |
mouseReleasedRight(double x,
double y)
Called when the right mouse button was released |
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 selectionBoxAction(Rectangle sb, boolean shiftMode). |
protected void |
selectionBoxAction(java.awt.geom.Rectangle2D.Double sb,
boolean shiftMode)
This method is called when the selection box is closed. |
protected abstract void |
selectionBoxAction(java.awt.Rectangle sb,
boolean shiftMode)
This method is called when the selection box is closed. |
protected java.awt.geom.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 ViewModex - the x-coordinate of the mouse event in world coordinates.y - the y-coordinate of the mouse event in world coordinates.public void cancelEditing()
cancelEditing in class ViewMode
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 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.
public void mouseReleasedLeft(double x,
double y)
selectionBoxAction(Rectangle sb, boolean shiftMode).
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 mouseShiftReleasedLeft(double x,
double y)
selectionBoxAction(Rectangle sb, boolean shiftMode).
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 mouseReleasedRight(double x,
double y)
ViewMode
mouseReleasedRight 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 java.awt.geom.Rectangle2D.Double updateDoubleSelectionBox(double x,
double y)
protected abstract void selectionBoxAction(java.awt.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(java.awt.geom.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-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||