com.ge.research.acuity.ui
Class Dataseries

java.lang.Object
  extended bycom.ge.research.acuity.ui.PresentationObject
      extended bycom.ge.research.acuity.ui.Dataseries
Direct Known Subclasses:
HighlightRegionDataseries

public class Dataseries
extends PresentationObject

Dataseries contain Datapoints, which contain information about cartesian coordinates to be plotted, and some display characteristics of those coordinates. Dataseries also contains information about the display name for the set of points, (used in legend displays), as well as information about the color of all the points they contain. Dataseries cannot be rendered by themselves, they must be contained within a GraphPO object in order to be successfully rendered.

Version:
$Revision: 1.1 $ $Date: 2006/08/11 00:17:24 $
Author:
garbiras
Created on:
Dec 7, 2004

Constructor Summary
Dataseries()
          Calls the default constructor with null argument
Dataseries(java.lang.String name)
          The default constructor.
 
Method Summary
 void addDatapoint(Datapoint dp)
          Adds a Datapoint to the List of datapoints to be plotted in this dataseries
 boolean displayPointInformation()
          Gets the flag value indicating whether or not the datapoint information of the dataseries should be made available and rendered within the graph
protected  void finalize()
          Makes sure to dereference any parent Graph it might be linked to
 int getAlpha()
          Returns the opaqueness component of the dataseries Color The component value is in the range 0-255
 int getBlueVal()
          Returns the RGB blue value component of the dataseries Color The component value is in the range 0-255
 java.awt.Color getColor()
          Returns the color to be used when rendering this dataseries.
 Datapoint getDatapoint(int index)
          Returns the Datapoint from the list of contained datapoints, at the specified index
 java.util.List getDatapoints()
          Returns the list of Datapoints to be plotted in this dataseries
 int getDatapointsCount()
          Returns the number of Datapoints contained in this dataseries
 int getDisplayOrder()
          Returns the order in which this dataseries is to be rendered within a graph
 int getGreenVal()
          Returns the RGB green value component of the dataseries Color The component value is in the range 0-255
 double getMaxXValue()
          Returns the max x value of all the Datapoints contained within this series
 double getMaxYValue()
          Returns the max y value of all the Datapoints contained within this series
 double getMinXValue()
          Returns the min x value of all the Datapoints contained within this series
 double getMinYValue()
          Returns the min y value of all the Datapoints contained within this series
protected  GraphPO getParent()
          Returns the reference to the parent graph of this series
 int getRedVal()
          Returns the RGB red value component of the dataseries Color The component value is in the range 0-255
 java.lang.String getTitle()
          Returns the label to be used as the name of the dataseries, for display in a graph legend
 void removeDatapoint(Datapoint dp)
          Removes the specified Datapoint from the list of points
 void removeDatapoints()
          Removes all Datapoints from the list of points of this series
protected  void removeParentReference()
          Removes the reference to the parent graph that this series belongs to.
 void setAlpha(int i)
          Sets the opaqueness component of the dataseries Color The component value must in the range 0-255.
 void setBlueVal(int i)
          Sets the RGB blue value component of the dataseries Color The component value must in the range 0-255.
 void setColor(java.awt.Color color)
          Sets the color component values, for the dataseries, from the argument color
 void setColor(int red, int green, int blue)
          Sets the RGB color component values, for the dataseries
 void setColor(int red, int green, int blue, int alpha)
          Sets the RGB color component values and opaqueness value, for the dataseries
 void setDatapoints(java.util.List list)
          Sets the list of Datapoints to be plotted by this dataseries
 void setDisplayOrder(int index)
          Sets the order in which this dataseries is to be rendered within a graph
 void setDisplayPointInformation(boolean value)
          Sets the flag indicating whether or not to make available and render within the graph the datapoint information of the dataseries
 void setGreenVal(int i)
          Sets the RGB green value component of the dataseries Color The component value must in the range 0-255.
 void setHasPresentationNature(java.lang.String string)
          Overrides setHasPresentationNature PresentationObject.
