

PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
java.lang.Object edu.neu.ccs.gui.PathList
The PathList
class combines an explicit sequence
of PathNode
objects together with a winding rule to
provide a flexible alternative to the Java class
GeneralPath
.
A PathList
may be constructed or modifed using a list of
PathNode
objects or a Shape
or
a PathIterator
.
Conversely, from a PathList
, one can construct a
Shape
or a PathIterator
.
Unlike GeneralPath
, PathList
does not
implement Shape
directly since we separate the aspects of
collecting the path node data from the shape issues. This class provides
methods to create various Shape
objects as desired.
PathList
utilizes the Java class GeneralPath
for the implementation of the construction of a Shape
given
the data in this class.
In construction of a Shape
via GeneralPath
,
Java requires that the start node have type MOVE. If this condition
does not hold, Java throws IllegalPathStateException
. In
this class, the requirement that the start node have type MOVE is tested
by the method isValid()
. If this method returns false and
the user calls makeShape
, an empty Shape
will
be returned by this call rather than throwing an exception.
Field Summary  
private static int 
CAP_ROUND
Constant used to contruct stroke. 
static int 
CLOSE
Shorthand constant for PathIterator.SEG_CLOSE. 
static int 
CUBIC
Shorthand constant for PathIterator.SEG_CUBICTO. 
protected JFileChooser 
filechooser
The file chooser used for file I/O. 
protected File 
home
Initialization for home directory as directory ".". 
private static int 
JOIN_ROUND
Constant used to contruct stroke. 
static int 
LINE
Shorthand constant for PathIterator.SEG_LINETO. 
static int 
MOVE
Shorthand constant for PathIterator.SEG_MOVETO. 
protected Vector 
pathlist
The path list. 
static int 
QUAD
Shorthand constant for PathIterator.SEG_QUADTO. 
static String 
standardMessage
The standard error message for fromStringData. 
static String 
String_WIND_EVEN_ODD
The String constant for WindingRule.WIND_EVEN_ODD. 
static String 
String_WIND_NON_ZERO
The String constant for WindingRule.WIND_NON_ZERO. 
protected FileExtensionFilter 
textFileFilter
The file filter for file I/O that restricts to .txt files. 
protected WindingRule 
windingrule
The winding rule as an object. 
Constructor Summary  
PathList()
The default constructor that sets the path list to empty and the winding rule to WindingRule.WIND_NON_ZERO. 

PathList(PathIterator iterator)
The constructor that initializes the path list using the path nodes and winding rule obtained from the given PathIterator . 

PathList(PathList list)
The constructor that makes a deep clone of an existing path list. 

PathList(PathNode[] nodes)
The constructor that initializes the path list using the given array of path nodes and sets the winding rule to WindingRule.WIND_NON_ZERO. 

PathList(PathNode[] nodes,
int rule)
The constructor that initializes the path list using the given array of path nodes and the given winding rule. 

PathList(PathNode[] nodes,
WindingRule rule)
The constructor that initializes the path list using the given array of path nodes and the given winding rule. 

PathList(Point2D[] points,
boolean close)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed. 

PathList(Point2D[] points,
boolean close,
int rule)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed; the given winding rule determines the winding rule. 

PathList(Point2D[] points,
boolean close,
WindingRule rule)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed; the given winding rule determines the winding rule. 

PathList(Shape shape)
The constructor that initializes the path list using the path nodes and winding rule obtained from the given Shape . 

PathList(Shape shape,
AffineTransform transform)
The constructor that initializes the path list using the path nodes and winding rule obtained from the given Shape
after applying the given transform
to the shape data. 

