Package org.apache.batik.swing.gvt
Class AbstractRotateInteractor
java.lang.Object
org.apache.batik.swing.gvt.InteractorAdapter
org.apache.batik.swing.gvt.AbstractRotateInteractor
- All Implemented Interfaces:
KeyListener
,MouseListener
,MouseMotionListener
,EventListener
,Interactor
This class represents a rotate interactor.
To use it, just redefine the
InteractorAdapter.startInteraction(java.awt.event.InputEvent)
method.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
Whether the interactor has finished.protected double
The initial rotation angle. -
Constructor Summary
Constructors -
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 the mouse exits a component.void
Invoked when a mouse button has been pressed on a component.void
Invoked when a mouse button has been released on a component.protected AffineTransform
rotateTransform
(Dimension d, int x, int y) Returns the rotate transform.Methods inherited from class org.apache.batik.swing.gvt.InteractorAdapter
keyPressed, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseMoved, startInteraction
-
Field Details
-
finished
protected boolean finishedWhether the interactor has finished. -
initialRotation
protected double initialRotationThe initial rotation angle.
-
-
Constructor Details
-
AbstractRotateInteractor
public AbstractRotateInteractor()
-
-
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
-
mouseExited
Invoked when the mouse exits a component.- Specified by:
mouseExited
in interfaceMouseListener
- Overrides:
mouseExited
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
-
rotateTransform
Returns the rotate transform.
-