nl.javel.gisbeans.geom
Class SerializableGeneralPath

java.lang.Object
  extended by nl.javel.gisbeans.geom.SerializableGeneralPath
All Implemented Interfaces:
Shape, Serializable, Cloneable

public class SerializableGeneralPath
extends Object
implements Serializable, Shape, Cloneable

The SerializableGeneralPath class is a serializable version of the java.awt.geom.GeneralPath class.

Since:
JDK 1.2
Version:
1.0
Author:
Peter Jacobs
Paul Jacobs
See Also:
Serialized Form

Constructor Summary
SerializableGeneralPath()
           
SerializableGeneralPath(int rule)
          constructs a new SerializableGeneralPath
SerializableGeneralPath(int rule, int initialCapacity)
          constructs a new SerializableGeneralPath
SerializableGeneralPath(Shape s)
          constructs a new SerializableGeneralPath
 
Method Summary
 void append(PathIterator pi, boolean connect)
           
 void append(Shape s, boolean connect)
           
 Object clone()
           
 void closePath()
           
 boolean contains(double param, double param1)
           
 boolean contains(double param, double param1, double param2, double param3)
           
 boolean contains(Point2D point2D)
           
 boolean contains(Rectangle2D rectangle2D)
           
 Shape createTranformedShape(AffineTransform at)
           
 void curveTo(float x1, float y1, float x2, float y2, float x3, float y3)
          curves to
 Rectangle getBounds()
           
 Rectangle2D getBounds2D()
           
 Point2D getCurrentPoint()
           
 PathIterator getPathIterator(AffineTransform affineTransform)
           
 PathIterator getPathIterator(AffineTransform affineTransform, double param)
           
 int getWindingRule()
           
 boolean intersects(double param, double param1, double param2, double param3)
           
 boolean intersects(Rectangle2D rectangle2D)
           
 void lineTo(float x, float y)
           
 void moveTo(float x, float y)
           
 void quadTo(float x1, float y1, float x2, float y2)
           
 void reset()
           
 void setWindingRule(int rule)
           
 void transform(AffineTransform at)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SerializableGeneralPath

public SerializableGeneralPath()
See Also:
GeneralPath.GeneralPath()

SerializableGeneralPath

public SerializableGeneralPath(int rule)
constructs a new SerializableGeneralPath

Parameters:
rule - the windingRule

SerializableGeneralPath

public SerializableGeneralPath(int rule,
                               int initialCapacity)
constructs a new SerializableGeneralPath

Parameters:
rule - the windingRule
initialCapacity - the initialCapacity

SerializableGeneralPath

public SerializableGeneralPath(Shape s)
constructs a new SerializableGeneralPath

Parameters:
s - the shape
Method Detail

append

public void append(PathIterator pi,
                   boolean connect)
Parameters:
pi - the pathIterator
connect - the connect

append

public void append(Shape s,
                   boolean connect)
Parameters:
s - the shape
connect - whether to connect

clone

public Object clone()
Overrides:
clone in class Object
See Also:
Object.clone()

closePath

public void closePath()
See Also:
Path2D.closePath()

contains

public boolean contains(double param,
                        double param1,
                        double param2,
                        double param3)
Specified by:
contains in interface Shape
See Also:
Shape.contains(double, double, double, double)

contains

public boolean contains(double param,
                        double param1)
Specified by:
contains in interface Shape
See Also:
Shape.contains(double, double)

contains

public boolean contains(Rectangle2D rectangle2D)
Specified by:
contains in interface Shape
See Also:
Shape.contains(java.awt.geom.Rectangle2D)

contains

public boolean contains(Point2D point2D)
Specified by:
contains in interface Shape
See Also:
Shape.contains(java.awt.geom.Point2D)

createTranformedShape

public Shape createTranformedShape(AffineTransform at)
Parameters:
at - the effinetransform
Returns:
the new shape

curveTo

public void curveTo(float x1,
                    float y1,
                    float x2,
                    float y2,
                    float x3,
                    float y3)
curves to

Parameters:
x1 -
y1 -
x2 -
y2 -
x3 -
y3 -

getBounds

public Rectangle getBounds()
Specified by:
getBounds in interface Shape
See Also:
Shape.getBounds()

getBounds2D

public Rectangle2D getBounds2D()
Specified by:
getBounds2D in interface Shape
See Also:
Shape.getBounds2D()

getCurrentPoint

public Point2D getCurrentPoint()
Returns:

getPathIterator

public PathIterator getPathIterator(AffineTransform affineTransform)
Specified by:
getPathIterator in interface Shape
See Also:
Shape.getPathIterator(java.awt.geom.AffineTransform)

getPathIterator

public PathIterator getPathIterator(AffineTransform affineTransform,
                                    double param)
Specified by:
getPathIterator in interface Shape
See Also:
Shape.getPathIterator(java.awt.geom.AffineTransform, double)

getWindingRule

public int getWindingRule()
Returns:

intersects

public boolean intersects(double param,
                          double param1,
                          double param2,
                          double param3)
Specified by:
intersects in interface Shape
See Also:
Shape.intersects(double, double, double, double)

intersects

public boolean intersects(Rectangle2D rectangle2D)
Specified by:
intersects in interface Shape
See Also:
Shape.intersects(java.awt.geom.Rectangle2D)

lineTo

public void lineTo(float x,
                   float y)
Parameters:
x -
y -

moveTo

public void moveTo(float x,
                   float y)
Parameters:
x -
y -

quadTo

public void quadTo(float x1,
                   float y1,
                   float x2,
                   float y2)
Parameters:
x1 -
y1 -
x2 -
y2 -

reset

public void reset()
See Also:
Path2D.reset()

setWindingRule

public void setWindingRule(int rule)
Parameters:
rule -

transform

public void transform(AffineTransform at)
Parameters:
at -