public final class AwtTransformInteractor extends Object implements TransformInteractor, FigMouseButtonListener, FigMouseMotionListener, FigMouseWheelListener
Details:
A AwtTransformInteractor
listens to mouse events within a figure's view and interactively transforms the view in a manner that is suitable for views rendered in the AWT/
Left-
The public methods in this class are callbacks reserved for internal use and should not be invoked directly by client software.
Constructor and Description |
---|
AwtTransformInteractor() |
Modifier and Type | Method and Description |
---|---|
void |
mouseButtonPressed(FigMouseEvent iEvent)
Arms translation or rotation.
|
void |
mouseButtonReleased(FigMouseEvent iEvent)
Disarms translation or rotation.
|
void |
mouseCursorEntered(FigMouseEvent iEvent)
Ignored.
|
void |
mouseCursorExited(FigMouseEvent iEvent)
Ignored.
|
void |
mouseCursorMoved(FigMouseEvent iEvent)
Translates view.
|
void |
mouseWheelRotated(FigMouseEvent iEvent)
Scales or rotates view.
|
public void mouseButtonPressed(FigMouseEvent iEvent)
Details: This implementation arms the transformer for translation or rotation, depending on which button was pressed.
mouseButtonPressed
in interface FigMouseButtonListener
iEvent
- the mouse button eventFigMouseButtonListener.mouseButtonReleased(FigMouseEvent)
public void mouseButtonReleased(FigMouseEvent iEvent)
Details: This implementation disarms the transformer for translation or rotation, depending on which mouse button was released.
mouseButtonReleased
in interface FigMouseButtonListener
iEvent
- the mouse button eventpublic void mouseCursorMoved(FigMouseEvent iEvent)
Details: This implementation translates the view in response to mouse movement, if translation is armed.
mouseCursorMoved
in interface FigMouseMotionListener
iEvent
- the movement eventpublic void mouseCursorEntered(FigMouseEvent iEvent)
Details: This event is ignored.
mouseCursorEntered
in interface FigMouseMotionListener
iEvent
- describes the eventpublic void mouseCursorExited(FigMouseEvent iEvent)
Details: This event is ignored.
mouseCursorExited
in interface FigMouseMotionListener
iEvent
- describes the eventpublic void mouseWheelRotated(FigMouseEvent iEvent)
Details: This implementation scales or rotates the view, depending on whether the wheel button is pressed.
mouseWheelRotated
in interface FigMouseWheelListener
iEvent
- the wheel rotation eventCopyright © 2013. All Rights Reserved.