algoanim.primitives
Class CircleSeg

java.lang.Object
  extended by algoanim.primitives.Primitive
      extended by algoanim.primitives.CircleSeg

public class CircleSeg
extends Primitive

Represents the segment of a circle. This is defined by a center, a radius and an angle.

Author:
Stephan Mehlhase

Field Summary
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
CircleSeg(CircleSegGenerator csg, Node aCenter, int aRadius, java.lang.String name, DisplayOptions display, CircleSegProperties cp)
          Instantiates the CircleSeg and calls the create() method of the associated CircleSegGenerator.
 
Method Summary
 Node getCenter()
          Returns the center of this CircleSeg.
 CircleSegProperties getProperties()
          Returns the properties of this CircleSeg.
 int getRadius()
          Returns the radius of this CircleSeg.
 void setName(java.lang.String newName)
          Sets the name of this Primitive.
 
Methods inherited from class algoanim.primitives.Primitive
changeColor, exchange, getDisplayOptions, getName, hide, hide, moveBy, moveTo, moveVia, rotate, rotate, show, show
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CircleSeg

public CircleSeg(CircleSegGenerator csg,
                 Node aCenter,
                 int aRadius,
                 java.lang.String name,
                 DisplayOptions display,
                 CircleSegProperties cp)
Instantiates the CircleSeg and calls the create() method of the associated CircleSegGenerator.

Parameters:
csg - the appropriate code Generator.
aCenter - the center of this CircleSeg.
aRadius - the radius of this CircleSeg.
name - the name of this CircleSeg.
display - [optional] the DisplayOptions of this CircleSeg.
cp - [optional] the properties of this CircleSeg.
Method Detail

getCenter

public Node getCenter()
Returns the center of this CircleSeg.

Returns:
the center of this CircleSeg.

getProperties

public CircleSegProperties getProperties()
Returns the properties of this CircleSeg.

Returns:
the properties of this CircleSeg.

getRadius

public int getRadius()
Returns the radius of this CircleSeg.

Returns:
the radius of this CircleSeg.

setName

public void setName(java.lang.String newName)
Description copied from class: Primitive
Sets the name of this Primitive.

Overrides:
setName in class Primitive
Parameters:
newName - the new name for this Primitive.
See Also:
Primitive.setName(java.lang.String)