Module io.sf.carte.echosvg.swing
Package io.sf.carte.echosvg.swing.gvt
Class AbstractImageZoomInteractor
java.lang.Object
io.sf.carte.echosvg.swing.gvt.InteractorAdapter
io.sf.carte.echosvg.swing.gvt.AbstractImageZoomInteractor
- All Implemented Interfaces:
Interactor
,KeyListener
,MouseListener
,MouseMotionListener
,EventListener
This class represents a zoom interactor. To use it, just redefine the
InteractorAdapter.startInteraction(java.awt.event.InputEvent)
method.-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
Whether the interactor has finished.protected int
The mouse x current position.protected int
The mouse x start position.protected int
The mouse y current position.protected int
The mouse y start position. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tells whether the interactor has finished.void
Invoked when a mouse button is pressed on a component and then dragged.void
Invoked when a mouse button has been pressed on a component.void
Invoked when a mouse button has been released on a component.Methods inherited from class io.sf.carte.echosvg.swing.gvt.InteractorAdapter
keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, 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.
-
-
Constructor Details
-
AbstractImageZoomInteractor
public AbstractImageZoomInteractor()
-
-
Method Details
-
endInteraction
public boolean endInteraction()Tells whether the interactor has finished.- Specified by:
endInteraction
in interfaceInteractor
- Overrides:
endInteraction
in classInteractorAdapter
-
mousePressed
Invoked when a mouse button has been pressed on a component.- Specified by:
mousePressed
in interfaceMouseListener
- Overrides:
mousePressed
in classInteractorAdapter
-
mouseReleased
Invoked when a mouse button has been released on a component.- Specified by:
mouseReleased
in interfaceMouseListener
- Overrides:
mouseReleased
in 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:
mouseDragged
in interfaceMouseMotionListener
- Overrides:
mouseDragged
in classInteractorAdapter
-