strokes.listeners
Class StrokeAdapter

java.lang.Object
  extended by strokes.listeners.StrokeAdapter
All Implemented Interfaces:
StrokeListener
Direct Known Subclasses:
FlickCriterion

public class StrokeAdapter
extends java.lang.Object
implements StrokeListener

An abstract adapter class for receiving stroke events. The methods in this class are empty. This class exists as convenience for creating listener objects.

Stroke events let you track when a stroke begins, receives a new point and ends as a recognized shortcut or as non recognized.

Extend this class to create a StrokeEvent listener and override the methods for the events of interest. (If you implement the StrokeListener interface, you have to define all of the methods in it. This abstract class defines null methods for them all, so you can only have to define methods for events you care about.)

Create a listener object using the extended class and then register it with a component using the stroke shortcut manager's addStrokeListener method.

Author:
Caroline Appert

Constructor Summary
StrokeAdapter()
           
 
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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrokeAdapter

public StrokeAdapter()
Method Detail

strokeBegun

public void strokeBegun(StrokeEvent event)
Invoked when a stroke begins.

Specified by:
strokeBegun in interface StrokeListener
Parameters:
event - The stroke event.

strokePointAdded

public void strokePointAdded(StrokeEvent event)
Invoked when a point is added to a stroke.

Specified by:
strokePointAdded in interface StrokeListener
Parameters:
event - The stroke event.

strokeNotRecognized

public void strokeNotRecognized(StrokeEvent event)
Invoked when a stroke ends and has not been recognized as a shortcut.

Specified by:
strokeNotRecognized in interface StrokeListener
Parameters:
event - The stroke event.

shortcutRecognized

public void shortcutRecognized(StrokeEvent event)
Invoked when a stroke ends and has not been recognized as a shortcut.

Specified by:
shortcutRecognized in interface StrokeListener
Parameters:
event - The stroke event.

strokeRecognized

public void strokeRecognized(StrokeEvent event)
Invoked when a stroke ends and has been recognized by the stroke shortcuts manager but not as as a shortcut.

Specified by:
strokeRecognized in interface StrokeListener
Parameters:
event - The stroke event.