public final class SwtTransformInteractor extends Object implements TransformInteractor, FigMouseButtonListener, FigMouseMotionListener
Details:
An SwtTransformInteractor
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 SWT environment.
This does not mean, however, that this transform interactor cannot be used with other toolkits.
That is why this class is kept in fig-core, rather than fig-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 |
---|
SwtTransformInteractor() |
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.
|
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 eventCopyright © 2013. All Rights Reserved.