comirva.visu.epsgraphics.objects
Class EpsShape

java.lang.Object
  extended by comirva.visu.epsgraphics.objects.EpsShape
All Implemented Interfaces:
EpsObject
Direct Known Subclasses:
EpsArc2D, EpsClip, EpsGlyph, EpsRectangle

public class EpsShape
extends Object
implements EpsObject

This class encapsulates a general eps shape object. A shape object provides a path iterator which can be used for postscript code creation


Field Summary
protected static String[] code
          an array for the postscript codes
protected  boolean filled
          specifies whether the shape should be filled or not
protected static int[] params
          an array specifying the amount of parameters for the codes
protected  Shape shape
          the shape that should be drawn
 
Constructor Summary
EpsShape(Shape shape)
          construct an eps shape.
EpsShape(Shape shape, boolean filled)
          constructs an eps shape given by the parameters
 
Method Summary
 boolean equals(Object obj)
           
 Shape getShape()
           
 boolean isFilled()
           
 void setFilled(boolean filled)
           
 void setShape(Shape shape)
           
 String toEps()
          returns a String that represents the object in postscript code
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

code

protected static final String[] code
an array for the postscript codes


params

protected static final int[] params
an array specifying the amount of parameters for the codes


filled

protected boolean filled
specifies whether the shape should be filled or not


shape

protected Shape shape
the shape that should be drawn

Constructor Detail

EpsShape

public EpsShape(Shape shape)
construct an eps shape. By default it is not filled


EpsShape

public EpsShape(Shape shape,
                boolean filled)
constructs an eps shape given by the parameters

Parameters:
shape - The shape representing the geometric object
filled - if true the shape will be filled, otherwise not
Method Detail

toEps

public String toEps()
Description copied from interface: EpsObject
returns a String that represents the object in postscript code

Specified by:
toEps in interface EpsObject

isFilled

public boolean isFilled()
Returns:
Returns the filled.

setFilled

public void setFilled(boolean filled)
Parameters:
filled - Set whether the shape should be filled or not.

getShape

public Shape getShape()
Returns:
Returns the shape.

setShape

public void setShape(Shape shape)
Parameters:
shape - The shape to set.

equals

public boolean equals(Object obj)
Overrides:
equals in class Object