cox.jmatt.java.MathTools.graphing.noop
Class NOPolygon

java.lang.Object
  extended by cox.jmatt.java.MathTools.graphing.noop.NORenderable
      extended by cox.jmatt.java.MathTools.graphing.noop.NOPolygon
All Implemented Interfaces:
Polygon, Renderable

public class NOPolygon
extends NORenderable
implements Polygon


Constructor Summary
NOPolygon()
           
 
Method Summary
 Polygon addVertex(double pX, double pY)
          Add a line segment to the Polygon.
 void setClosed(boolean pClosed)
          Determine whether or not the last point added will be 'connected' to the first point entered.
 
Methods inherited from class cox.jmatt.java.MathTools.graphing.noop.NORenderable
render, setParameter, setType, testCondition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cox.jmatt.java.MathTools.graphing.Renderable
render, setParameter, setType, testCondition
 

Constructor Detail

NOPolygon

public NOPolygon()
Method Detail

addVertex

public Polygon addVertex(double pX,
                         double pY)
Description copied from interface: Polygon
Add a line segment to the Polygon. Due to the nature of polygons, the points added MUST be kept in order! This method should return a reference to itself or a copy (for immutable Polygons) to allow convenient method chaining.

Specified by:
addVertex in interface Polygon
Parameters:
pX - The X-coordinate of the point.
pY - The Y-coordinate of the point.
Returns:
A self-reference to allow multiple vertex adds.

setClosed

public void setClosed(boolean pClosed)
Description copied from interface: Polygon
Determine whether or not the last point added will be 'connected' to the first point entered. Setting pClosed to 'true' has the same effect as adding the first point again after the last one is added; this method simply makes things easier.

Specified by:
setClosed in interface Polygon
Parameters:
pClosed - true to 'close' the Polygon explicitly, false to leave it 'open'.