com.jfimagine.jfgraph.geom
Class JFPointNode

java.lang.Object
  |
  +--com.jfimagine.jfgraph.geom.JFPoint
        |
        +--com.jfimagine.jfgraph.geom.JFPointNode
All Implemented Interfaces:
java.lang.Cloneable

public class JFPointNode
extends JFPoint

JFPointNode class. A point class used to represents a node of a Regular Line or poly line.

Version:
$Revision: 1.1 $
Author:
CookieMaker

Field Summary
static int NODETYPE_END
          An END POINT point node type that the node is the beginning or end point or corner of the whole line
static int NODETYPE_MIDDLE
          An MIDDLE POINT point node type that the node is on the middle of one line segment
static int NODETYPE_SUBMIDDLE
          An SUB MIDDLE POINT point node type that the node is on the middle of corner point and middle point
 
Constructor Summary
JFPointNode()
          Constructor for JFPoint.
JFPointNode(double x, double y, int nodeType)
          Constructor for JFPoint.
JFPointNode(JFPoint pnt, int nodeType)
          Constructor for JFPoint.
JFPointNode(JFPointNode node)
          Constructor for JFPoint.
 
Method Summary
 java.lang.Object clone()
          Creates a new object of the same class and with the same contents as this object.
 boolean equals(java.lang.Object obj)
          Determines whether or not two objects are equal.
 int getNodeType()
          Getter for node type
 int hashCode()
          Returns the hashcode for this Object.
 void setNodeType(int nodeType)
          Setter for node type
 void setValue(double x, double y, int nodeType)
          Set value of current JFPointNode.
 void setValue(JFPointNode node)
          Set value of current JFPointNode.
 java.lang.String toString()
          Convert this object to String
 
Methods inherited from class com.jfimagine.jfgraph.geom.JFPoint
contains, contains, distance, distance, equals, equals, flipBy, getMiddleUprightPoint, getSlope, getSlope, getX, getY, isValid, middleOf, middleOf, midPoint, midPoint, mirrorBy, moveBy, nearPoint, nearPoint, nearPoint, rotateBy, rotateBy, scaleBy, scaleBy, scaleBy, setValue, setValue, setX, setY
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

NODETYPE_END

public static final int NODETYPE_END
An END POINT point node type that the node is the beginning or end point or corner of the whole line

See Also:
Constant Field Values

NODETYPE_MIDDLE

public static final int NODETYPE_MIDDLE
An MIDDLE POINT point node type that the node is on the middle of one line segment

See Also:
Constant Field Values

NODETYPE_SUBMIDDLE

public static final int NODETYPE_SUBMIDDLE
An SUB MIDDLE POINT point node type that the node is on the middle of corner point and middle point

See Also:
Constant Field Values
Constructor Detail

JFPointNode

public JFPointNode()
Constructor for JFPoint. Default to 0 for x and y coordinates.


JFPointNode

public JFPointNode(double x,
                   double y,
                   int nodeType)
Constructor for JFPoint.

Parameters:
x - X coordiate.
y - Y coordiate.
nodeType - A new node type.

JFPointNode

public JFPointNode(JFPoint pnt,
                   int nodeType)
Constructor for JFPoint.

Parameters:
pnt - A JFPoint.
nodeType - A new node type.

JFPointNode

public JFPointNode(JFPointNode node)
Constructor for JFPoint.

Parameters:
node - A JFPointNode object.
Method Detail

getNodeType

public int getNodeType()
Getter for node type

Returns:
the node type.

setNodeType

public void setNodeType(int nodeType)
Setter for node type

Parameters:
nodeType - the node type.

setValue

public void setValue(JFPointNode node)
Set value of current JFPointNode.


setValue

public void setValue(double x,
                     double y,
                     int nodeType)
Set value of current JFPointNode.

Parameters:
nodeType - A new node type.

toString

public java.lang.String toString()
Convert this object to String

Overrides:
toString in class JFPoint
Returns:
An string represents the content of the object

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates a new object of the same class and with the same contents as this object.

Overrides:
clone in class JFPoint
Returns:
A clone of this instance.
java.lang.CloneNotSupportedException

hashCode

public int hashCode()
Returns the hashcode for this Object.

Overrides:
hashCode in class JFPoint
Returns:
hash code for this Point2D.

equals

public boolean equals(java.lang.Object obj)
Determines whether or not two objects are equal.

Overrides:
equals in class JFPoint
Parameters:
obj - an object to be compared with this object
Returns:
true if the object to be compared is an instance of Port and has the same values; false otherwise.


Copyright 2004 ~ 2005 JingFei International Cooperation LTD. All Rights Reserved.