Class AbstractZoomInteractor
java.lang.Object
org.apache.batik.swing.gvt.InteractorAdapter
org.apache.batik.swing.gvt.AbstractZoomInteractor
- All Implemented Interfaces:
KeyListener, MouseListener, MouseMotionListener, EventListener, Interactor
This class represents a zoom interactor.
To use it, just redefine the
InteractorAdapter.startInteraction(java.awt.event.InputEvent) method.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classTo paint the interactor. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the interactor has finished.protected Line2DThe zoom marker bottom line.protected Line2DThe zoom marker left line.protected Line2DThe zoom marker right line.protected BasicStrokeUsed to draw markerprotected Line2DThe zoom marker top line.protected OverlayThe overlay.protected intThe mouse x current position.protected intThe mouse x start position.protected intThe mouse y current position.protected intThe mouse y start position. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTells whether the interactor has finished.voidInvoked when a mouse button is pressed on a component and then dragged.voidInvoked when the mouse exits a component.voidInvoked when a mouse button has been pressed on a component.voidInvoked when a mouse button has been released on a component.Methods inherited from class InteractorAdapter
keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseMoved, startInteraction
-
Field Details
-
finished
protected boolean finishedWhether the interactor has finished. -
xStart
protected int xStartThe mouse x start position. -
yStart
protected int yStartThe mouse y start position. -
xCurrent
protected int xCurrentThe mouse x current position. -
yCurrent
protected int yCurrentThe mouse y current position. -
markerTop
The zoom marker top line. -
markerLeft
The zoom marker left line. -
markerBottom
The zoom marker bottom line. -
markerRight
The zoom marker right line. -
overlay
The overlay. -
markerStroke
Used to draw marker
-
-
Constructor Details
-
AbstractZoomInteractor
public AbstractZoomInteractor()
-
-
Method Details
-
endInteraction
public boolean endInteraction()Tells whether the interactor has finished.- Specified by:
endInteractionin interfaceInteractor- Overrides:
endInteractionin classInteractorAdapter
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressedin interfaceMouseListener- Overrides:
mousePressedin classInteractorAdapter
-
mouseReleased
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleasedin interfaceMouseListener- Overrides:
mouseReleasedin classInteractorAdapter
-
mouseExited
Invoked when the mouse exits a component.- Specified by:
mouseExitedin interfaceMouseListener- Overrides:
mouseExitedin classInteractorAdapter
-
mouseDragged
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 interfaceMouseMotionListener- Overrides:
mouseDraggedin classInteractorAdapter
-