protected  void setParentReference(GraphPO parent)
          Sets the reference to the parent graph that this series belongs to.
 void setRedVal(int i)
          Sets the RGB red value component of the dataseries Color The component value must in the range 0-255.
 void setTitle(java.lang.String title)
          Sets the name of the dataseries
 
Methods inherited from class com.ge.research.acuity.ui.PresentationObject
addLookupInfo, getHasPresentationNature, getIdentifier, getLookupInfo, getSubject, hasSubject, isDisplayed, isEditable, setEditability, setIdentifier, setIsDisplayed
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Dataseries

public Dataseries()
Calls the default constructor with null argument


Dataseries

public Dataseries(java.lang.String name)
The default constructor. Calls super(). Sets the dataseries name. Sets the presentation nature to PresentationNatureConstants.POINT_LINE

Parameters:
name - the dataseries name
See Also:
PresentationObject.PresentationObject(), PresentationObject.setHasPresentationNature(java.lang.String)
Method Detail

addDatapoint

public void addDatapoint(Datapoint dp)
Adds a Datapoint to the List of datapoints to be plotted in this dataseries

Parameters:
dp - the datapoint to add to the list of points to be plotted in the dataseries

displayPointInformation

public boolean displayPointInformation()
Gets the flag value indicating whether or not the datapoint information of the dataseries should be made available and rendered within the graph

Returns:
true if the datapoint information should be made available and rendered; false if the datapoint information should not be made avaialble and rendered.

getAlpha

public int getAlpha()
Returns the opaqueness component of the dataseries Color The component value is in the range 0-255

Returns:
The opaqueness component of the dataseries color

getBlueVal

public int getBlueVal()
Returns the RGB blue value component of the dataseries Color The component value is in the range 0-255

Returns:
The RGB blue value component of the dataseries color

getColor

public java.awt.Color getColor()
Returns the color to be used when rendering this dataseries. The color is constructed from the component RGB values and opaque value of this dataseries.

Returns:
The display color for the dataseries

getDatapoint

public Datapoint getDatapoint(int index)
                       throws java.lang.IndexOutOfBoundsException,
                              java.lang.ClassCastException
Returns the Datapoint from the list of contained datapoints, at the specified index

Parameters:
index - index of the Dataspoints list to extract (zero based)
Returns:
The Datapoint, from the list of contained datapoints, at the specified index
Throws:
java.lang.IndexOutOfBoundsException - If the index argument is negative or greater than or equal to the number of Datapoints contained by this Dataseries
ClassCastExceptionException - If the elemnent at the index is not of type Datapoint
java.lang.ClassCastException

getDatapoints

public java.util.List getDatapoints()
Returns the list of Datapoints to be plotted in this dataseries

Returns:
The list of Datapoints contained by this dataseries

getDatapointsCount

public int getDatapointsCount()
Returns the number of Datapoints contained in this dataseries

Returns:
The number of points contained in this dataseries

getDisplayOrder

public int getDisplayOrder()
Returns the order in which this dataseries is to be rendered within a graph

Returns:
The order in which this dataseries is to be rendered within a graph

getGreenVal

public int getGreenVal()
Returns the RGB green value component of the dataseries Color The component value is in the range 0-255

Returns:
The RGB green value component of the dataseries color

getMaxXValue

public double getMaxXValue()
Returns the max x value of all the Datapoints contained within this series

Returns:
The max x value of all the the Datapoints contained within this series

getMaxYValue

public double getMaxYValue()
Returns the max y value of all the Datapoints contained within this series

Returns:
The max y value of all the the Datapoints contained within this series

getMinXValue

public double getMinXValue()
Returns the min x value of all the Datapoints contained within this series

Returns:
The min x value of all the the Datapoints contained within this series

getMinYValue

public double getMinYValue()
Returns the min y value of all the Datapoints contained within this series

Returns:
The min y value of all the the Datapoints contained within this series

getRedVal

public int getRedVal()
Returns the RGB red value component of the dataseries Color The component value is in the range 0-255

Returns:
The RGB red value component of the dataseries color

getTitle

public java.lang.String getTitle()
Returns the label to be used as the name of the dataseries, for display in a graph legend

Returns:
The label for the dataseries name

