|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--java.awt.Window
|
+--java.awt.Frame
|
+--Tablet
In this class last_index refers to the index of the last point read in the points array (ie. it can directly be used to access the last point entered. last_index is actually one less than the number of calid points in the points array. Due to derivation, speed array's length is equal to last_index. Also acceleration's legnth is (last_index-1). Time array has the same length as points. It stores the time that was supplied to addPoint( Point point, long time ) method. In order to make proper use of cached data, additions to points and time array should be done via the addPoint( Point point, long time ) method.
| Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
| Field Summary | |
boolean |
a_is_valid
|
java.awt.MenuItem |
a_menu
|
double |
a_scale
|
java.awt.Frame |
a_window
|
java.awt.Graphics |
a_window_graphics
|
double[] |
acceleration
|
static StatisticsModule |
bar_statistics_module
|
Point |
center
|
double |
combine_treshold
|
private ControlModule |
control_module
|
java.awt.MenuItem |
controls_menu
|
double[] |
d
|
boolean |
d_is_valid
|
java.awt.MenuItem |
d_menu
|
double |
d_theta_scale
|
java.awt.Frame |
d_window
|
java.awt.Graphics |
d_window_graphics
|
double[] |
dd_dt
|
boolean |
dd_dt_is_valid
|
java.awt.MenuItem |
dd_dt_menu
|
java.awt.Frame |
dd_dt_window
|
java.awt.Graphics |
dd_dt_window_graphics
|
static boolean |
debug
|
static java.awt.Graphics |
debug_graphics
|
static boolean |
debug2
|
java.awt.Menu |
direction_menu
|
boolean |
display_lsq_vectors
|
java.awt.MenuItem |
display_menu
|
java.awt.Menu |
edit
|
java.awt.Menu |
file
|
boolean |
FILTER_ON
|
boolean |
in_recognition_mode
|
int |
last_index
|
Point[] |
line
|
Point |
lower_left
|
java.awt.MenuBar |
menubar
|
private ObjectManager |
object_manager
|
private java.awt.Dimension |
off_dimension
|
java.awt.Menu |
options
|
double |
orientation_angle
|
Point[] |
output_polygon
|
java.awt.Menu |
pen_menu
|
Point[] |
points
|
PolarPoint[] |
polar_points
|
boolean |
polar_points_is_valid
|
java.awt.MenuItem |
quit_menu
|
java.awt.Dimension |
radius
|
double |
scale
|
double |
sd_scale
|
static long |
sequence_delay
|
boolean |
show_parsed_objects
|
static StatisticsModule |
sliding_window_statistics_module
|
double[] |
speed
|
java.awt.MenuItem |
statistics_menu
|
double |
step_angle
|
double |
t_scale
|
double |
theta_scale
|
long[] |
time
|
double |
turn_angle_treshold
|
java.awt.MenuItem |
undo_menu
|
Point |
upper_right
|
boolean |
v_is_valid
|
java.awt.MenuItem |
v_menu
|
double |
v_scale
|
java.awt.Frame |
v_window
|
java.awt.Graphics |
v_window_graphics
|
java.awt.MenuItem |
vectors_menu
|
static double |
window_width
|
java.awt.Menu |
windows
|
static java.awt.Graphics |
x_window_graphics
|
| Fields inherited from class java.awt.Frame |
base,
CROSSHAIR_CURSOR,
DEFAULT_CURSOR,
E_RESIZE_CURSOR,
frameSerializedDataVersion,
HAND_CURSOR,
icon,
ICONIFIED,
mbManagement,
menuBar,
MOVE_CURSOR,
N_RESIZE_CURSOR,
nameCounter,
NE_RESIZE_CURSOR,
NORMAL,
NW_RESIZE_CURSOR,
ownedWindows,
resizable,
S_RESIZE_CURSOR,
SE_RESIZE_CURSOR,
serialVersionUID,
state,
SW_RESIZE_CURSOR,
TEXT_CURSOR,
title,
W_RESIZE_CURSOR,
WAIT_CURSOR,
weakThis |
| Fields inherited from class java.awt.Window |
active,
base,
focusMgr,
inputContext,
nameCounter,
OPENED,
ownedWindowList,
serialVersionUID,
state,
warningString,
weakThis,
windowListener,
windowSerializedDataVersion |
| Fields inherited from class java.awt.Container |
component,
containerListener,
containerSerializedDataVersion,
dispatcher,
layoutMgr,
maxSize,
ncomponents,
serialVersionUID |
| Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
| Constructor Summary | |
Tablet(int max_data_points,
double s,
double avg_scale,
java.lang.String cursor_image_name)
The constructor. |
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Handle action events |
void |
addPoint(Point p,
long t)
Add a new point to points, and the corresponding time info to time. |
double |
averageSpeed()
Average speed |
void |
clearScreen()
Clear screen |
void |
clearScreenStrong()
Clear screen strong (works in debug mode). |
void |
combineEndPoints()
Combines the ends of the polygon if they are sufficiently close. |
void |
derive_d()
Derive direction, and fill in the d array. |
void |
derive_dd_dt()
Derive time derivative of direction, and fill in the dd_dt array. |
void |
deriveAcceleration()
Derive acceleration, and fill in the acceleration array. |
void |
deriveBoundingBox()
Derive the bounding box for thee points. |
void |
derivePolarCoordinates()
Derive the polar coordinates of the points with respect to the center. |
void |
deriveSpeed()
Derive speed, and fill in the speed array. |
void |
filter()
Try to get rid of some of the noise. |
Polygon |
getDataPoints()
Put the valid points in the points array in a Polygon and return it. |
int[] |
getPolygonIndices()
calculate the lsq error. |
void |
invalidateCaches()
Invalidates caches |
void |
keyPressed(java.awt.event.KeyEvent k)
Handle key stroke events |
void |
keyReleased(java.awt.event.KeyEvent k)
Handle key stroke events |
void |
keyTyped(java.awt.event.KeyEvent k)
Handle key stroke events |
double |
leastSquaresForCircle()
calculate the lsq error. |
double |
leastSquaresForPolygon()
calculate the lsq error. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Handle mouse events |
void |
mouseDragged(java.awt.event.MouseEvent e)
Handle mouse motion events |
void |
mouseEntered(java.awt.event.MouseEvent e)
Handle mouse events |
void |
mouseExited(java.awt.event.MouseEvent e)
Handle mouse events |
void |
mouseMoved(java.awt.event.MouseEvent e)
Handle mouse motion events |
void |
mousePressed(java.awt.event.MouseEvent e)
Handle mouse events |
void |
mouseReleased(java.awt.event.MouseEvent e)
Handle mouse events |
void |
normalizePolygon()
Modify the polygon, so that the lines appear as the user wanted them to be (ie, get rid of the small rotations and shifts. |
void |
paint(java.awt.Graphics g)
Overloaded for double buffering. |
void |
plot_output_circle()
Plot the recognized circle if one was recognized. |
void |
plot_output_line()
Plot the recognized line if one was recognized. |
void |
plot_output_polygon()
Plot the recognized polygon if one was recognized. |
void |
reset()
Reset the arrays |
void |
setDebugging(boolean d)
Set debugging mode |
void |
setRecognitionMode(boolean flag)
Disable or enable recognition process by turning mouse event listening off or on. |
void |
simplifyPolygon()
Simplify the polygon to get rid of consecutive lines which are sufficiently parallel. |
void |
sleep(int iterations)
Do useless work for some number of iterations specified by the argument. |
boolean |
test_circle()
See if the input was meant to be a circle. |
boolean |
test_line()
See if the input is a line. |
boolean |
test_polygon()
See if the input is a polygon. |
void |
update_d()
Update the direction graph. |
void |
update_dd_dt()
Update change in direction |
void |
update(java.awt.Graphics g)
Handle double buffering and do the real drawing. |
void |
updateAcceleration()
Update the acceleration graph. |
void |
updateMain()
Update the main graph. |
void |
updateVelocity()
Update the velocity graph. |
| Methods inherited from class java.awt.Frame |
|
| Methods inherited from class java.awt.Window |
addOwnedWindow,
addWindowListener,
applyResourceBundle,
applyResourceBundle,
connectOwnedWindow,
dispatchEventImpl,
dispose,
eventEnabled,
getFocusOwner,
getInputContext,
getLocale,
getOwnedWindows,
getOwner,
getToolkit,
getWarningString,
hide,
isActive,
isShowing,
nextFocus,
ownedInit,
pack,
postEvent,
postWindowEvent,
preProcessKeyEvent,
processEvent,
processWindowEvent,
removeOwnedWindow,
removeWindowListener,
setCursor,
setFocusOwner,
setWarningString,
show,
toBack,
toFront,
transferFocus |
| Methods inherited from class java.awt.Container |
add,
add,
add,
add,
add,
addContainerListener,
addImpl,
applyOrientation,
countComponents,
deliverEvent,
dispatchEventToSelf,
doLayout,
findComponentAt,
findComponentAt,
getAlignmentX,
getAlignmentY,
getComponent,
getComponentAt,
getComponentAt,
getComponentCount,
getComponents_NoClientCode,
getComponents,
getCursorTarget,
getInsets,
getLayout,
getMaximumSize,
getMinimumSize,
getMouseEventTarget,
getPreferredSize,
getWindow,
insets,
invalidate,
invalidateTree,
isAncestorOf,
layout,
lightweightPrint,
list,
list,
locate,
minimumSize,
paintComponents,
postsOldMouseEvents,
preferredSize,
print,
printComponents,
printOneComponent,
processContainerEvent,
proxyEnableEvents,
proxyRequestFocus,
remove,
remove,
removeAll,
removeContainerListener,
setFont,
setLayout,
updateCursor,
validate,
validateTree |
| Methods inherited from class java.awt.Component |
action,
add,
addComponentListener,
addFocusListener,
addInputMethodListener,
addKeyListener,
addMouseListener,
addMouseMotionListener,
addPropertyChangeListener,
addPropertyChangeListener,
areInputMethodsEnabled,
bounds,
checkImage,
checkImage,
coalesceEvents,
contains,
contains,
createImage,
createImage,
disable,
disableEvents,
dispatchEvent,
enable,
enable,
enableEvents,
enableInputMethods,
firePropertyChange,
getBackground,
getBounds,
getBounds,
getColorModel,
getComponentOrientation,
getCursor,
getDropTarget,
getFont_NoClientCode,
getFont,
getFontMetrics,
getForeground,
getGraphics,
getHeight,
getInputMethodRequests,
getIntrinsicCursor,
getLocation,
getLocation,
getLocationOnScreen,
getName,
getNativeContainer,
getParent_NoClientCode,
getParent,
getPeer,
getSize,
getSize,
getToolkitImpl,
getTreeLock,
getWidth,
getWindowForObject,
getX,
getY,
gotFocus,
handleEvent,
hasFocus,
imageUpdate,
inside,
isDisplayable,
isDoubleBuffered,
isEnabled,
isEnabledImpl,
isFocusTraversable,
isLightweight,
isOpaque,
isValid,
isVisible,
keyDown,
keyUp,
list,
list,
list,
location,
lostFocus,
mouseDown,
mouseDrag,
mouseEnter,
mouseExit,
mouseMove,
mouseUp,
move,
nextFocus,
paintAll,
prepareImage,
prepareImage,
printAll,
processComponentEvent,
processFocusEvent,
processInputMethodEvent,
processKeyEvent,
processMouseEvent,
processMouseMotionEvent,
removeComponentListener,
removeFocusListener,
removeInputMethodListener,
removeKeyListener,
removeMouseListener,
removeMouseMotionListener,
removePropertyChangeListener,
removePropertyChangeListener,
repaint,
repaint,
repaint,
repaint,
requestFocus,
reshape,
resize,
resize,
setBackground,
setBounds,
setBounds,
setComponentOrientation,
setDropTarget,
setEnabled,
setForeground,
setLocale,
setLocation,
setLocation,
setName,
setSize,
setSize,
setVisible,
show,
size,
toString,
transferFocus |
| Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
| Field Detail |
public int last_index
public Point[] points
public Point[] output_polygon
public long[] time
public double[] speed
public double[] acceleration
public double[] d
public double[] dd_dt
public PolarPoint[] polar_points
public double scale
public double a_scale
public double v_scale
public double t_scale
public double theta_scale
public double combine_treshold
public double d_theta_scale
public double sd_scale
public double step_angle
public double orientation_angle
public double turn_angle_treshold
public Point lower_left
public Point upper_right
public Point center
public java.awt.Dimension radius
public Point[] line
public boolean polar_points_is_valid
public boolean v_is_valid
public boolean a_is_valid
public boolean d_is_valid
public boolean dd_dt_is_valid
public boolean display_lsq_vectors
public boolean show_parsed_objects
public boolean in_recognition_mode
public java.awt.Frame v_window
public java.awt.Frame a_window
public java.awt.Frame d_window
public java.awt.Frame dd_dt_window
public java.awt.MenuBar menubar
public java.awt.Menu file
public java.awt.MenuItem quit_menu
public java.awt.Menu edit
public java.awt.MenuItem undo_menu
public java.awt.Menu windows
public java.awt.MenuItem v_menu
public java.awt.MenuItem a_menu
public java.awt.Menu pen_menu
public java.awt.Menu direction_menu
public java.awt.MenuItem d_menu
public java.awt.MenuItem dd_dt_menu
public java.awt.MenuItem controls_menu
public java.awt.MenuItem statistics_menu
public java.awt.Menu options
public java.awt.MenuItem vectors_menu
public java.awt.MenuItem display_menu
public static boolean debug
public static boolean debug2
public static java.awt.Graphics x_window_graphics
public static java.awt.Graphics debug_graphics
public static StatisticsModule bar_statistics_module
public static StatisticsModule sliding_window_statistics_module
public static double window_width
public java.awt.Graphics v_window_graphics
public java.awt.Graphics a_window_graphics
public java.awt.Graphics d_window_graphics
public java.awt.Graphics dd_dt_window_graphics
private java.awt.Dimension off_dimension
public static long sequence_delay
public final boolean FILTER_ON
private ObjectManager object_manager
private ControlModule control_module
| Constructor Detail |
public Tablet(int max_data_points,
double s,
double avg_scale,
java.lang.String cursor_image_name)
| Method Detail |
public void setDebugging(boolean d)
public void paint(java.awt.Graphics g)
public void keyPressed(java.awt.event.KeyEvent k)
public void keyReleased(java.awt.event.KeyEvent k)
public void keyTyped(java.awt.event.KeyEvent k)
public void actionPerformed(java.awt.event.ActionEvent e)
public void mouseClicked(java.awt.event.MouseEvent e)
public void mouseEntered(java.awt.event.MouseEvent e)
public void mouseExited(java.awt.event.MouseEvent e)
public void mousePressed(java.awt.event.MouseEvent e)
public void reset()
public void addPoint(Point p,
long t)
public void setRecognitionMode(boolean flag)
public void invalidateCaches()
public void mouseReleased(java.awt.event.MouseEvent e)
public void mouseDragged(java.awt.event.MouseEvent e)
public void clearScreen()
public void clearScreenStrong()
public void mouseMoved(java.awt.event.MouseEvent e)
public void update(java.awt.Graphics g)
public void updateMain()
public void updateVelocity()
public void updateAcceleration()
public void update_d()
public void update_dd_dt()
public void filter()
public void deriveSpeed()
public Polygon getDataPoints()
public void derivePolarCoordinates()
public void deriveBoundingBox()
public void deriveAcceleration()
public void derive_d()
public void derive_dd_dt()
public double averageSpeed()
public boolean test_circle()
public void plot_output_circle()
public boolean test_polygon()
public boolean test_line()
public void normalizePolygon()
public void combineEndPoints()
public void simplifyPolygon()
public void plot_output_line()
public void plot_output_polygon()
public int[] getPolygonIndices()
public double leastSquaresForPolygon()
public double leastSquaresForCircle()
public void sleep(int iterations)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||