algoanim.primitives
Class Circle

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

public class Circle
extends Primitive

Represents a circle defined by a center and a radius.

Author:
Stephan Mehlhase

Field Summary
 
Fields inherited from class algoanim.primitives.Primitive
gen
 
Constructor Summary
Circle(CircleGenerator cg, Node aCenter, int aRadius, java.lang.String name, DisplayOptions display, CircleProperties cp)
          Instantiates the Circle and calls the create() method of the associated CircleGenerator.
 
Method Summary
 Node getCenter()
          Returns the center of this Circle.
 CircleProperties getProperties()
          Returns the properties of this Circle.
 int getRadius()
          Returns the radius of this Circle.
 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

Circle

public Circle(CircleGenerator cg,
              Node aCenter,
              int aRadius,
              java.lang.String name,
              DisplayOptions display,
              CircleProperties cp)
Instantiates the Circle and calls the create() method of the associated CircleGenerator.

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

getCenter

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

Returns:
the center of this Circle.

getProperties

public CircleProperties getProperties()
Returns the properties of this Circle.

Returns:
the properties of this Circle.

getRadius

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

Returns:
the radius of this Circle.

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)