removeDatapoint

public void removeDatapoint(Datapoint dp)
Removes the specified Datapoint from the list of points

Parameters:
dp - the datapoint to remove from the list of points to plot

removeDatapoints

public void removeDatapoints()
Removes all Datapoints from the list of points of this series


setAlpha

public void setAlpha(int i)
Sets the opaqueness component of the dataseries Color The component value must in the range 0-255. Argument values less than zero will set the opaqueness to zero Argument values greater than 255 will set the opaqueness to 255

Parameters:
i - the opaqueness component of the dataseries color

setBlueVal

public void setBlueVal(int i)
Sets the RGB blue value component of the dataseries Color The component value must in the range 0-255. Argument values less than zero will set the blue component value to zero Argument values greater than 255 will set the blue component value to 255

Parameters:
i - the RGB blue value component of the dataseries color

setColor

public void setColor(java.awt.Color color)
Sets the color component values, for the dataseries, from the argument color

Parameters:
color - the new color for the dataseries
See Also:
setColor(int, int, int, int)

setColor

public void setColor(int red,
                     int green,
                     int blue)
Sets the RGB color component values, for the dataseries

Parameters:
red - the new RGB red value for the dataseries color
green - the new RGB green value for the dataseries color
blue - the new RGB blue value for the dataseries color
See Also:
setRedVal(int), setGreenVal(int), setBlueVal(int)

setColor

public void setColor(int red,
                     int green,
                     int blue,
                     int alpha)
Sets the RGB color component values and opaqueness value, for the dataseries

Parameters:
red - the new RGB red value for the dataseries color
green - the new RGB green value for the dataseries color
blue - the new RGB blue value for the dataseries color
alpha - the new opaqueness value for the dataseries color
See Also:
setColor(int, int, int), setAlpha(int)

setDatapoints

public void setDatapoints(java.util.List list)
Sets the list of Datapoints to be plotted by this dataseries

Parameters:
list - the list of datapoints to be plotted in this series

setDisplayPointInformation

public void setDisplayPointInformation(boolean value)
Sets the flag indicating whether or not to make available and render within the graph the datapoint information of the dataseries

Parameters:
value - true if the datapoint information should be made available and rendered; false if the datapoint information should not be made avaialble and rendered

setDisplayOrder

public void setDisplayOrder(int index)
Sets the order in which this dataseries is to be rendered within a graph

Parameters:
index - the order in which this dataseries is to be rendered within a graph

setGreenVal

public void setGreenVal(int i)
Sets the RGB green value component of the dataseries Color The component value must in the range 0-255. Argument values less than zero will set the green component value to zero Argument values greater than 255 will set the green component value to 255

Parameters:
i - the RGB green value component of the dataseries color

setHasPresentationNature

public void setHasPresentationNature(java.lang.String string)
Overrides setHasPresentationNature PresentationObject. Checks that the new value for presentation nature is a valid type for a Dataseries. If not, the value of presentation nature does not change.

Overrides:
setHasPresentationNature in class PresentationObject
Parameters:
string - the new value of presentation nature
See Also:
PresentationNatureConstants.isDataseriesType(java.lang.String)

setRedVal

public void setRedVal(int i)
Sets the RGB red value component of the dataseries Color The component value must in the range 0-255. Argument values less than zero will set the red component value to zero Argument values greater than 255 will set the red component value to 255

Parameters:
i - the RGB red value component of the dataseries color

setTitle

public void setTitle(java.lang.String title)
Sets the name of the dataseries

Parameters:
title - the new label for the dataseries name

finalize

protected void finalize()
                 throws java.lang.Throwable
Makes sure to dereference any parent Graph it might be linked to

Throws:
java.lang.Throwable

getParent

protected final GraphPO getParent()
Returns the reference to the parent graph of this series

Returns:
The reference to the parent graph of this series

removeParentReference

protected final void removeParentReference()
Removes the reference to the parent graph that this series belongs to.


setParentReference

protected final void setParentReference(GraphPO parent)
Sets the reference to the parent graph that this series belongs to.

Parameters:
parent - the graph that this series belongs to