public class JaxoZoom
extends javax.swing.event.MouseInputAdapter
| Modifier and Type | Field and Description |
|---|---|
static int |
ZOOM_FACTOR_X2
A zoom factor 2.
|
static int |
ZOOM_FACTOR_X4
A zoom factor 4.
|
static int |
ZOOM_FACTOR_X8
A zoom factor 8.
|
| Constructor and Description |
|---|
JaxoZoom(JaxoCanvas canvas)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getZoomFactor()
Returns the zoom factor.
|
static int |
getZoomFactorFor(int mode)
Returns the zoom factor size for the given mode.
|
boolean |
isActive()
Determines the state of this zoom.
|
void |
mouseDragged(java.awt.event.MouseEvent e)
The action to be taken when the mouse is dragged on the canvas.
|
void |
mousePressed(java.awt.event.MouseEvent e)
The action to be taken when the mouse is pressed on the canvas.
|
void |
mouseReleased(java.awt.event.MouseEvent e)
The action to be taken when the mouse is released on the canvas.
|
void |
setActive(boolean value)
Activate/Deactivate this zoom.
|
void |
setBackground(java.awt.Image bg)
Sets the background image for the zoom.
|
void |
setZoomFactor(int zf)
Sets the zoom factor.
|
void |
setZoomFactorFor(int mode)
Set the zoom size for a given mode.
|
void |
setZoomWindowSize(int width,
int height)
Sets the size of the zoom window.
|
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelMovedclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic static final int ZOOM_FACTOR_X2
public static final int ZOOM_FACTOR_X4
public static final int ZOOM_FACTOR_X8
public JaxoZoom(JaxoCanvas canvas)
canvas - The JaxoCanvas to zoom on.public final boolean isActive()
public void setActive(boolean value)
value - True to activate this zoom.public final void setZoomFactor(int zf)
zf - The zoom factor.public final int getZoomFactor()
public final void setZoomWindowSize(int width,
int height)
width - The width of the zoom window.height - The height of the zoom window.public void setBackground(java.awt.Image bg)
bg - The background image.public static final int getZoomFactorFor(int mode)
mode - A JaxoDraw mode as defined in JaxoConstants.public void setZoomFactorFor(int mode)
mode - A JaxoDraw mode as defined in JaxoConstants.public final void mousePressed(java.awt.event.MouseEvent e)
mousePressed in interface java.awt.event.MouseListenermousePressed in class java.awt.event.MouseAdaptere - The corresponding mouse event.public final void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged in interface java.awt.event.MouseMotionListenermouseDragged in class java.awt.event.MouseAdaptere - The corresponding mouse event.public final void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased in interface java.awt.event.MouseListenermouseReleased in class java.awt.event.MouseAdaptere - The corresponding mouse event.Licensed under GPL. For more information, see http://jaxodraw.sourceforge.net/license.html or the LICENSE file in the jaxodraw distribution.