Package org.apache.batik.swing.gvt
Class AbstractZoomInteractor
- java.lang.Object
-
- org.apache.batik.swing.gvt.InteractorAdapter
-
- org.apache.batik.swing.gvt.AbstractZoomInteractor
-
- All Implemented Interfaces:
java.awt.event.KeyListener,java.awt.event.MouseListener,java.awt.event.MouseMotionListener,java.util.EventListener,Interactor
public class AbstractZoomInteractor extends InteractorAdapter
This class represents a zoom interactor. To use it, just redefine theInteractorAdapter.startInteraction(java.awt.event.InputEvent)method.- Version:
- $Id: AbstractZoomInteractor.java 1808975 2017-09-20 08:59:36Z ssteiner $
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classAbstractZoomInteractor.ZoomOverlayTo paint the interactor.
-
Field Summary
Fields Modifier and Type Field Description protected booleanfinishedWhether the interactor has finished.protected java.awt.geom.Line2DmarkerBottomThe zoom marker bottom line.protected java.awt.geom.Line2DmarkerLeftThe zoom marker left line.protected java.awt.geom.Line2DmarkerRightThe zoom marker right line.protected java.awt.BasicStrokemarkerStrokeUsed to draw markerprotected java.awt.geom.Line2DmarkerTopThe zoom marker top line.protected OverlayoverlayThe overlay.protected intxCurrentThe mouse x current position.protected intxStartThe mouse x start position.protected intyCurrentThe mouse y current position.protected intyStartThe mouse y start position.
-
Constructor Summary
Constructors Constructor Description AbstractZoomInteractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanendInteraction()Tells whether the interactor has finished.voidmouseDragged(java.awt.event.MouseEvent e)Invoked when a mouse button is pressed on a component and then dragged.voidmouseExited(java.awt.event.MouseEvent e)Invoked when the mouse exits a component.voidmousePressed(java.awt.event.MouseEvent e)Invoked when a mouse button has been pressed on a component.voidmouseReleased(java.awt.event.MouseEvent e)Invoked when a mouse button has been released on a component.-
Methods inherited from class org.apache.batik.swing.gvt.InteractorAdapter
keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseMoved, startInteraction
-
-
-
-
Field Detail
-
finished
protected boolean finished
Whether the interactor has finished.
-
xStart
protected int xStart
The mouse x start position.
-
yStart
protected int yStart
The mouse y start position.
-
xCurrent
protected int xCurrent
The mouse x current position.
-
yCurrent
protected int yCurrent
The mouse y current position.
-
markerTop
protected java.awt.geom.Line2D markerTop
The zoom marker top line.
-
markerLeft
protected java.awt.geom.Line2D markerLeft
The zoom marker left line.
-
markerBottom
protected java.awt.geom.Line2D markerBottom
The zoom marker bottom line.
-
markerRight
protected java.awt.geom.Line2D markerRight
The zoom marker right line.
-
overlay
protected Overlay overlay
The overlay.
-
markerStroke
protected java.awt.BasicStroke markerStroke
Used to draw marker
-
-
Method Detail
-
endInteraction
public boolean endInteraction()
Tells whether the interactor has finished.- Specified by:
endInteractionin interfaceInteractor- Overrides:
endInteractionin classInteractorAdapter
-
mousePressed
public void mousePressed(java.awt.event.MouseEvent e)
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfacejava.awt.event.MouseListener- Overrides:
mousePressedin classInteractorAdapter
-
mouseReleased
public void mouseReleased(java.awt.event.MouseEvent e)
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfacejava.awt.event.MouseListener- Overrides:
mouseReleasedin classInteractorAdapter
-
mouseExited
public void mouseExited(java.awt.event.MouseEvent e)
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfacejava.awt.event.MouseListener- Overrides:
mouseExitedin classInteractorAdapter
-
mouseDragged
public void mouseDragged(java.awt.event.MouseEvent e)
Invoked when a mouse button is pressed on a component and then dragged. Mouse drag events will continue to be delivered to the component where the first originated until the mouse button is released (regardless of whether the mouse position is within the bounds of the component).- Specified by:
mouseDraggedin interfacejava.awt.event.MouseMotionListener- Overrides:
mouseDraggedin classInteractorAdapter
-
-