public abstract class AbstractZoomTool extends DragTool
AbstractCursorTool.Listener
Modifier and Type | Field and Description |
---|---|
protected java.awt.Image |
auxImage |
protected int |
mouseWheelCount |
protected java.awt.Image |
origImage |
protected double |
scale |
protected java.awt.geom.Point2D.Double |
zoomTo |
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSource
isLinuxOS, panel
Constructor and Description |
---|
AbstractZoomTool() |
Modifier and Type | Method and Description |
---|---|
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 |
drawImage(int dx,
int dy,
double scale) |
protected void |
gestureFinished() |
boolean |
getAnimatingZoom() |
protected java.awt.geom.Point2D |
getCentre() |
java.awt.Cursor |
getCursor() |
javax.swing.Icon |
getIcon() |
void |
mouseWheelMoved(java.awt.event.MouseWheelEvent e) |
protected void |
scaleImageAtCentre(double zoomFactor) |
protected void |
scaleImageAtPoint(java.awt.geom.Point2D p,
double zoomFactor) |
boolean |
setAnimatingZoom(boolean animating) |
protected void |
zoomAt(java.awt.geom.Point2D p,
double zoomFactor,
boolean animatingZoom) |
deactivate, getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mousePressed, mouseReleased, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClick
activate, add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, createCursor, createCursor, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, fireGestureFinished, getColor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getTaskFrame, getWorkbench, getWorkbenchFrame, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setFilling, setPanel, setStroke, setStrokeWidth, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed, workbench, workbenchFrame
protected java.awt.Image origImage
protected java.awt.Image auxImage
protected double scale
protected int mouseWheelCount
protected java.awt.geom.Point2D.Double zoomTo
public boolean setAnimatingZoom(boolean animating)
public boolean getAnimatingZoom()
public javax.swing.Icon getIcon()
public java.awt.Cursor getCursor()
getCursor
in interface CursorTool
getCursor
in class AbstractCursorTool
protected void gestureFinished() throws java.awt.geom.NoninvertibleTransformException
gestureFinished
in class AbstractCursorTool
java.awt.geom.NoninvertibleTransformException
public void mouseWheelMoved(java.awt.event.MouseWheelEvent e)
protected void scaleImageAtCentre(double zoomFactor)
protected void scaleImageAtPoint(java.awt.geom.Point2D p, double zoomFactor)
public java.awt.Image createImageIfNeeded(java.awt.Image currImage)
currImage
- an image bufferpublic void cacheImage()
protected java.awt.geom.Point2D getCentre() throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
protected void zoomAt(java.awt.geom.Point2D p, double zoomFactor, boolean animatingZoom) throws java.awt.geom.NoninvertibleTransformException
java.awt.geom.NoninvertibleTransformException
public void drawImage(int dx, int dy, double scale)