JIDE 3.5.15

com.jidesoft.chart.model
Class ChartPointND

java.lang.Object
  extended by com.jidesoft.chart.model.ChartPointND
All Implemented Interfaces:
Chartable, Chartable3D, ChartableND, Highlightable, Comparable<Chartable>
Direct Known Subclasses:
ChartPointOHLC, RectangularPoint

public class ChartPointND
extends Object
implements ChartableND, Highlightable

A ChartPoint with any number of dimensions

Author:
Simon White (swhite@catalysoft.com)

Constructor Summary
ChartPointND()
           
ChartPointND(double... ds)
           
ChartPointND(Positionable... positionables)
           
 
Method Summary
 int compareTo(Chartable other)
           
 Positionable get(int dimension)
          By convention, Dimension 0 is X Dimension 1 is Y Dimension 2 is Z
 int getDimensionCount()
          Returns the current number of dimensions.
 Highlight getHighlight()
           
 Positionable getX()
          Gets the x coordinate of the Chartable object
 Positionable getY()
          Gets the y coordinate of the Chartable object
 Positionable getZ()
          Gets the z coordinate of the Chartable object
 boolean isHighlight(Highlight h)
          Is the highlight for this chart point the same as the supplied highlight? If the supplied highlight is null, this always returns false.
 void set(int dimension, Positionable p)
           
 void setHighlight(Highlight h)
          Specify the highlight to be associated with this object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChartPointND

public ChartPointND()

ChartPointND

public ChartPointND(double... ds)

ChartPointND

public ChartPointND(Positionable... positionables)
Method Detail

getX

public Positionable getX()
Description copied from interface: Chartable
Gets the x coordinate of the Chartable object

Specified by:
getX in interface Chartable
Returns:
the x coordinate

getY

public Positionable getY()
Description copied from interface: Chartable
Gets the y coordinate of the Chartable object

Specified by:
getY in interface Chartable
Returns:
the y coordinate

getZ

public Positionable getZ()
Description copied from interface: Chartable3D
Gets the z coordinate of the Chartable object

Specified by:
getZ in interface Chartable3D
Returns:
the z coordinate

compareTo

public int compareTo(Chartable other)
Specified by:
compareTo in interface Comparable<Chartable>

getDimensionCount

public int getDimensionCount()
Returns the current number of dimensions. This is not fixed and can increase as more values as added.

Specified by:
getDimensionCount in interface ChartableND
Returns:
the number of dimensions of the point

get

public Positionable get(int dimension)
Description copied from interface: ChartableND
By convention,

Specified by:
get in interface ChartableND
Parameters:
dimension - the index of the dimension of interest
Returns:
the coordinate value in the specified dimension

set

public void set(int dimension,
                Positionable p)

getHighlight

public Highlight getHighlight()
Specified by:
getHighlight in interface Highlightable
Returns:
the Highlight associated with this object, or null if there is no highlight

isHighlight

public boolean isHighlight(Highlight h)
Is the highlight for this chart point the same as the supplied highlight? If the supplied highlight is null, this always returns false.

Parameters:
h - the highlight to test
Returns:
true if the supplied highlight is the same as the result of getHighlight()

setHighlight

public void setHighlight(Highlight h)
Description copied from interface: Highlightable
Specify the highlight to be associated with this object

Specified by:
setHighlight in interface Highlightable
Parameters:
h - the new highlight

JIDE 3.5.15