|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface StrokeListener
The listener interface for stroke events fired by the stroke shortcuts manager.
The class that is interested in processing stroke events implements this interface (and the method it contains).
The listener object created from that class is then registered to the stroke shortcuts manager manager
using
the addStrokeListener
method on manager
.
StrokeShortcuts manager = new StrokeShortcuts(); ... manager.addStrokeListener(new StrokeListener() { public void strokeBegun(StrokeEvent event) { System.out.println("New stroke..."); } public void strokePointAdded(StrokeEvent event) { System.out.println(".add point."); } public void shortcutRecognized(StrokeEvent event) { System.out.println("...End shortcut: "+event.getStrokeClass()); } public void strokeRecognized(StrokeEvent event) { System.out.println("...End stroke: "+event.getStrokeClass()); } public void strokeNotRecognized(StrokeEvent event) { System.out.println("...End non recognized stroke."); } });
StrokeAdapter
,
StrokeEvent
Method Summary | |
---|---|
void |
shortcutRecognized(StrokeEvent event)
Invoked when a stroke ends and has not been recognized as a shortcut. |
void |
strokeBegun(StrokeEvent event)
Invoked when a stroke begins. |
void |
strokeNotRecognized(StrokeEvent event)
Invoked when a stroke ends and has not been recognized as a shortcut. |
void |
strokePointAdded(StrokeEvent event)
Invoked when a point is added to a stroke. |
void |
strokeRecognized(StrokeEvent event)
Invoked when a stroke ends and has been recognized by the stroke shortcuts manager but not as as a shortcut. |
Method Detail |
---|
void strokeBegun(StrokeEvent event)
event
- The stroke event.void strokePointAdded(StrokeEvent event)
event
- The stroke event.void shortcutRecognized(StrokeEvent event)
event
- The stroke event.void strokeRecognized(StrokeEvent event)
event
- The stroke event.void strokeNotRecognized(StrokeEvent event)
event
- The stroke event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |