JHotDraw 7.2

org.jhotdraw.geom
Class BezierPath.Node

java.lang.Object
  extended by org.jhotdraw.geom.BezierPath.Node
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable
Enclosing class:
BezierPath

public static class BezierPath.Node
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable

Defines a vertex (node) of the bezier path.

A vertex consists of three control points: C0, C1 and C2.

See Also:
Serialized Form

Field Summary
 boolean keepColinear
          This is a hint for editing tools.
 int mask
          This mask is used to describe which control points in addition to C0 are in effect.
 double[] x
          Control point x coordinates.
 double[] y
          Control point y coordinates.
 
Constructor Summary
BezierPath.Node()
           
BezierPath.Node(BezierPath.Node that)
           
BezierPath.Node(double x0, double y0)
           
BezierPath.Node(int mask, double x0, double y0, double x1, double y1, double x2, double y2)
           
BezierPath.Node(int mask, java.awt.geom.Point2D.Double c0, java.awt.geom.Point2D.Double c1, java.awt.geom.Point2D.Double c2)
           
BezierPath.Node(java.awt.geom.Point2D.Double c0)
           
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 java.awt.geom.Point2D.Double getControlPoint(int index)
           
 int getMask()
           
 int hashCode()
           
 void moveBy(double dx, double dy)
           
 void moveTo(double x, double y)
           
 void moveTo(java.awt.geom.Point2D.Double p)
           
 void setControlPoint(int index, java.awt.geom.Point2D.Double p)
           
 void setMask(int newValue)
           
 void setTo(BezierPath.Node that)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

mask

public int mask
This mask is used to describe which control points in addition to C0 are in effect.


x

public double[] x
Control point x coordinates.


y

public double[] y
Control point y coordinates.


keepColinear

public boolean keepColinear
This is a hint for editing tools. If this is set to true, the editing tools shall keep all control points on the same line.

Constructor Detail

BezierPath.Node

public BezierPath.Node()

BezierPath.Node

public BezierPath.Node(BezierPath.Node that)

BezierPath.Node

public BezierPath.Node(java.awt.geom.Point2D.Double c0)

BezierPath.Node

public BezierPath.Node(int mask,
                       java.awt.geom.Point2D.Double c0,
                       java.awt.geom.Point2D.Double c1,
                       java.awt.geom.Point2D.Double c2)

BezierPath.Node

public BezierPath.Node(double x0,
                       double y0)

BezierPath.Node

public BezierPath.Node(int mask,
                       double x0,
                       double y0,
                       double x1,
                       double y1,
                       double x2,
                       double y2)
Method Detail

setTo

public void setTo(BezierPath.Node that)

getMask

public int getMask()

setMask

public void setMask(int newValue)

setControlPoint

public void setControlPoint(int index,
                            java.awt.geom.Point2D.Double p)

getControlPoint

public java.awt.geom.Point2D.Double getControlPoint(int index)

moveTo

public void moveTo(java.awt.geom.Point2D.Double p)

moveTo

public void moveTo(double x,
                   double y)

moveBy

public void moveBy(double dx,
                   double dy)

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

Copyright 1996-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.