PathList(Shape shape,
AffineTransform transform,
double flatness)
The constructor that initializes the path list using the path nodes and winding rule obtained from the given Shape
after applying the given transform and flatness
to the shape data. 
Method Summary  
void 
add(int index,
PathNode node)
Inserts the specified node at the specified position in this PathList and shifts any elements right as needed. 
void 
add(int index,
PathNode[] nodes)
Inserts the specified array of nodes into this PathList starting at the specified position in
the list and shifts any elements right as needed. 
void 
add(int index,
PathNode[] nodes,
boolean connect)
Inserts the specified array of nodes into this PathList starting at the specified position in
the list and shifts any elements right as needed. 
void 
append(PathIterator iterator)
Extracts the path node data from the given iterator and appends the nodes to this path list. 
void 
append(PathIterator iterator,
boolean connect)
Extracts the path node data from the given iterator and appends the nodes to this path list. 
void 
append(PathNode node)
Appends the specified node to this PathList . 
void 
append(PathNode[] nodes)
Appends the specified array of nodes to this PathList . 
void 
append(PathNode[] nodes,
boolean connect)
Appends the specified array of nodes to this PathList . 
void 
append(Shape shape)
Extracts the path node data from the given shape and appends the nodes to this path list. 
void 
append(Shape shape,
AffineTransform transform)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform. 
void 
append(Shape shape,
AffineTransform transform,
boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform. 
void 
append(Shape shape,
AffineTransform transform,
double flatness)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform and flatness. 
void 
append(Shape shape,
AffineTransform transform,
double flatness,
boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform and flatness. 
void 
append(Shape shape,
boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list. 
void 
cloneAndAdd(int index,
PathNode node)
Inserts a clone of the specified node at the specified position in this PathList and shifts any elements right as needed. 
void 
cloneAndAdd(int index,
PathNode[] nodes)
Inserts clones of the specified array of nodes to this PathList starting at the specified position in
the list and shifts any elements right as needed. 
void 
cloneAndAdd(int index,
PathNode[] nodes,
boolean connect)
Inserts clones of the specified array of nodes to this PathList starting at the specified position in
the list and shifts any elements right as needed. 
void 
cloneAndAppend(PathNode node)
Appends a clone of the specified node to this PathList . 
void 
cloneAndAppend(PathNode[] nodes)
Appends clones of the specified array of nodes to this PathList . 
void 
cloneAndAppend(PathNode[] nodes,
boolean connect)
Appends clones of the specified array of nodes to this PathList . 
void 
fromStringData(String data)
Sets the data of this path list using String
data in the format produced by toString() . 
PathNode 
get(int index)
Returns the PathNode at the given index
if the given index is in range;
otherwise returns null . 
PathNode[] 
getPathNodes()
Returns a PathNode array with the current
path nodes in this path list. 
String[] 
getPathNodeStateArray()
Returns a String with the value of the method
toStringData applied to each item in the array
returned by getPathNodes . 
float[] 
getShapePoint(float t)
Without actually constructing the shape, this function returns the mathematical point at float parameter t on the shape that would correspond to this path list. 
float[] 
getSlot(int[] indices)
Returns the contents of the slot indices[1] of
the PathNode at the index indices[0]
if indices is nonnull
and of length 2
and if the index is in range and the slot is valid;
otherwise returns null . 
float[] 
getSlot(int index,
int slot)
Returns the contents of the given slot of the PathNode at the given index
if the index is in range and the slot is valid;
otherwise returns null . 
WindingRule 
getWindingRule()
Get the winding rule as an object. 
WindingRule 
getWindingRuleFromStringData(String data)
Returns the WindingRule that corresponds to the
given String data. 
String 
getWindingRuleString()
Returns a String with the winding rule information. 
boolean 
isPolygon()
Returns true if the list has at least 2 nodes, all nodes in the list have one of the following 3 types MOVE, LINE, CLOSE, and the first node is MOVE. 
boolean 
isStrictPolygon()
Returns true if the list has at least 2 nodes, the initial node has type MOVE, the final node has type LINE or CLOSE, all inner nodes have type LINE, and at least one node has type LINE. 
boolean 
isValid()
Returns true if this PathList is a valid path list
for the construction of a Shape . 
PathList 
makeBezierDotsPathList()
Returns a new PathList with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations. 
PathListIterator 
makeBezierDotsPathListIterator()
Returns a PathListIterator constructed from
an instance of makeBezierDotsPathList() . 
Shape 
makeBezierDotsShape()
Returns a Shape that consists of the bezier dots. 
static Shape 
makeBezierDotsShape(Shape shape)
Static method that returns the bezier dots shape corresponding to the given shape. 
PathList 
makeBezierPathList()
Returns a new PathList with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations. 
PathListIterator 
makeBezierPathListIterator()
Returns a PathListIterator constructed from
an instance of makeBezierPathList() . 
Point2D[] 
makeBezierPoints()
Returns a new Point2D[] whose points are built
to include the bezier points of the path list by the following
operations. 
static Point2D[] 
makeBezierPoints(Shape shape)
Static method that returns the bezier point array for the given shape. 
Shape 
makeBezierShape()
Returns a polygonal Shape that passes through
the bezier points of this pathlist, that is, both the vertex
points and the control points. 
static Shape 
makeBezierShape(Shape shape)
Static method that returns the bezier shape corresponding to the given shape. 
PathList 
makeControlDotsPathList()
Returns a new PathList with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations. 
PathListIterator 
makeControlDotsPathListIterator()
Returns a PathListIterator constructed from
an instance of makeControlDotsPathList() . 
Shape 
makeControlDotsShape()
Returns a Shape that consists of the control dots. 
static Shape 
makeControlDotsShape(Shape shape)
Static method that returns the control dots shape corresponding to the given shape. 
Point2D[] 
makeControlPoints()
Returns a new Point2D[] whose points are built
to include the control points of the path list by the following
operations. 
static Point2D[] 
makeControlPoints(Shape shape)
Static method that returns the control point array for the given shape. 
PathListIterator 
makePathListIterator()
Factory method that returns a new PathListIterator
based on the current data in this path list. 
Shape 
makeShape()
Factory method that returns a new Shape based on the
current data in this path list. 
PaintableSequence 
makeStructurePaintable()
Returns a PaintableSequence whose components
show the structure of the Shape associated with
this PathList . 
PaintableSequence 
makeStructurePaintable(Color fillColor,
Color drawColor,
Color vertexDotsColor,
Color controlDotsColor,
Color vertexFrameColor,
Color bezierFrameColor,
int thickness)
Returns a PaintableSequence whose components
show the structure of the Shape associated with
this PathList . 
PaintableSequence 
makeStructurePaintable(Color fillColor,
Color drawColor,
int thickness)
Returns a PaintableSequence whose components
show the structure of the Shape associated with
this PathList . 
PaintableSequence 
makeStructurePaintable(int thickness)
Returns a PaintableSequence whose components
show the structure of the Shape associated with
this PathList . 
PathList 
makeVertexDotsPathList()
Returns a new PathList with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations. 
PathListIterator 
makeVertexDotsPathListIterator()
Returns a PathListIterator constructed from
an instance of makeVertexDotsPathList() . 
Shape 
makeVertexDotsShape()
Returns a Shape that consists of the vertex dots. 
static Shape 
makeVertexDotsShape(Shape shape)
Static method that returns the vertex dots shape corresponding to the given shape. 
PathList 
makeVertexPathList()
Returns a new PathList with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations. 
PathListIterator 
makeVertexPathListIterator()
Returns a PathListIterator constructed from
an instance of makeVertexPathList() . 
Point2D[] 
makeVertexPoints()
Returns a new Point2D[] whose points are built
to include the vertex points of the path list by the following
operations. 
static Point2D[] 
makeVertexPoints(Shape shape)
Static method that returns the vertex point array for the given shape. 
Shape 
makeVertexShape()
Returns a polygonal Shape that passes through
the vertex points of this pathlist. 
static Shape 
makeVertexShape(Shape shape)
Static method that returns the vertex shape corresponding to the given shape. 
int[] 
nearSlot(double x,
double y,
double epsilon)
Searches the nodes in this path list and for each such node searches the slots in the node to determine if the given (x,y) is within epsilon of the values in the slot; if successful, returns an array int[2] with value 0 equal to the node index and value 1 equal to the slot index; if unsuccessful, returns null . 
int[] 
nearSlot(double x,
double y,
double epsilon,
Metric metric)
Searches the nodes in this path list and for each such node searches the slots in the node to determine if the given (x,y) is within epsilon of the values in the slot relative to the given metric; if successful, returns an array int[2] with value 0 equal to the node index and value 1 equal to the slot index; if unsuccessful, returns null . 
boolean 
readDataFromFile()
Opens a file dialog to get the file name of a text file with path list data and then reads the data. 
boolean 
readDataFromFile(File source,
boolean displayErrorDialogs)
Reads the path list data from the given text file. 
PathNode 
remove(int index)
Removes the PathNode at the given index
and returns the removed node. 
PathNode[] 
remove(int m,
int n)
Removes the PathNode s starting at the given
index m inclusive and ending at the given index n exclusive;
returns an array with the removed nodes. 
PathNode[] 
removeAll()
Removes all PathNode s from the path list
and returns an array with the removed nodes. 
boolean 
saveDataToFile()
Opens a file dialog to get the file name of a text file and then saves the data to the file. 
boolean 
saveDataToFile(File target,
boolean displayErrorDialogs)
Saves the path list data to the given text file. 
void 
set(int index,
PathNode node)
Sets the PathNode at the given index
to a copy of the given node
if the given node is nonnull
and if the given index is in range;
otherwise does nothing. 
void 
setPathList(PathIterator iterator)
Sets the path list using the path nodes and winding rule obtained from the given PathIterator . 
void 
setPathList(PathList list)
Sets this path list to be a deep clone of an existing path list. 
void 
setPathList(Shape shape)
Sets the path list using the path nodes and winding rule obtained from the given Shape . 
void 
setPathList(Shape shape,
AffineTransform transform)
Sets the path list using the path nodes and winding rule obtained from the given Shape
after applying the given transform
to the shape data. 
void 
setPathList(Shape shape,
AffineTransform transform,
double flatness)
Sets the path list using the path nodes and winding rule obtained from the given Shape
after applying the given transform and flatness
to the shape data. 
void 
setPathNodes(PathNode[] nodes)
Removes the current nodes in the path list and sets the nodes to those in the given array of nodes. 
void 
setSlot(int[] indices,
float[] pair)
Sets the contents of the slot indices[1] of
the PathNode at the index indices[0]
to the coordinates of the given pair
if indices is nonnull
and of length 2,
if the index is in range and the slot is valid,
and if pair is nonnull
and of length 2;
otherwise does nothing. 
void 
setSlot(int[] indices,
float x,
float y)
Sets the contents of the slot indices[1] of
the PathNode at the index indices[0]
to the given x, y
if indices is nonnull
and of length 2
and if the index is in range and the slot is valid;
otherwise does nothing. 
void 
setSlot(int index,
int slot,
float[] pair)
Sets the contents of the given slot of the PathNode at the given index
to the coordinates of the given pair
if the index is in range and the slot is valid
and if pair is nonnull
and of length 2;
otherwise does nothing. 
void 
setSlot(int index,
int slot,
float x,
float y)
Sets the contents of the given slot of the PathNode at the given index
to the given x, y
if the index is in range and the slot is valid;
otherwise does nothing. 
void 
setWindingRule(int rule)
Sets the winding rule via an int. 
void 
setWindingRule(WindingRule rule)
Sets the winding rule as an object. 
int 
size()
Returns the size of the list. 
String 
toString()
Returns the data in this path list as a multiline String . 
String 
toStringData()
Returns the same String as toString() . 
void 
transform(AffineTransform T)
Transforms the internal data points in each path node using the given affine transform. 
Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait 
Field Detail 
public static final int MOVE
public static final int LINE
public static final int QUAD
public static final int CUBIC
public static final int CLOSE
private static final int CAP_ROUND
private static final int JOIN_ROUND
public static final String standardMessage
public static final String String_WIND_NON_ZERO
public static final String String_WIND_EVEN_ODD
protected Vector pathlist
protected WindingRule windingrule
protected final FileExtensionFilter textFileFilter
protected final File home
protected final JFileChooser filechooser
Constructor Detail 
public PathList()
public PathList(PathNode[] nodes)
The constructor that initializes the path list using the given array of path nodes and sets the winding rule to WindingRule.WIND_NON_ZERO.
nodes
 the nodes to add to the path listpublic PathList(PathNode[] nodes, WindingRule rule)
The constructor that initializes the path list using the given array of path nodes and the given winding rule.
nodes
 the nodes to add to the path listrule
 the winding rule as an objectpublic PathList(PathNode[] nodes, int rule)
The constructor that initializes the path list using the given array of path nodes and the given winding rule.
nodes
 the nodes to add to the path listrule
 the winding rule as an intpublic PathList(PathList list)
The constructor that makes a deep clone of an existing path list.
list
 the path list to clonepublic PathList(PathIterator iterator)
The constructor that initializes the path list using
the path nodes and winding rule obtained from the given
PathIterator
.
The constructor must execute the iteration so when it is
complete then iterator.isDone()
will be true.
iterator
 the iterator whose data is cloned to this listpublic PathList(Shape shape)
The constructor that initializes the path list using
the path nodes and winding rule obtained from the given
Shape
.
shape
 the shape whose data is cloned to this listpublic PathList(Shape shape, AffineTransform transform)
The constructor that initializes the path list using
the path nodes and winding rule obtained from the given
Shape
after applying the given transform
to the shape data.
shape
 the shape whose data is used to make this listtransform
 the transform to apply to the shape datapublic PathList(Shape shape, AffineTransform transform, double flatness)
The constructor that initializes the path list using
the path nodes and winding rule obtained from the given
Shape
after applying the given transform and flatness
to the shape data.
shape
 the shape whose data is used to make this listtransform
 the transform to apply to the shape dataflatness
 the flatness to requirepublic PathList(Point2D[] points, boolean close)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed.
Does nothing if points is null
.
Ignores null
data items in points.
The path list is constructed by doing MOVE to the first point and LINE to all succeeding points. If the boolean close is true then CLOSE is appended at the end.
points
 the polygon pointsclose
 whether or not to close the polygonpublic PathList(Point2D[] points, boolean close, WindingRule rule)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed; the given winding rule determines the winding rule.
Utilizes PathList(Point2D[], boolean)
.
points
 the polygon pointsclose
 whether or not to close the polygonrule
 the winding rule as an objectpublic PathList(Point2D[] points, boolean close, int rule)
The constructor that makes a polygon path list using the given array points of point data; the boolean close determines whether or the polygon is open or closed; the given winding rule determines the winding rule.
Utilizes PathList(Point2D[], boolean)
.
points
 the polygon pointsclose
 whether or not to close the polygonrule
 the winding rule as an intMethod Detail 
public final Shape makeShape()
Factory method that returns a new Shape
based on the
current data in this path list. The Shape
is constructed
using the Java class GeneralPath
.
In construction of a Shape
via GeneralPath
,
Java requires that the start node have type MOVE. If this condition
does not hold, Java throws IllegalPathStateException
. In
this class, the requirement that the start node have type MOVE is tested
by the method isValid()
. If this method returns false and
the user calls makeShape
, an empty Shape
will
be returned by this call rather than throwing an exception.
public final PathListIterator makePathListIterator()
Factory method that returns a new PathListIterator
based on the current data in this path list.
public final PaintableSequence makeStructurePaintable(Color fillColor, Color drawColor, Color vertexDotsColor, Color controlDotsColor, Color vertexFrameColor, Color bezierFrameColor, int thickness)
Returns a PaintableSequence
whose components
show the structure of the Shape
associated with
this PathList
.
Each component in the sequence corresponds to one of the
Color
parameters and if a particular parameter
is null
or has an alpha value of 0 then that
particular component is omitted from the sequence.
The components are inserted into the sequence from top to bottom as follows.
At the top, the dots corresponding to the Bezier control
points are inserted as an internal paintable sequence. Each
dot uses a PointPaintable
with the control dots
color.
Next, the dots corresponding to the vertex points are
inserted as an internal paintable sequence. Each dot uses a
PointPaintable
with the vertex dots color.
Next, the shape constructed by makeShape
is
inserted into the sequence as a ShapePaintable
to
be drawn in the draw color.
Next, the frame constructed by makeBezierShape
is inserted into the sequence as a ShapePaintable
to be drawn in the bezier frame color.
Next, the frame constructed by makeVertexShape
is inserted into the sequence as a ShapePaintable
to be drawn in the vertex frame color.
Finally, the shape constructed by makeShape
is
inserted into the sequence as a ShapePaintable
to
be filled in the fill color.
This order of insertion ensures that the dots are on top, the drawn shape is next, the frames are next, and the filled shape is on the bottom. This order gives the maximum amount of information to the user of this method.
The thickness controls the thickness of the drawing stroke.
Also, the PointPaintable
for the dots uses a size
equal to (thickness+2).
fillColor
 the fill color for the shapedrawColor
 the draw color for the shapevertexDotsColor
 the color for the vertex dotscontrolDotsColor
 the color for the control dotsvertexFrameColor
 the color for the vertex framebezierFrameColor
 the color for the bezier framethickness
 the stroke thicknesspublic final PaintableSequence makeStructurePaintable(Color fillColor, Color drawColor, int thickness)
Returns a PaintableSequence
whose components
show the structure of the Shape
associated with
this PathList
.
Calls the more general method with the following defaults.
vertexDotsColor: Colors.red
controlDotsColor: Colors.darkorange
vertexFrameColor: Colors.transparent
bezierFrameColor: Colors.darkorchid
In particular, with these defaults, the vertex frame is
not included in the PaintableSequence
.
fillColor
 the fill color for the shapedrawColor
 the draw color for the shapethickness
 the stroke thicknesspublic final PaintableSequence makeStructurePaintable(int thickness)
Returns a PaintableSequence
whose components
show the structure of the Shape
associated with
this PathList
.
Calls the more general method with the following defaults.
fillColor: Colors.lime
drawColor: Colors.black
vertexDotsColor: Colors.red
controlDotsColor: Colors.darkorange
vertexFrameColor: Colors.transparent
bezierFrameColor: Colors.darkorchid
In particular, with these defaults, the vertex frame is
not included in the PaintableSequence
.
thickness
 the stroke thicknesspublic final PaintableSequence makeStructurePaintable()
Returns a PaintableSequence
whose components
show the structure of the Shape
associated with
this PathList
.
Calls the more general method with the following defaults.
fillColor: Colors.lime
drawColor: Colors.black
vertexDotsColor: Colors.red
controlDotsColor: Colors.darkorange
vertexFrameColor: Colors.transparent
bezierFrameColor: Colors.darkorchid
thickness: 2
In particular, with these defaults, the vertex frame is
not included in the PaintableSequence
.
public final void setPathNodes(PathNode[] nodes)
Removes the current nodes in the path list and sets the nodes to those in the given array of nodes.
If the given nodes array is null
then
does nothing.
nodes
 the nodes to use for the path listpublic final PathNode[] getPathNodes()
Returns a PathNode
array with the current
path nodes in this path list.
The PathNode
items in the array are live,
that is, they are identical to the current items in the
path list. This means that the user of this array may
make changes to the path list directly. Obviously, this
facility must be used with care.
The length of the array is size()
.
If the user changes the path list by adding or removing items then this array will be out of synchronization with the data in the path list.
public final void setWindingRule(WindingRule rule)
Sets the winding rule as an object.
Does nothing if the parameter is null
.
rule
 the winding rule as an objectpublic final void setWindingRule(int rule)
Sets the winding rule via an int.
GeneralPath.WIND_NON_ZERO
corresponds
to WindingRule.WIND_NON_ZERO
.
GeneralPath.WIND_EVEN_ODD
corresponds
to WindingRule.WIND_EVEN_ODD
.
Ignores an invalid parameter.
rule
 the winding rule as an intpublic final WindingRule getWindingRule()
public final void setPathList(PathList list)
Sets this path list to be a deep clone of an existing path list.
If the given path list is null
then does
nothing.
list
 the path list to clonepublic final void setPathList(PathIterator iterator)
Sets the path list using
the path nodes and winding rule obtained from the given
PathIterator
.
This method must execute the iteration so when it is
complete then iterator.isDone()
will be true.
If the given iterator is null
then does
nothing.
iterator
 the iterator whose data is cloned to this listpublic final void setPathList(Shape shape)
Sets the path list using
the path nodes and winding rule obtained from the given
Shape
.
If the given shape is null
then does
nothing.
shape
 the shape whose data is cloned to this listpublic final void setPathList(Shape shape, AffineTransform transform)
Sets the path list using
the path nodes and winding rule obtained from the given
Shape
after applying the given transform
to the shape data.
shape
 the shape whose data is used to make this listtransform
 the transform to apply to the shape datapublic final void setPathList(Shape shape, AffineTransform transform, double flatness)
Sets the path list using
the path nodes and winding rule obtained from the given
Shape
after applying the given transform and flatness
to the shape data.
shape
 the shape whose data is used to make this listtransform
 the transform to apply to the shape dataflatness
 the flatness to requirepublic final int size()
public final void set(int index, PathNode node)
Sets the PathNode
at the given index
to a copy of the given node
if the given node is nonnull
and if the given index is in range;
otherwise does nothing.
index
 the index of a path node in the path listnode
 the path node to copypublic final PathNode get(int index)
Returns the PathNode
at the given index
if the given index is in range;
otherwise returns null
.
index
 the index of a path node in the path listpublic final void setSlot(int index, int slot, float x, float y)
Sets the contents of the given slot of
the PathNode
at the given index
to the given x, y
if the index is in range and the slot is valid;
otherwise does nothing.
index
 the index of a path node in the path listslot
 the slot within the path node (1, 2, 3)x
 the xcoordinatey
 the ycoordinatepublic final void setSlot(int index, int slot, float[] pair)
Sets the contents of the given slot of
the PathNode
at the given index
to the coordinates of the given pair
if the index is in range and the slot is valid
and if pair
is nonnull
and of length 2;
otherwise does nothing.
index
 the index of a path node in the path listslot
 the slot within the path node (1, 2, 3)pair
 the float[2] array with x, ypublic final void setSlot(int[] indices, float x, float y)
Sets the contents of the slot indices[1]
of
the PathNode
at the index indices[0]
to the given x, y
if indices
is nonnull
and of length 2
and if the index is in range and the slot is valid;
otherwise does nothing.
indices
 the indexslot pairx
 the xcoordinatey
 the ycoordinatepublic final void setSlot(int[] indices, float[] pair)
Sets the contents of the slot indices[1]
of
the PathNode
at the index indices[0]
to the coordinates of the given pair
if indices
is nonnull
and of length 2,
if the index is in range and the slot is valid,
and if pair
is nonnull
and of length 2;
otherwise does nothing.
indices
 the indexslot pairpair
 the float[2] array with x, ypublic final float[] getSlot(int index, int slot)
Returns the contents of the given slot of
the PathNode
at the given index
if the index is in range and the slot is valid;
otherwise returns null
.
index
 the index of a path node in the path listslot
 the slot within the path node (1, 2, 3)public final float[] getSlot(int[] indices)
Returns the contents of the slot indices[1]
of
the PathNode
at the index indices[0]
if indices
is nonnull
and of length 2
and if the index is in range and the slot is valid;
otherwise returns null
.
indices
 the indexslot pairpublic final int[] nearSlot(double x, double y, double epsilon)
Searches the nodes in this path list
and for each such node
searches the slots in the node
to determine if the given (x,y) is within epsilon
of the values in the slot;
if successful, returns an array int[2]
with value 0 equal to the node index
and value 1 equal to the slot index;
if unsuccessful, returns null
.
The metric Metric.MAX is used.
x
 the xcoordinate of the search pointy
 the ycoordinate of the search pointepsilon
 the measure of closenesspublic final int[] nearSlot(double x, double y, double epsilon, Metric metric)
Searches the nodes in this path list
and for each such node
searches the slots in the node
to determine if the given (x,y) is within epsilon
of the values in the slot relative to the given metric;
if successful, returns an array int[2]
with value 0 equal to the node index
and value 1 equal to the slot index;
if unsuccessful, returns null
.
If the given metric is null
then Metric.MAX
is used.
x
 the xcoordinate of the search pointy
 the ycoordinate of the search pointepsilon
 the measure of closenessmetric
 the metric to do the distance computationpublic final void add(int index, PathNode node)
Inserts the specified node at the specified position in
this PathList
and shifts any elements right as needed.
Does not clone the node but adds the node as is.
Does nothing if the given node is null
. It is
therefore impossible to place a null
node in the list.
Forces the given index into the range:
0 <= index <= size()
index
 the list positionnode
 the node to add to the listpublic final void add(int index, PathNode[] nodes)
Inserts the specified array of nodes into this
PathList
starting at the specified position in
the list and shifts any elements right as needed.
Does not clone any nodes but adds them as is.
Does nothing if the given node array is null
and ignores any null
items in the array.
Forces the given start index into the range:
0 <= index <= size()
index
 the list start positionnodes
 the nodes to clone and add to the listpublic final void add(int index, PathNode[] nodes, boolean connect)
Inserts the specified array of nodes into this
PathList
starting at the specified position in
the list and shifts any elements right as needed.
Does not clone any nodes but adds them as is.
Does nothing if the given node array is null
and ignores any null
items in the array.
Forces the given start index into the range:
0 <= index <= size()
If the connect parameter is true and if the insert start index is not zero then if the first inserted node is a MOVE it will be changed to a LINE. If the connect parameter is false then there will be no change to the first inserted node.
index
 the list start positionnodes
 the nodes to clone and add to the listconnect
 whether or not to modify the first inserted node in
order to connect the inserted nodes to the existing nodespublic final void append(PathNode node)
Appends the specified node to this PathList
.
Does not clone the node but appends the node as is.
Does nothing if the given node is null
.
node
 the node to clone and append to the listpublic final void append(PathNode[] nodes)
Appends the specified array of nodes to this
PathList
.
Does not clone any nodes but appends them as is.
Does nothing if the given node array is null
and ignores any null
items in the array.
nodes
 the nodes to clone and append to the listpublic final void append(PathNode[] nodes, boolean connect)
Appends the specified array of nodes to this
PathList
.
Does not clone any nodes but appends them as is.
Does nothing if the given node array is null
and ignores any null
items in the array.
If the connect parameter is true and if the current list is not empty then if the first appended node is a MOVE it will be changed to a LINE. If the connect parameter is false then there will be no change to the first appended node.
nodes
 the nodes to clone and append to the listconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final void append(PathIterator iterator)
Extracts the path node data from the given iterator and appends the nodes to this path list.
The method must execute the iteration so when it is
complete then iterator.isDone()
will be true.
iterator
 the iterator whose data is to be extractedpublic final void append(PathIterator iterator, boolean connect)
Extracts the path node data from the given iterator and appends the nodes to this path list.
If the connect parameter is true and if the current list is not empty then if the first appended node is a MOVE it will be changed to a LINE. If the connect parameter is false then there will be no change to the first appended node.
The method must execute the iteration so when it is
complete then iterator.isDone()
will be true.
iterator
 the iterator whose data is to be extractedconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final void append(Shape shape)
Extracts the path node data from the given shape and appends the nodes to this path list.
shape
 the shape whose data is to be extractedpublic final void append(Shape shape, boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list.
If the connect parameter is true and if the current list is not empty then the first appended node will be changed from a MOVE to a LINE.
shape
 the shape whose data is to be extractedconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final void append(Shape shape, AffineTransform transform)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform.
shape
 the shape whose data is to be extractedtransform
 the transform to apply to the shape datapublic final void append(Shape shape, AffineTransform transform, boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform.
If the connect parameter is true and if the current list is not empty then the first appended node will be changed from a MOVE to a LINE.
shape
 the shape whose data is to be extractedtransform
 the transform to apply to the shape dataconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final void append(Shape shape, AffineTransform transform, double flatness)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform and flatness.
shape
 the shape whose data is to be extractedtransform
 the transform to apply to the shape dataflatness
 the flatness to requirepublic final void append(Shape shape, AffineTransform transform, double flatness, boolean connect)
Extracts the path node data from the given shape and appends the nodes to this path list after applying the given transform and flatness.
If the connect parameter is true and if the current list is not empty then the first appended node will be changed from a MOVE to a LINE.
shape
 the shape whose data is to be extractedtransform
 the transform to apply to the shape dataflatness
 the flatness to requireconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final void cloneAndAdd(int index, PathNode node)
Inserts a clone of the specified node at the specified position in
this PathList
and shifts any elements right as needed.
Does nothing if the given node is null
. It is
therefore impossible to place a null
node in the list.
Forces the given index into the range:
0 <= index <= size()
index
 the list positionnode
 the node to clone and add to the listpublic final void cloneAndAdd(int index, PathNode[] nodes)
Inserts clones of the specified array of nodes to this
PathList
starting at the specified position in
the list and shifts any elements right as needed.
Does nothing if the given node array is null
and ignores any null
items in the array.
Forces the given start index into the range:
0 <= index <= size()
index
 the list start positionnodes
 the nodes to clone and add to the listpublic final void cloneAndAdd(int index, PathNode[] nodes, boolean connect)
Inserts clones of the specified array of nodes to this
PathList
starting at the specified position in
the list and shifts any elements right as needed.
Does nothing if the given node array is null
and ignores any null
items in the array.
Forces the given start index into the range:
0 <= index <= size()
If the connect parameter is true and if the insert start index is not zero then if the first inserted node is a MOVE it will be changed to a LINE. If the connect parameter is false then there will be no change to the first inserted node.
index
 the list start positionnodes
 the nodes to clone and add to the listconnect
 whether or not to modify the first inserted node in
order to connect the inserted nodes to the existing nodespublic final void cloneAndAppend(PathNode node)
Appends a clone of the specified node to this PathList
.
Does nothing if the given node is null
.
node
 the node to clone and append to the listpublic final void cloneAndAppend(PathNode[] nodes)
Appends clones of the specified array of nodes to this
PathList
.
Does nothing if the given node array is null
and ignores any null
items in the array.
nodes
 the nodes to clone and append to the listpublic final void cloneAndAppend(PathNode[] nodes, boolean connect)
Appends clones of the specified array of nodes to this
PathList
.
Does nothing if the given node array is null
and ignores any null
items in the array.
If the connect parameter is true and if the current list is not empty then if the first appended node is a MOVE it will be changed to a LINE. If the connect parameter is false then there will be no change to the first appended node.
nodes
 the nodes to clone and append to the listconnect
 whether or not to modify the first appended node in
order to connect the appended nodes to the existing nodespublic final PathNode remove(int index)
Removes the PathNode
at the given index
and returns the removed node.
Returns null
if the index is not valid.
index
 the index of the PathNode
to removepublic final PathNode[] remove(int m, int n)
Removes the PathNode
s starting at the given
index m inclusive and ending at the given index n exclusive;
returns an array with the removed nodes.
Forces m and n into range if needed.
Returns an array of length 0 if no nodes are removed.
m
 the starting index inclusiven
 the ending index exclusivepublic final PathNode[] removeAll()
PathNode
s from the path list
and returns an array with the removed nodes.
public final void transform(AffineTransform T)
Transforms the internal data points in each path node using the given affine transform.
Does nothing if the given affine transform is null
.
T
 the affine transformpublic final boolean isValid()
Returns true if this PathList
is a valid path list
for the construction of a Shape
.
More precisely, returns true if the list is empty (size is zero)
or if the initial PathNode
has type MOVE.
public final boolean isPolygon()
Returns true if the list has at least 2 nodes, all nodes in the list have one of the following 3 types MOVE, LINE, CLOSE, and the first node is MOVE.
This is a "loose" definition of "polygon" since the method does not make assertions about whether the path consists of one open or closed chain of line segments.
public final boolean isStrictPolygon()
Returns true if the list has at least 2 nodes, the initial node has type MOVE, the final node has type LINE or CLOSE, all inner nodes have type LINE, and at least one node has type LINE.
Historical note: Java defines java.awt.Polygon
.
Since this class is awtbased, the coordinates of a point must
be integers not floating point numbers. In addition, this class
requires that a polygon be closed and have WIND_EVEN_ODD at its
winding rule. This method intentionally does not test for these
constraints since we do believe them to be essential.
public final PathList makeVertexPathList()
Returns a new PathList
with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations.
If the type of a node is MOVE, LINE, or CLOSE, then a copy of the node is inserted in the new list.
A node of the form QUAD[x1;y1;x2;y2] is replaced by a node LINE[x2;y2].
A node of the form CUBIC[x1;y1;x2;y2;x3;y3] is replaced by a node LINE[x3;y3].
If isPolygon()
is true then this method just
returns a copy of this path list.
public final PathList makeBezierPathList()
Returns a new PathList
with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations.
If the type of a node is MOVE, LINE, or CLOSE, then a copy of the node is inserted in the new list.
A node of the form QUAD[x1;y1;x2;y2] is replaced by 2 nodes LINE[x1;y1], LINE[x2;y2].
A node of the form CUBIC[x1;y1;x2;y2;x3;y3] is replaced by 3 nodes LINE[x1;y1], LINE[x2;y2], LINE[x3;y3].
If isPolygon()
is true then this method just
returns a copy of this path list.
public final PathList makeVertexDotsPathList()
Returns a new PathList
with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations.
If the type of a node is CLOSE, then the node is ignored.
A node of the form MOVE[x1;y1] or the form LINE[x1;y1] is replaced by 2 nodes MOVE[x1;y1], LINE[x1;y1].
A node of the form QUAD[x1;y1;x2;y2] is replaced by 2 nodes MOVE[x2;y2], LINE[x2;y2].
A node of the form CUBIC[x1;y1;x2;y2;x3;y3] is replaced by 2 nodes MOVE[x3;y3], LINE[x3;y3].
public final PathList makeBezierDotsPathList()
Returns a new PathList
with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations.
If the type of a node is CLOSE, then the node is ignored.
A node of the form MOVE[x1;y1] or the form LINE[x1;y1] is replaced by 2 nodes MOVE[x1;y1], LINE[x1;y1].
A node of the form QUAD[x1;y1;x2;y2] is replaced by 4 nodes MOVE[x1;y1], LINE[x1;y1], MOVE[x2;y2], LINE[x2;y2].
A node of the form CUBIC[x1;y1;x2;y2;x3;y3] is replaced by 6 nodes MOVE[x1;y1], LINE[x1;y1], MOVE[x2;y2], LINE[x2;y2], MOVE[x3;y3], LINE[x3;y3].
public final PathList makeControlDotsPathList()
Returns a new PathList
with the same winding
rule as this path list and whose nodes are constructed from
the nodes of this path list by the following operations.
If the type of a node is MOVE, LINE, or CLOSE, then the node is ignored.
A node of the form QUAD[x1;y1;x2;y2] is replaced by 2 nodes MOVE[x1;y1], LINE[x1;y1].
A node of the form CUBIC[x1;y1;x2;y2;x3;y3] is replaced by 4 nodes MOVE[x1;y1], LINE[x1;y1], MOVE[x2;y2], LINE[x2;y2].
public final PathListIterator makeVertexPathListIterator()
PathListIterator
constructed from
an instance of makeVertexPathList()
.
public final PathListIterator makeBezierPathListIterator()
PathListIterator
constructed from
an instance of makeBezierPathList()
.
public final PathListIterator makeVertexDotsPathListIterator()
PathListIterator
constructed from
an instance of makeVertexDotsPathList()
.
public final PathListIterator makeBezierDotsPathListIterator()
PathListIterator
constructed from
an instance of makeBezierDotsPathList()
.
public final PathListIterator makeControlDotsPathListIterator()
PathListIterator
constructed from
an instance of makeControlDotsPathList()
.
public final Shape makeVertexShape()
Returns a polygonal Shape
that passes through
the vertex points of this pathlist.
public final Shape makeBezierShape()
Returns a polygonal Shape
that passes through
the bezier points of this pathlist, that is, both the vertex
points and the control points.
public final Shape makeVertexDotsShape()
Shape
that consists of the vertex dots.
public final Shape makeBezierDotsShape()
Shape
that consists of the bezier dots.
public final Shape makeControlDotsShape()
Shape
that consists of the control dots.
public final Point2D[] makeVertexPoints()
Returns a new Point2D[]
whose points are built
to include the vertex points of the path list by the following
operations.
For a node of the form MOVE[x1;y1] or LINE[x1;y1], 1 point [x1;y1] is added to the array.
For a node of the form QUAD[x1;y1;x2;y2], 1 point [x2;y2] is added to the array.
For a node of the form CUBIC[x1;y1;x2;y2;x3;y3], 1 point [x3;y3] is added to the array.
public final Point2D[] makeBezierPoints()
Returns a new Point2D[]
whose points are built
to include the bezier points of the path list by the following
operations.
For a node of the form MOVE[x1;y1] or LINE[x1;y1], 1 point [x1;y1] is added to the array.
For a node of the form QUAD[x1;y1;x2;y2], 2 points [x1;y1], [x2;y2] are added to the array.
For a node of the form CUBIC[x1;y1;x2;y2;x3;y3], 3 points [x1;y1], [x2;y2], [x3;y3] are added to the array.
public final Point2D[] makeControlPoints()
Returns a new Point2D[]
whose points are built
to include the control points of the path list by the following
operations.
For a node of the form QUAD[x1;y1;x2;y2], 1 point [x1;y1] is added to the array.
For a node of the form CUBIC[x1;y1;x2;y2;x3;y3], 2 points [x1;y1], [x2;y2] are added to the array.
public static Shape makeVertexShape(Shape shape)
Static method that returns the vertex shape corresponding to the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated vertex shape.
shape
 the shape whose vertex shape is desiredpublic static Shape makeBezierShape(Shape shape)
Static method that returns the bezier shape corresponding to the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated bezier shape.
shape
 the shape whose bezier shape is desiredpublic static Shape makeVertexDotsShape(Shape shape)
Static method that returns the vertex dots shape corresponding to the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated vertex dots shape.
shape
 the shape whose vertex dots shape is desiredpublic static Shape makeBezierDotsShape(Shape shape)
Static method that returns the bezier dots shape corresponding to the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated bezier dots shape.
shape
 the shape whose bezier dots shape is desiredpublic static Shape makeControlDotsShape(Shape shape)
Static method that returns the control dots shape corresponding to the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated control dots shape.
shape
 the shape whose control dots shape is desiredpublic static Point2D[] makeVertexPoints(Shape shape)
Static method that returns the vertex point array for the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated vertex point array.
shape
 the shape whose vertex point array is desiredpublic static Point2D[] makeBezierPoints(Shape shape)
Static method that returns the bezier point array for the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated bezier point array.
shape
 the shape whose bezier point array is desiredpublic static Point2D[] makeControlPoints(Shape shape)
Static method that returns the control point array for the given shape.
Current implementation: Use the shape to make a path list and then use the path list to make the associated control point array.
shape
 the shape whose control point array is desiredpublic final float[] getShapePoint(float t)
Without actually constructing the shape, this function returns the mathematical point at float parameter t on the shape that would correspond to this path list.
Let us explain how the computation is done and what happens in
boundary cases. For brevity, we use the notation [x;y]
to stand for an internal data pair or for a return value of the form
new float[] { x, y }
.
Returns [0;0]
if the size of this list is 0 or if
isValid()
is false.
Otherwise, for this discussion, let N = size()
and M = N  1
.
First assume that t is an integer with
0 <= t <= M
.
What is returned at t depends on the tth node in the path list.
If the tth node is MOVE[x1;y1]
or
LINE[x1;y1]
, return [x1;y1]
.
If the tth node is QUAD[x1;y1;x2;y2]
, return
[x2;y2]
.
If the tth node is CUBIC[x1;y1;x2;y2;x3;y3]
, return
[x3;y3]
.
If the tth node is CLOSE[]
, return
[xc;yc]
where [xc;yc]
is the
coordinate pair of the last previous MOVE operation in the path list.
We next give the outofbounds return values.
If t < 0
, return the value for
t = 0
.
If t > M
, return the value for
t = M
.
Finally assume that t = k + z
where
k is an integer and 0 < z < 1
.
Assume also that [x0,y0]
is the coordinate pair of the
point returned by this function at the integer k.
If the node at (k+1) is MOVE[x1;y1]
, return
[x0;y0]
since a move represents a discontinuous jump.
If the node at (k+1) is LINE[x1;y1]
, return the
linear interpolation by z between [x0;y0]
and
[x1;y1]
. The linear interpolation is defined by:
(1z)*[x0;y0] + z*[x1;y1]
If the node at (k+1) is QUAD[x1;y1;x2;y2]
, return
the quadratic interpolation by z in the quadratic bezier arch
[x0;y0;x1;y1;x2;y2]
.
If the node at (k+1) is CUBIC[x1;y1;x2;y2;x3;y3]
,
return the cubic interpolation by z in the cubic bezier arch
[x0;y0;x1;y1;x2;y2;x3;y3]
.
If the node at (k+1) is CLOSE[]
return the linear
interpolation by z between [x0;y0]
and
[xc;yc]
where [xc;yc]
is the coordinate
pair of the last previous MOVE operation in the path list.
The Bezier polynomials defined in class Bezier
are used to compute the x,y coordinates of the linear, quadratic,
and cubic interpolations. See the comments in that class for more
mathematical details.
Examination of the above algorithm reveals that we assume that the parameter interval for each node in the pathlist is of length 1. It is possible to assign a different parameter interval to each node but we have decided to stick with the simplest case in this method.
t
 the parameter at which to a point on a shapepublic String toString()
Returns the data in this path list as a multiline
String
.
The first line returned is one of the following two lines:
WIND_NON_ZERO
WIND_EVEN_ODD
The remaining lines give the PathNode
information for each path node in the path list using
the toString()
method of that class.
public String toStringData()
String
as toString()
.
toStringData
in interface Stringable
Stringable.fromStringData(String)
public void fromStringData(String data) throws ParseException
Sets the data of this path list using String
data in the format produced by toString()
.
Throws ParseException
if the data is not in
the correct format.
fromStringData
in interface Stringable
data
 the String
with the list information
ParseException
Stringable.toStringData()
public final String[] getPathNodeStateArray()
Returns a String
with the value of the method
toStringData
applied to each item in the array
returned by getPathNodes
.
public final String getWindingRuleString()
Returns a String
with the winding rule information.
Returns one of:
WIND_NON_ZERO
WIND_EVEN_ODD
public WindingRule getWindingRuleFromStringData(String data) throws ParseException
Returns the WindingRule
that corresponds to the
given String
data.
The valid input data is:
WIND_NON_ZERO
WIND_EVEN_ODD
Throws ParseException
if the winding rule data
does not match either of the above strings.
data
 the String
with the winding rule
ParseException
public final boolean readDataFromFile()
Opens a file dialog to get the file name of a text file with path list data and then reads the data.
Does nothing to the current list if errors occur.
public final boolean readDataFromFile(File source, boolean displayErrorDialogs)
Reads the path list data from the given text file.
Does nothing to the current list if errors occur.
source
 the data sourcedisplayErrorDialogs
 if true display error dialogs
public final boolean saveDataToFile()
Opens a file dialog to get the file name of a text file and then saves the data to the file.
The current path list is unchanged.
Does nothing if errors occur.
public final boolean saveDataToFile(File target, boolean displayErrorDialogs)
Saves the path list data to the given text file.
The current path list is unchanged.
Does nothing if errors occur.
target
 the data targetdisplayErrorDialogs
 if true display error dialogs


PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 