public class SuperZoomPanTool extends DragTool implements java.awt.event.MouseWheelListener
AbstractCursorTool.Listener| Modifier and Type | Field and Description |
|---|---|
static java.awt.Cursor |
CURSOR_PAN |
static java.awt.Cursor |
CURSOR_WHEEL |
static java.awt.Cursor |
CURSOR_ZOOM |
static int |
INDICATOR_MODE_IMAGE
The visual indicator (area of interest) is painted as an Image.
|
static int |
INDICATOR_MODE_SHAPE
The visual indicator (area of interest) is painted as a Shape.
|
static double |
WHEEL_ZOOM_FACTOR |
static double |
ZOOM_IN_FACTOR |
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSourceisLinuxOS, panel| Constructor and Description |
|---|
SuperZoomPanTool() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate(LayerViewPanel layerViewPanel) |
void |
cacheImage() |
java.awt.Image |
createImageIfNeeded(java.awt.Image currImage)
Creates a new Image if currImage doesn't exist
or is the wrong size for the panel.
|
void |
deactivate() |
protected void |
gestureFinished() |
boolean |
getAnimatingZoom() |
java.awt.Cursor |
getCursor() |
javax.swing.Icon |
getIcon() |
protected java.awt.Image |
getImage()
This method have to return an Image as a visual indicator.
|
protected java.awt.Point |
getImagePosition()
This method have to return the position for the Image.
|
int |
getIndicatorMode() |
java.lang.String |
getName()
Returns a very brief description of this CursorTool.
|
protected java.awt.Shape |
getShape() |
protected java.awt.Shape |
getShape(java.awt.geom.Point2D source,
java.awt.geom.Point2D destination) |
boolean |
isRightMouseButtonUsed() |
void |
mouseClicked(java.awt.event.MouseEvent e) |
void |
mouseDragged(java.awt.event.MouseEvent e) |
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e)
Begins handling of the drag.
|
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
void |
redrawIndicator()
Redraws the visual indicator.
|
boolean |
setAnimatingZoom(boolean animating) |
void |
setIndicatorMode(int indicatorMode)
Sets the indicatorMode.
|
protected void |
zoomAt(java.awt.geom.Point2D p,
double zoomFactor,
boolean animatingZoom) |
getBoxInModelCoordinates, getModelDestination, getModelSource, getViewDestination, getViewSource, modelClickBuffer, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClickadd, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, createCursor, createCursor, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getPanel, getPanel, getSnapManager, getTaskFrame, getWorkbench, getWorkbenchFrame, isGestureInProgress, isRollingBackInvalidEdits, isShapeOnScreen, mouseEntered, mouseExited, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setFilling, setPanel, setStroke, setStrokeWidth, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFramepublic static final double WHEEL_ZOOM_FACTOR
public static final double ZOOM_IN_FACTOR
public static java.awt.Cursor CURSOR_ZOOM
public static java.awt.Cursor CURSOR_PAN
public static java.awt.Cursor CURSOR_WHEEL
public static final int INDICATOR_MODE_SHAPE
public static final int INDICATOR_MODE_IMAGE
public void activate(LayerViewPanel layerViewPanel)
activate in interface CursorToolactivate in class AbstractCursorToolpublic void deactivate()
deactivate in interface CursorTooldeactivate in class DragToolpublic void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
mouseWheelMoved in interface java.awt.event.MouseWheelListenerprotected java.awt.Shape getShape()
throws java.lang.Exception
protected java.awt.Image getImage()
AbstractCursorToolgetImage in class AbstractCursorToolprotected java.awt.Point getImagePosition()
AbstractCursorToolAbstractCursorTool.getImage() method.
For the abstract problematic please see AbstractCursorTool.getImage().getImagePosition in class AbstractCursorToolpublic void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved in interface java.awt.event.MouseMotionListenermouseMoved in class AbstractCursorToolpublic void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked in interface java.awt.event.MouseListenermouseClicked in class AbstractCursorToolpublic void mousePressed(java.awt.event.MouseEvent e)
DragToolmousePressed in interface java.awt.event.MouseListenermousePressed in class DragToolpublic boolean isRightMouseButtonUsed()
isRightMouseButtonUsed in interface CursorToolisRightMouseButtonUsed in class AbstractCursorToolpublic java.awt.Cursor getCursor()
getCursor in interface CursorToolgetCursor in class AbstractCursorToolpublic javax.swing.Icon getIcon()
getIcon in interface CursorToolpublic java.lang.String getName()
CursorToolgetName in interface CursorToolgetName in class AbstractCursorToolpublic void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class DragToolpublic void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class DragToolprotected java.awt.Shape getShape(java.awt.geom.Point2D source,
java.awt.geom.Point2D destination)
protected void gestureFinished()
throws java.awt.geom.NoninvertibleTransformException
gestureFinished in class AbstractCursorTooljava.awt.geom.NoninvertibleTransformExceptionpublic java.awt.Image createImageIfNeeded(java.awt.Image currImage)
currImage - an image bufferpublic void cacheImage()
public boolean setAnimatingZoom(boolean animating)
public boolean getAnimatingZoom()
protected void zoomAt(java.awt.geom.Point2D p,
double zoomFactor,
boolean animatingZoom)
throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformExceptionpublic void redrawIndicator()
public int getIndicatorMode()
public void setIndicatorMode(int indicatorMode)
INDICATOR_MODE_SHAPE,
INDICATOR_MODE_IMAGE.indicatorMode - the indicatorMode to set