lt.monarch.chart.chart2D.engine
Class Shape2D.Polygon

java.lang.Object
  extended by lt.monarch.chart.chart2D.engine.Shape2D.Polygon
All Implemented Interfaces:
java.io.Serializable, Shape2D.ProjectableShape
Enclosing class:
Shape2D

protected class Shape2D.Polygon
extends java.lang.Object
implements Shape2D.ProjectableShape

Class for storing polygon coordinates

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  java.util.ArrayList<Point2D> list
           
 
Constructor Summary
Constructor and Description
Shape2D.Polygon()
           
 
Method Summary
Modifier and Type Method and Description
 void addPoint(Point2D point)
           
 java.awt.Shape getShape()
          Returns the swing Shape
 java.awt.Shape getShapeRef()
          Returns the swing Shape reference
 void project(Projector projector)
          Projects all the points of the shape
 void transform(Transformation tf, double anchorX, double anchorY)
          Transforms all the points of the shape
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

list

protected java.util.ArrayList<Point2D> list
Constructor Detail

Shape2D.Polygon

public Shape2D.Polygon()
Method Detail

addPoint

public void addPoint(Point2D point)

project

public void project(Projector projector)
Description copied from interface: Shape2D.ProjectableShape
Projects all the points of the shape

Specified by:
project in interface Shape2D.ProjectableShape
Parameters:
projector - projector

transform

public void transform(Transformation tf,
                      double anchorX,
                      double anchorY)
Description copied from interface: Shape2D.ProjectableShape
Transforms all the points of the shape

Specified by:
transform in interface Shape2D.ProjectableShape
Parameters:
tf - transformation matrix
anchorX - x anchor point for transformation
anchorY - y anchor point for transformation

getShape

public java.awt.Shape getShape()
Description copied from interface: Shape2D.ProjectableShape
Returns the swing Shape

Specified by:
getShape in interface Shape2D.ProjectableShape
Returns:
Java Swing Shape

getShapeRef

public java.awt.Shape getShapeRef()
Description copied from interface: Shape2D.ProjectableShape
Returns the swing Shape reference

Specified by:
getShapeRef in interface Shape2D.ProjectableShape
Returns:
Java Swing Shape