|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.event.MouseAdapter
javax.swing.event.MouseInputAdapter
net.sf.jaxodraw.gui.JaxoZoom
public class JaxoZoom
A zoom on the canvas.
Field Summary | |
---|---|
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 Summary | |
---|---|
JaxoZoom(JaxoCanvasComponent canvas)
Constructor. |
Method Summary | |
---|---|
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(MouseEvent e)
The action to be taken when the mouse is dragged on the canvas. |
void |
mousePressed(MouseEvent e)
The action to be taken when the mouse is pressed on the canvas. |
void |
mouseReleased(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(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. |
Methods inherited from class java.awt.event.MouseAdapter |
---|
mouseClicked, mouseEntered, mouseExited, mouseMoved, mouseWheelMoved |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.awt.event.MouseListener |
---|
mouseClicked, mouseEntered, mouseExited |
Methods inherited from interface java.awt.event.MouseMotionListener |
---|
mouseMoved |
Field Detail |
---|
public static final int ZOOM_FACTOR_X2
public static final int ZOOM_FACTOR_X4
public static final int ZOOM_FACTOR_X8
Constructor Detail |
---|
public JaxoZoom(JaxoCanvasComponent canvas)
canvas
- The JaxoCanvas to zoom on.Method Detail |
---|
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(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(MouseEvent e)
mousePressed
in interface MouseListener
mousePressed
in class MouseAdapter
e
- The corresponding mouse event.public final void mouseDragged(MouseEvent e)
mouseDragged
in interface MouseMotionListener
mouseDragged
in class MouseAdapter
e
- The corresponding mouse event.public final void mouseReleased(MouseEvent e)
mouseReleased
in interface MouseListener
mouseReleased
in class MouseAdapter
e
- The corresponding mouse event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |