algoanim.primitives
Class Triangle
java.lang.Object
algoanim.primitives.Primitive
algoanim.primitives.Triangle
public class Triangle
- extends Primitive
Represents a triangle defined by three Nodes.
- Author:
- Stephan Mehlhase
| Fields inherited from class algoanim.primitives.Primitive |
gen |
| 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 |
Triangle
public Triangle(TriangleGenerator tg,
Node pointA,
Node pointB,
Node pointC,
java.lang.String name,
DisplayOptions display,
TriangleProperties tp)
- Instantiates the
Triangle and calls the create() method
of the associated TriangleGenerator.
- Parameters:
tg - the appropriate code Generator.pointA - the first Node of this
Triangle.pointB - the second Node of this
Triangle.pointC - the third Node of this
Triangle.name - the name of this Triangle.display - [optional] the DisplayOptions of this
Triangletp - [optional] the properties of this Triangle.
getNodes
public Node[] getNodes()
- Returns the
Nodes of this Triangle.
- Returns:
- the
Nodes of this Triangle.
getProperties
public TriangleProperties getProperties()
- Returns the properties of this
Triangle.
- Returns:
- the properties of this
Triangle.
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)