|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.umd.cs.piccolo.util.PUtil
public class PUtil
PUtil util methods for the Piccolo framework.
Field Summary | |
---|---|
static int |
ACTIVITY_SCHEDULER_FRAME_DELAY
Rate in milliseconds at which the activity timer will get invoked. |
static long |
DEFAULT_ACTIVITY_STEP_RATE
PActivities are broken into steps, this is how many milliseconds should pass between steps. |
static Enumeration |
NULL_ENUMERATION
A utility enumeration with no elements. |
static Iterator |
NULL_ITERATOR
An iterator that iterates over an empty collection. |
static OutputStream |
NULL_OUTPUT_STREAM
Deprecated. This has been moved into a private static class of PObjectOutputStream |
Constructor Summary | |
---|---|
PUtil()
|
Method Summary | |
---|---|
static PCamera |
createBasicScenegraph()
Creates the simplest possible scene graph. |
static GeneralPath |
readPath(ObjectInputStream in)
Reads a path from the provided inputStream in accordance with the serialization policy defined in writePath. |
static Stroke |
readStroke(ObjectInputStream in)
Reconstitutes a stroke from the provided Object Input Stream. |
static void |
writePath(GeneralPath path,
ObjectOutputStream out)
Serializes the given path to the provided Object Output Stream. |
static void |
writeStroke(Stroke stroke,
ObjectOutputStream out)
Serializes the given stroke object to the object output stream provided. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static long DEFAULT_ACTIVITY_STEP_RATE
public static int ACTIVITY_SCHEDULER_FRAME_DELAY
public static Iterator NULL_ITERATOR
public static Enumeration NULL_ENUMERATION
public static OutputStream NULL_OUTPUT_STREAM
Constructor Detail |
---|
public PUtil()
Method Detail |
---|
public static PCamera createBasicScenegraph()
public static void writeStroke(Stroke stroke, ObjectOutputStream out) throws IOException
stroke
- stroke to be serializeout
- stream to which the stroke is to be serialized
IOException
- can occur if exception occurs with underlying output
streampublic static Stroke readStroke(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- stream from which Stroke is to be read
IOException
- occurs if an exception occurs reading from in stream
ClassNotFoundException
- should never happen, but can if somehow
the stroke class is not on the classpathpublic static GeneralPath readPath(ObjectInputStream in) throws IOException, ClassNotFoundException
in
- stream from which to read the path.
IOException
- if an unknown path type is read from the stream
ClassNotFoundException
- should never happen, but can if somehow
the classpath is seriously messed uppublic static void writePath(GeneralPath path, ObjectOutputStream out) throws IOException
path
- path to be serializedout
- stream to which the path should be serialized
IOException
- if unknown path segment type is encountered, or an
exception occurs writing to the output stream
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |