ch.claudio.pen
Class Recognizer

java.lang.Object
  extended by java.lang.Thread
      extended by ch.claudio.pen.Recognizer
All Implemented Interfaces:
PenListener, java.lang.Runnable

public class Recognizer
extends java.lang.Thread
implements PenListener

This class or its helpers analyze permanently the ink store to find features. This can be letters or graphical contructs (circle rectangle etc.) or gestures which translate into commands. Everytime a new "dot" is reported and also after some time has expired since the last new dot the central recognizer() method is called to inspect the ink store. Besides that it tries to determine the probable "orientation" of the device.

Version:
$Id: Recognizer.java 148 2006-09-14 20:52:32Z claudio $
Author:
Claudio Nieder

Copyright (C) 2006 Claudio Nieder <private@claudio.ch>, CH-8610 Uster

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Recognizer(InkStore store)
          Remember the ink store and start the thread.
 
Method Summary
 void event(InkDot dotArg)
           
static void main(java.lang.String[] args)
          Print license.
 void run()
          Call recognizer periodically if no dot was entrred for some time.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ch.claudio.pen.PenListener
inkEvent
 

Constructor Detail

Recognizer

public Recognizer(InkStore store)
Remember the ink store and start the thread.

Parameters:
store -
Method Detail

event

public void event(InkDot dotArg)
See Also:
ch.claudio.pen.PenListener#event(ch.claudio.pen.InkDot)

run

public void run()
Call recognizer periodically if no dot was entrred for some time.

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread
See Also:
Thread.run()

main

public static void main(java.lang.String[] args)
Print license.

Parameters:
args - ignored