public abstract class FigMouseEvent extends Object
Details:
A FigMouseEvent
represents a mouse event in a figure view.
An instance of this class conveys not only the original GUI toolkit event, but also the view, figure, and doodle corresponding to the event.
Modifier and Type | Class and Description |
---|---|
static class |
FigMouseEvent.ConstructorForm
Parameter form for FigMouseEvent's constructor.
|
Modifier and Type | Field and Description |
---|---|
protected EventObject |
mGuiEvent
Original toolkit event.
|
Modifier | Constructor and Description |
---|---|
protected |
FigMouseEvent(FigMouseEvent.ConstructorForm iForm)
Initializes all fields.
|
Modifier and Type | Method and Description |
---|---|
abstract int |
getButton() |
Doodle |
getDoodle()
Returns affected shape.
|
Figure |
getFigure()
Returns affected figure.
|
EventObject |
getGuiEvent()
Returns GuiEvent property.
|
Point2D |
getLogicalPoint() |
double |
getLogicalX() |
double |
getLogicalY() |
abstract int |
getPhysicalX() |
abstract int |
getPhysicalY() |
InteractiveFigureView |
getView()
Returns view.
|
abstract int |
getWheelRotation() |
InteractiveFigureView |
getWidget()
Deprecated.
Use getView.
|
protected final EventObject mGuiEvent
Details:
Read-GuiEvent
is the original toolkit event object that was received by the view, or the toolkit event on which this FigMouseEvent
is based.
EventObject
happens to be the most specific common superclass of the event object heirarchy used in AWT and SWT.
protected FigMouseEvent(FigMouseEvent.ConstructorForm iForm)
Details:
This constructor creates and initializes a new instance based on the values in the supplied parameter form
.
A parameter form is used because many of the fields in this class are final and must be set in the constructor, but there are too many to keep straight in a parameter list.
iForm
- the parameter formpublic EventObject getGuiEvent()
Details:
getGuiEvent
returns the original toolkit-FigMouseEvent
interface.
Since the original event object will be returned, care should be taken not to modify it, as other listeners may have interest in the object as well.
public InteractiveFigureView getWidget()
Details:
getWidget
returns the GUI widget displaying the figure in which this event took place.
public InteractiveFigureView getView()
Details: This method returns the view associated with this mouse event, or the UI component where the original toolkit event took place.
public Figure getFigure()
Details:
getFigure
returns the figure in which this event took place.
public Doodle getDoodle()
Details:
getShape
returns the shape related to this event, if any.
Note that if no shape is involved, the return value may be null
.
public double getLogicalX()
public double getLogicalY()
public Point2D getLogicalPoint()
public abstract int getPhysicalX()
public abstract int getPhysicalY()
public abstract int getButton()
public abstract int getWheelRotation()
Copyright © 2013. All Rights Reserved.