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

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

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

Class for storing line coordinates

See Also:
Serialized Form

Field Summary
Modifier and Type Field and Description
protected  Point2D pt1
           
protected  Point2D pt2
           
 
Constructor Summary
Constructor and Description
Shape2D.Line(double x1, double y1, double x2, double y2)
           
 
Method Summary
Modifier and Type Method and Description
 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 setLine(double x1, double y1, double x2, double y2)
           
 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

pt1

protected Point2D pt1

pt2

protected Point2D pt2
Constructor Detail

Shape2D.Line

public Shape2D.Line(double x1,
                    double y1,
                    double x2,
                    double y2)
Method Detail

setLine

public void setLine(double x1,
                    double y1,
                    double x2,
                    double y2)

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