|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.claudio.pen.InkStore
public class InkStore
Stores every ink seen together with time, velocity and acceleration information.
To remove stored dots that result from menu activation some mark and restore back to mark function might be useful.
Copyright (C) 2006-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 | |
---|---|
InkStore()
|
Method Summary | |
---|---|
void |
clear()
Removes all stored ink. |
boolean |
equals(java.lang.Object obj)
|
InkDot |
getLast()
|
int |
hashCode()
|
java.util.Iterator<InkDot> |
iterateList()
|
void |
load(java.io.InputStream in)
Read ink from an input stream |
void |
load(java.lang.String path)
Read ink from a file |
static void |
main(java.lang.String[] args)
Print license. |
InkDot |
newDot(int xArg,
int yArg,
PenState stateArg,
long time)
Create a dot, compute velocity and acceleration and store it. |
void |
save(java.io.OutputStream out)
Transfer the stored ink to an output stream |
void |
save(java.lang.String path)
Transfer the stored ink to a file |
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public InkStore()
Method Detail |
---|
public int size()
List.size()
public InkDot getLast()
public InkDot newDot(int xArg, int yArg, PenState stateArg, long time)
xArg
- positionyArg
- positionstateArg
- statetime
- of event
public void clear()
public void save(java.io.OutputStream out) throws java.io.IOException
out
-
java.io.IOException
java.io.IOException
public void save(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException
path
- path to the file
java.io.IOException
java.io.FileNotFoundException
public void load(java.io.InputStream in) throws java.io.IOException, java.lang.ClassNotFoundException
in
-
java.io.IOException
java.lang.ClassNotFoundException
public void load(java.lang.String path) throws java.io.FileNotFoundException, java.io.IOException, java.lang.ClassNotFoundException
path
- path of the file
java.lang.ClassNotFoundException
java.io.IOException
java.io.FileNotFoundException
public java.util.Iterator<InkDot> iterateList()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
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 |