Class AbstractZoomTool
java.lang.Object
com.vividsolutions.jump.workbench.ui.cursortool.AbstractCursorTool
com.vividsolutions.jump.workbench.ui.cursortool.DragTool
com.vividsolutions.jump.workbench.ui.zoom.AbstractZoomTool
- All Implemented Interfaces:
CursorTool, MouseListener, MouseMotionListener, EventListener
- Direct Known Subclasses:
PanTool, ZoomRealtimeTool, ZoomTool
-
Nested Class Summary
Nested classes/interfaces inherited from class AbstractCursorTool
AbstractCursorTool.Listener -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Imageprotected intprotected Imageprotected doubleprotected Point2D.DoubleFields inherited from class DragTool
DEFAULT_VIEW_CLICK_BUFFER, modelDestination, modelSourceFields inherited from class AbstractCursorTool
isLinuxOS, panel -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcreateImageIfNeeded(Image currImage) Creates a new Image if currImage doesn't exist or is the wrong size for the panel.voiddrawImage(int dx, int dy, double scale) protected voidbooleanprotected Point2DgetIcon()voidprotected voidscaleImageAtCentre(double zoomFactor) protected voidscaleImageAtPoint(Point2D p, double zoomFactor) booleansetAnimatingZoom(boolean animating) protected voidMethods inherited from class DragTool
deactivate, getBoxInModelCoordinates, getModelDestination, getModelSource, getShape, getShape, getViewDestination, getViewSource, modelClickBuffer, mouseDragged, mousePressed, mouseReleased, setModelDestination, setModelSource, setViewClickBuffer, setViewDestination, setViewSource, wasClickMethods inherited from class AbstractCursorTool
activate, add, allowSnapping, cancelGesture, check, cleanup, clearImage, clearShape, componentWithFocusIsHandledByCursorTools, createCursor, createCursor, createCursor, createStandardSnappingPolicies, drawImageXOR, drawImageXOR, drawShapeXOR, drawShapeXOR, execute, execute, fireGestureFinished, getColor, getImage, getImagePosition, getName, getPanel, getPanel, getSnapManager, getStroke, getTaskFrame, getWorkbench, getWorkbenchContext, isGestureInProgress, isRightMouseButtonUsed, isRollingBackInvalidEdits, isShapeOnScreen, mouseClicked, mouseEntered, mouseExited, mouseMoved, name, prohibitSnapping, redrawImage, redrawShape, reportNothingToUndoYet, setColor, setControlPressed, setFilling, setPanel, setShiftPressed, setStroke, setup, snap, snap, supportsSnapping, toString, wasControlPressed, wasShiftPressed
-
Field Details
-
origImage
-
auxImage
-
scale
protected double scale -
mouseWheelCount
protected int mouseWheelCount -
zoomTo
-
-
Constructor Details
-
AbstractZoomTool
-
-
Method Details
-
setAnimatingZoom
public boolean setAnimatingZoom(boolean animating) -
getAnimatingZoom
public boolean getAnimatingZoom() -
getIcon
- Returns:
- null to use a default icon
-
getCursor
- Specified by:
getCursorin interfaceCursorTool- Overrides:
getCursorin classAbstractCursorTool
-
gestureFinished
- Specified by:
gestureFinishedin classAbstractCursorTool- Throws:
NoninvertibleTransformException
-
mouseWheelMoved
-
scaleImageAtCentre
protected void scaleImageAtCentre(double zoomFactor) -
scaleImageAtPoint
-
createImageIfNeeded
-
cacheImage
public void cacheImage() -
getCentre
- Throws:
NoninvertibleTransformException
-
zoomAt
protected void zoomAt(Point2D p, double zoomFactor, boolean animatingZoom) throws NoninvertibleTransformException - Throws:
NoninvertibleTransformException
-
drawImage
public void drawImage(int dx, int dy, double scale)
-