public class PUtil extends Object
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
PUtil() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final long DEFAULT_ACTIVITY_STEP_RATE
public static final int ACTIVITY_SCHEDULER_FRAME_DELAY
public static final Iterator NULL_ITERATOR
public static final Enumeration NULL_ENUMERATION
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 serializedIOException
- 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 readIOException
- occurs if an exception occurs reading from in streamClassNotFoundException
- 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 streamClassNotFoundException
- 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 serializedIOException
- if unknown path segment type is encountered, or an
exception occurs writing to the output streamCopyright © 1995-2013 Piccolo2D. All Rights Reserved.