edu.ull.cgunay.plots
Class Grapher.PreciseProfileData

java.lang.Object
  |
  +--edu.ull.cgunay.plots.Grapher.Data
        |
        +--edu.ull.cgunay.plots.Grapher.PreciseProfileData
All Implemented Interfaces:
Serializable
Enclosing class:
Grapher

public class Grapher.PreciseProfileData
extends Grapher.Data

Data structure for generating profile plots. It makes a precise plot, in the sense that a point is drawn for every data in the profile. if you like to specify the resolution of the plot with a general number of data points selection, see ProfileData.

See Also:
Profile, Grapher.ProfileData, Serialized Form

Field Summary
(package private)  Grapher.DataType dataType
           
(package private)  String label
          Legend label for the data.
(package private)  Range range
          Range to draw the plot.
(package private)  Collection values
          Vectors representing values and their corresponding minimum and maximum limits.
(package private)  Hashtable variables
          Variables used by this plot data definition. name->Range or name->vector pairs.
(package private)  Collection xAxis
          Vectors representing values and their corresponding minimum and maximum limits.
 
Constructor Summary
Grapher.PreciseProfileData(String label, Profile profile)
           
Grapher.PreciseProfileData(String label, Profile profile, Range range)
          Creates a new PreciseProfileData instance.
 
Method Summary
 void addVariable(String name, Collection vector)
          Add a vector variable to variables.
 void addVariable(String name, Range range)
          Add a range variable to variables.
 Grapher.DataType getDataType()
          Get the DataType value.
 String getLabel()
          Get the value of label.
 Range getRange()
          Get the value of range.
 Hashtable getVariables()
          Get the Variables value.
(package private)  void init()
          Put initialization code in this method.
(package private)  String preamble()
          Put preambles in this method.
 void setDataType(String dataTypeName)
          Looks up the name from dataTypes.
 void setLabel(String v)
          Set the value of label.
 void setRange(Range v)
          Set the value of range.
 String xExpression()
          Expression to appear on the x-axis part of the plot command.
 String yExpression()
          Expression to appear on the x-axis part of the plot command.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

values

Collection values
Vectors representing values and their corresponding minimum and maximum limits.


xAxis

Collection xAxis
Vectors representing values and their corresponding minimum and maximum limits.


range

Range range
Range to draw the plot. If null, takes all data points.


variables

Hashtable variables
Variables used by this plot data definition. name->Range or name->vector pairs.


dataType

Grapher.DataType dataType

label

String label
Legend label for the data.

Constructor Detail

Grapher.PreciseProfileData

public Grapher.PreciseProfileData(String label,
                                  Profile profile)

Grapher.PreciseProfileData

public Grapher.PreciseProfileData(String label,
                                  Profile profile,
                                  Range range)
Creates a new PreciseProfileData instance.

Parameters:
label - a String value
profile - a Profile value
range - a Range value
Method Detail

getRange

public Range getRange()
Get the value of range.

Returns:
value of range.

setRange

public void setRange(Range v)
Set the value of range.

Parameters:
v - Value to assign to range.

xExpression

public String xExpression()
Description copied from class: Grapher.Data
Expression to appear on the x-axis part of the plot command. Description should be in terms of the variables here and capabilities of the Grapher.

Specified by:
xExpression in class Grapher.Data
Returns:
a String value

yExpression

public String yExpression()
Description copied from class: Grapher.Data
Expression to appear on the x-axis part of the plot command. Description should be in terms of the variables here and capabilities of the Grapher.

Specified by:
yExpression in class Grapher.Data
Returns:
a String value
See Also:
Grapher.Data.variables

getVariables

public Hashtable getVariables()
Get the Variables value.

Returns:
the Variables value.

init

void init()
Put initialization code in this method.


preamble

String preamble()
Put preambles in this method.


addVariable

public void addVariable(String name,
                        Range range)
Add a range variable to variables.

TODO: maybe just take the name ot the member variable and use reflection to look it up? (like in catacomb)

Parameters:
name - a String value
range - a Range value
See Also:
Grapher.Data.variables

addVariable

public void addVariable(String name,
                        Collection vector)
Add a vector variable to variables.

Parameters:
name - a String value
vector - a Collection value
See Also:
Grapher.Data.variables

getDataType

public Grapher.DataType getDataType()
Get the DataType value.

Returns:
the DataType value.

setDataType

public void setDataType(String dataTypeName)
Looks up the name from dataTypes.

Parameters:
dataTypeName - a String value

getLabel

public String getLabel()
Get the value of label.

Returns:
value of label.

setLabel

public void setLabel(String v)
Set the value of label.

Parameters:
v - Value to assign to label.