Class FlexiblePatternCoordinateConverter

  extended by edu.stanford.hci.r3.pattern.coordinates.conversion.FlexiblePatternCoordinateConverter
All Implemented Interfaces:

public class FlexiblePatternCoordinateConverter
extends java.lang.Object
implements PatternCoordinateConverter

This coordinate converter will automatically move to wherever the anchor point is set, and will take on the width and height of its associated region. The anchor will be set to the first sample that comes in, if it is not otherwise set. Thus, this pattern coordinate converter can be easily changed at runtime. Be careful if you have more than one of these in your paper application, as the first one encountered may consume the event before the other one sees if (if the two regions somehow become "overlapped"). Also, if you never set your anchor point, this region may opportunistically steal pen input from another region on your sheet, if it is encountered first by the EventEngine.

This software is distributed under the BSD License.

Constructor Summary
FlexiblePatternCoordinateConverter(Region floatingRegion)
Method Summary
 boolean contains(StreamedPatternCoordinates coord)
 double getArea()
 java.lang.String getRegionName()
 PercentageCoordinates getRelativeLocation(StreamedPatternCoordinates coord)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public FlexiblePatternCoordinateConverter(Region floatingRegion)
floatingRegion -
Method Detail


public boolean contains(StreamedPatternCoordinates coord)
Specified by:
contains in interface PatternCoordinateConverter
See Also:


public double getArea()
Specified by:
getArea in interface PatternCoordinateConverter
the area, in pattern dots squared, of this patch.


public java.lang.String getRegionName()
Specified by:
getRegionName in interface PatternCoordinateConverter


public PercentageCoordinates getRelativeLocation(StreamedPatternCoordinates coord)
Specified by:
getRelativeLocation in interface PatternCoordinateConverter

Copyright 2006 Stanford University