|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
fr.lri.swingstates.events.VirtualEvent
strokes.listeners.StrokeEvent
public class StrokeEvent
A stroke event.
Field Summary | |
---|---|
static short |
SHORTCUT_RECOGNIZED
The constant used for type field of events occurring when a stroke ends and has been recognized as a shortcut. |
static short |
STROKE_BEGUN
The constant used for type field of events occurring when a stroke begins. |
static short |
STROKE_NON_RECOGNIZED
The constant used for type field of events occurring when a stroke begins ends and has not been recognized.. |
static short |
STROKE_POINT_ADDED
The constant used for type field of events occurring when a point is added to a stroke. |
static short |
STROKE_RECOGNIZED
The constant used for type field of events occurring when a stroke ends and has been recognized. |
Constructor Summary | |
---|---|
StrokeEvent(java.lang.Object source,
java.awt.event.MouseEvent event,
short type,
fr.lri.swingstates.gestures.Gesture gesture)
Builds a StrokeEvent . |
|
StrokeEvent(java.lang.Object source,
java.lang.String command,
java.awt.event.MouseEvent event,
short type,
fr.lri.swingstates.gestures.Gesture gesture)
Builds a StrokeEvent . |
Method Summary | |
---|---|
java.lang.String |
getCommand()
|
java.awt.event.MouseEvent |
getMouseEvent()
|
java.awt.Point |
getPointInComponent(java.awt.Component component)
Recturns the last point of the stroke that causes this stroke event in a component coordinate systems. |
fr.lri.swingstates.gestures.Gesture |
getStroke()
|
fr.lri.swingstates.gestures.Gesture |
getStrokeInComponent(java.awt.Component component)
Returns, the stroke of this stroke event as a gesture (i.e., a collection of points with their input time) in a component's coordinate system. |
short |
getType()
|
void |
setStroke(fr.lri.swingstates.gestures.Gesture gesture)
|
Methods inherited from class fr.lri.swingstates.events.VirtualEvent |
---|
getMatchingTransitions, getNameEvent, setNameEvent, setSource |
Methods inherited from class java.util.EventObject |
---|
getSource, toString |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static short STROKE_BEGUN
type
field of events occurring when a stroke begins.
strokes.listeners
public static short STROKE_POINT_ADDED
type
field of events occurring when a point is added to a stroke.
strokes.listeners
public static short STROKE_RECOGNIZED
type
field of events occurring when a stroke ends and has been recognized.
strokes.listeners
public static short SHORTCUT_RECOGNIZED
type
field of events occurring when a stroke ends and has been recognized as a shortcut.
strokes.listeners
public static short STROKE_NON_RECOGNIZED
type
field of events occurring when a stroke begins ends and has not been recognized..
strokes.listeners
Constructor Detail |
---|
public StrokeEvent(java.lang.Object source, java.lang.String command, java.awt.event.MouseEvent event, short type, fr.lri.swingstates.gestures.Gesture gesture)
StrokeEvent
.
source
- The source of the eventcommand
- The name of the command recognized for the stroke underlying this eventevent
- The mouse event that causes this stroke eventtype
- The event type: STROKE_BEGUN
, STROKE_POINT_ADDED
, STROKE_RECOGNIZED
, SHORTCUT_RECOGNIZED
or STROKE_NON_RECOGNIZED
.gesture
- The gesture, i.e. the stroke points with their input timepublic StrokeEvent(java.lang.Object source, java.awt.event.MouseEvent event, short type, fr.lri.swingstates.gestures.Gesture gesture)
StrokeEvent
.
source
- The source of the eventevent
- The mouse event that causes this stroke eventtype
- The event type: STROKE_BEGUN
, STROKE_POINT_ADDED
, STROKE_RECOGNIZED
, SHORTCUT_RECOGNIZED
or STROKE_NON_RECOGNIZED
.gesture
- The gesture, i.e. the stroke points with their input timeMethod Detail |
---|
public java.awt.event.MouseEvent getMouseEvent()
public java.awt.Point getPointInComponent(java.awt.Component component)
component
- The component
component
public short getType()
STROKE_BEGUN
, STROKE_POINT_ADDED
, STROKE_RECOGNIZED
, SHORTCUT_RECOGNIZED
or STROKE_NON_RECOGNIZED
.public fr.lri.swingstates.gestures.Gesture getStroke()
public fr.lri.swingstates.gestures.Gesture getStrokeInComponent(java.awt.Component component)
component
- The component
component
public void setStroke(fr.lri.swingstates.gestures.Gesture gesture)
public java.lang.String getCommand()
SHORTCUT_RECOGNIZED
and STROKE_RECOGNIZED
, null otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |