|
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
y.view.AreaZoomMode
public class AreaZoomMode
Implements a a ViewMode which allows setting the visible part of
a view via a rectangle.
Set instances of this class as a
child ViewMode
of the current ViewMode to allow for interactive zooming.
![]() |
![]() |
| 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 | |
|---|---|
AreaZoomMode()
|
|
| 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. |
protected void |
focusView(double newZoom,
java.awt.geom.Point2D newCenter)
Calls focusView(newZoom, newCenter, isAnimatedZoomEnabled()); . |
protected void |
focusView(double newZoom,
java.awt.geom.Point2D newCenter,
boolean animatedZoom)
Calls view.focusView(newZoom, newCenter, animatedZoom); view.updateView();. |
java.awt.Cursor |
getCursor()
Getter for the cursor that is used when this ViewMode is active. |
boolean |
isAnimatedZoomEnabled()
Returns whether or not area zooming will be performed in a smooth animated fashion. |
protected void |
selectionBoxAction(java.awt.geom.Rectangle2D.Double sb,
boolean shiftMode)
Zooms view to selection box bounds and updates view. |
protected void |
selectionBoxAction(java.awt.Rectangle sb,
boolean shiftMode)
zooms view to selection box bounds and updates view. |
void |
setAnimatedZoomEnabled(boolean animated)
Whether or not area zooming should be performed in a smooth animated fashion. |
void |
setCursor(java.awt.Cursor cursor)
Setter for the cursor that is used when this ViewMode is active. |
| Methods inherited from class y.view.AbstractSelectionBoxMode |
|---|
cancelEditing, mouseDraggedLeft, mousePressedLeft, mouseReleasedLeft, mouseReleasedRight, mouseShiftPressedLeft, mouseShiftReleasedLeft, updateDoubleSelectionBox |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AreaZoomMode()
| Method Detail |
|---|
protected void selectionBoxAction(java.awt.Rectangle sb,
boolean shiftMode)
selectionBoxAction in class AbstractSelectionBoxModesb - The position and size of the selection box.shiftMode - true if shift was pressed when
box was closed, false otherwise.public void activate(boolean b)
ViewMode.ACTIVE_PROPERTY as the property name.
activate in class ViewModeb - set true when mode was activated
false otherwise
protected void selectionBoxAction(java.awt.geom.Rectangle2D.Double sb,
boolean shiftMode)
selectionBoxAction in class AbstractSelectionBoxModesb - The position and size of the selection box.shiftMode - true if shift was pressed when
box was closed, false otherwise.
protected void focusView(double newZoom,
java.awt.geom.Point2D newCenter)
focusView(newZoom, newCenter, isAnimatedZoomEnabled()); .
newZoom - the new zoom factornewCenter - the new center
protected void focusView(double newZoom,
java.awt.geom.Point2D newCenter,
boolean animatedZoom)
view.focusView(newZoom, newCenter, animatedZoom); view.updateView();.
newZoom - the new zoom factornewCenter - the new centerpublic java.awt.Cursor getCursor()
public void setCursor(java.awt.Cursor cursor)
cursor - public void setAnimatedZoomEnabled(boolean animated)
public boolean isAnimatedZoomEnabled()
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||