NetCharts Pro

netcharts.pro.common
Class NFPoint

java.lang.Object
  |
  +--netcharts.pro.common.NFBaseClass
        |
        +--netcharts.pro.common.NFPoint
All Implemented Interfaces:
java.lang.Cloneable, NFCDLGenerator

public class NFPoint
extends NFBaseClass
implements NFCDLGenerator

NFPoint provides storage for X/Y values as either double precision numbers or Dates.


Field Summary
static double DEFAULT_X
           
static double DEFAULT_Y
           
 
Constructor Summary
NFPoint()
          Constructs a default NFPoint with X and Y set to 0.0
NFPoint(java.util.Date x, java.util.Date y)
          Constructs an NFPoint using Date objects.
NFPoint(double x, double y)
          Constructs an NFPoint using double values.
NFPoint(int x, int y)
          Constructs an NFPoint using int values.
NFPoint(NFPoint p)
          Constructs a new NFPoint object with the X/Y values in the NFPoint argument.
NFPoint(java.awt.Point p)
          Constructs an NFPoint using values in a java.awt.Point object.
 
Method Summary
 java.lang.Object clone()
          Protected method to clone this editable
 java.lang.String getCDL()
          Return the CDL for this object
 void getCDL(java.lang.StringBuffer sb, boolean includeParens)
          Append CDL parameters representing this point to the given StringBuffer.
 double getX()
          Gets the x coordinate of the Note as a double.
 java.util.Date getXAsDate()
          Gets the x coordinate of the Note as a Date or null if not defined.
 java.lang.Object getXObject()
          Gets the x coordinate of the Note in object form (either a Date or Double or null if not defined.)
 double getY()
          Gets the y coordinate of the Note as a double.
 java.util.Date getYAsDate()
          Gets the y coordinate of the Note as a Date or null if not defined.
 java.lang.Object getYObject()
          Gets the y coordinate of the Note in object form (either a Date or Double or null if not defined.)
 void setCDL(java.lang.String cdl)
          Set the CDL for this object
 void setX(java.util.Date x)
          Sets the x coordinate of the Note.
 void setX(double x)
          Sets the x coordinate of the Note.
 void setX(java.lang.Object x)
          Sets the x coordinate of the Note.
 void setY(java.util.Date y)
          Sets the y coordinate of the Note.
 void setY(double y)
          Sets the y coordinate of the Note.
 void setY(java.lang.Object y)
          Sets the y coordinate of the Note.
 
Methods inherited from class netcharts.pro.common.NFBaseClass
getModified, getUserObject, setModified, setUserObject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface netcharts.pro.common.NFCDLGenerator
toString
 

Field Detail

DEFAULT_X

public static double DEFAULT_X

DEFAULT_Y

public static double DEFAULT_Y
Constructor Detail

NFPoint

public NFPoint()
Constructs a default NFPoint with X and Y set to 0.0

NFPoint

public NFPoint(NFPoint p)
Constructs a new NFPoint object with the X/Y values in the NFPoint argument.

NFPoint

public NFPoint(double x,
               double y)
Constructs an NFPoint using double values.

NFPoint

public NFPoint(java.awt.Point p)
Constructs an NFPoint using values in a java.awt.Point object.

NFPoint

public NFPoint(int x,
               int y)
Constructs an NFPoint using int values.

NFPoint

public NFPoint(java.util.Date x,
               java.util.Date y)
Constructs an NFPoint using Date objects.
Method Detail

setX

public void setX(java.lang.Object x)
Sets the x coordinate of the Note. This object can be a Double or a Date.
Parameters:
x - The x coordinate.

setX

public void setX(java.util.Date x)
Sets the x coordinate of the Note.
Parameters:
x - The x coordinate.

setX

public void setX(double x)
Sets the x coordinate of the Note.
Parameters:
x - The x coordinate.

setY

public void setY(java.lang.Object y)
Sets the y coordinate of the Note. This object can be a Double or a Date.
Parameters:
y - The y coordinate.

setY

public void setY(java.util.Date y)
Sets the y coordinate of the Note.
Parameters:
y - The y coordinate.

setY

public void setY(double y)
Sets the y coordinate of the Note.
Parameters:
y - The y coordinate.

getX

public double getX()
Gets the x coordinate of the Note as a double.
Returns:
The x coordinate.

getY

public double getY()
Gets the y coordinate of the Note as a double.
Returns:
The y coordinate.

getXObject

public java.lang.Object getXObject()
Gets the x coordinate of the Note in object form (either a Date or Double or null if not defined.)
Returns:
The x coordinate.

getYObject

public java.lang.Object getYObject()
Gets the y coordinate of the Note in object form (either a Date or Double or null if not defined.)
Returns:
The y coordinate.

getXAsDate

public java.util.Date getXAsDate()
Gets the x coordinate of the Note as a Date or null if not defined.
Returns:
The x coordinate.

getYAsDate

public java.util.Date getYAsDate()
Gets the y coordinate of the Note as a Date or null if not defined.
Returns:
The y coordinate.

getCDL

public java.lang.String getCDL()
Description copied from interface: NFCDLGenerator
Return the CDL for this object
Specified by:
getCDL in interface NFCDLGenerator
Following copied from interface: netcharts.pro.common.NFCDLGenerator
Returns:
cdl

getCDL

public void getCDL(java.lang.StringBuffer sb,
                   boolean includeParens)
Append CDL parameters representing this point to the given StringBuffer.
Parameters:
sb - Target buffer to append the CDL parameters
includeParens - If true, this will cause the parameters to be delimited with parenthesis.

setCDL

public void setCDL(java.lang.String cdl)
Description copied from interface: NFCDLGenerator
Set the CDL for this object
Specified by:
setCDL in interface NFCDLGenerator
Following copied from interface: netcharts.pro.common.NFCDLGenerator
Parameters:
cdl -  

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Description copied from class: NFBaseClass
Protected method to clone this editable
Overrides:
clone in class NFBaseClass
Following copied from class: netcharts.pro.common.NFBaseClass
Returns:
copy of this object

NetCharts Pro


Visual Mining, Inc.
15825 Shady Grove Rd.
Suite 20
Rockville, MD 20850
800.308.0731
301.947.8293 FAX

Copyright © Visual Mining, Inc. 1996 - 2004
All Rights Reserved.

NetCharts Pro TM is a registered trademark of Visual Mining, Inc. Other brands and their products are trademarks of their respective holders.

Last Modified: Apr 1, 2004