com.levigo.jadice.document.util
Class ControlCurve

java.lang.Object
  extended by com.levigo.jadice.document.util.ControlCurve
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
NaturalCubicSpline1D

public abstract class ControlCurve
extends Object
implements Serializable

This class represents a curve defined by a sequence of control points. The actual implementation of the curve is up to implementing subclasses.

See Also:
Serialized Form

Field Summary
protected  boolean curveChanged
           
protected  Polygon points
          The control points
 
Constructor Summary
ControlCurve()
           
 
Method Summary
 int addControlPoint(Point p)
          Add a control point to the end of the list.
 Point getControlPoint(int n)
          Get a specified control point.
 Polygon getControlPoints()
          Returns the points.
abstract  Polygon getCurve()
           
 int getPointCount()
          Get the number of control points.
 int insertControlPoint(int n, Point p)
          Insert a control point at a given location
 void removeControlPoint(int n)
          Remove the specified control point
 void setControlPoint(int n, Point p)
          Set the specified control point
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

points

protected Polygon points
The control points


curveChanged

protected boolean curveChanged
Constructor Detail

ControlCurve

public ControlCurve()
Method Detail

addControlPoint

public int addControlPoint(Point p)
Add a control point to the end of the list.


insertControlPoint

public int insertControlPoint(int n,
                              Point p)
Insert a control point at a given location


setControlPoint

public void setControlPoint(int n,
                            Point p)
Set the specified control point


removeControlPoint

public void removeControlPoint(int n)
Remove the specified control point


getControlPoint

public Point getControlPoint(int n)
Get a specified control point.


getPointCount

public int getPointCount()
Get the number of control points.


getCurve

public abstract Polygon getCurve()

getControlPoints

public Polygon getControlPoints()
Returns the points.

Returns:
Polygon


Copyright © 1995-2020 levigo holding gmbh. All Rights Reserved.