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
FieldsModifier and TypeFieldDescriptionprotected booleanWhether the interactor has finished.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 a mouse button has been pressed on a component.voidInvoked 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:
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
-
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
-