|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.claudio.pen.InkDot
public class InkDot
Stores the data for a single Ink point
Note: This class measures time with millisecond precision. This is enough with the Sahara digitizer which delivers point information as 5 byte blocks at a speed of 9600 bit/s and is thus limited to 240 points per second.
Copyright (C) 2005-2008 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
Constructor Summary | |
---|---|
InkDot(int xArg,
int yArg,
PenState stateArg,
InkDot previousArg,
long timeArg)
Create a new ink dot with all information. |
Method Summary | |
---|---|
void |
clearPrevious()
Break the chain. |
boolean |
equals(java.lang.Object obj)
|
double |
getAcceleration()
As the velocity is measured as scalar, acceleration due to direction change is lost. |
double |
getAngle()
As the velocity is measured as scalar, acceleration due to direction change is lost. |
double |
getDistance()
|
InkDot |
getPrevious()
|
PenState |
getState()
|
long |
getTime()
Time in microseconds |
double |
getVelocity()
As the velocity is measured as scalar, acceleration due to direction change is lost. |
int |
getX()
|
int |
getY()
|
int |
hashCode()
|
boolean |
isDragged()
Inquire the state of the pen |
boolean |
isPressed()
Inquire the state of the pen |
boolean |
isReleased()
Inquire the state of the pen |
static void |
main(java.lang.String[] args)
Print license. |
void |
setTime(long timeArg)
Time in microseconds |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InkDot(int xArg, int yArg, PenState stateArg, InkDot previousArg, long timeArg)
xArg
- yArg
- stateArg
- previousArg
- timeArg
- Method Detail |
---|
public PenState getState()
public boolean isPressed()
public boolean isDragged()
public boolean isReleased()
public InkDot getPrevious()
public void clearPrevious()
public double getDistance()
public double getVelocity()
public double getAngle()
public double getAcceleration()
public long getTime()
public void setTime(long timeArg)
timeArg
- The time to set.public int getX()
public int getY()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public static void main(java.lang.String[] args)
args
- ignored
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |