edu.ull.cgunay.plots
Class Grapher.Axis

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.AbstractSequentialList
                    |
                    +--java.util.LinkedList
                          |
                          +--edu.ull.cgunay.plots.Grapher.Axis
All Implemented Interfaces:
Cloneable, Collection, HasAxisLabels, List, Serializable
Direct Known Subclasses:
MatLab.Axis
Enclosing class:
Grapher

protected abstract class Grapher.Axis
extends LinkedList
implements HasAxisLabels

An object that represent a data axis for the grapher. Describes how to form a graph axis for specific Grapher. To be instantiated by the Grapher.

See Also:
Serialized Form

Field Summary
(package private)  int fontSize
          Font size for plot legends. 0 means default size.
(package private)  Range range
           
(package private)  String title
          Plot title.
(package private)  String xLabel
          Label for the x-axis.
(package private)  String yLabel
          Label for the y-axis.
 
Fields inherited from class java.util.LinkedList
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
protected Grapher.Axis()
           
 
Method Summary
(package private)  void addData(Grapher.Data data)
          Adds a new dataset to the axis.
 int getFontSize()
          Get the FontSize value.
 Range getRange()
          Get the value of range.
(package private) abstract  String getString()
          Grapher specific code for generating the axis with the given data sets.
 String getTitle()
          Get the value of title.
 String getXLabel()
          Get the value of xLabel.
 String getYLabel()
          Get the value of yLabel.
 void setFontSize(int newFontSize)
          Set the FontSize value.
 void setRange(Range v)
          Set the value of range.
 void setTitle(String v)
          Set the value of title.
 void setXLabel(String v)
          Set the value of xLabel.
 void setYLabel(String v)
          Set the value of yLabel.
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, get, getFirst, getLast, indexOf, lastIndexOf, listIterator, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
equals, hashCode, listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Field Detail

range

Range range

title

String title
Plot title.


xLabel

String xLabel
Label for the x-axis.


yLabel

String yLabel
Label for the y-axis.


fontSize

int fontSize
Font size for plot legends. 0 means default size.

Constructor Detail

Grapher.Axis

protected Grapher.Axis()
Method Detail

getRange

public Range getRange()
Get the value of range.

Specified by:
getRange in interface HasAxisLabels
Returns:
value of range.

setRange

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

Parameters:
v - Value to assign to range.

getTitle

public String getTitle()
Get the value of title.

Specified by:
getTitle in interface HasAxisLabels
Returns:
value of title.

setTitle

public void setTitle(String v)
Set the value of title.

Parameters:
v - Value to assign to title.

getXLabel

public String getXLabel()
Get the value of xLabel.

Specified by:
getXLabel in interface HasAxisLabels
Returns:
value of xLabel.

setXLabel

public void setXLabel(String v)
Set the value of xLabel.

Parameters:
v - Value to assign to xLabel.

getYLabel

public String getYLabel()
Get the value of yLabel.

Specified by:
getYLabel in interface HasAxisLabels
Returns:
value of yLabel.

setYLabel

public void setYLabel(String v)
Set the value of yLabel.

Parameters:
v - Value to assign to yLabel.

getFontSize

public int getFontSize()
Get the FontSize value.

Specified by:
getFontSize in interface HasAxisLabels
Returns:
the FontSize value.

setFontSize

public void setFontSize(int newFontSize)
Set the FontSize value.

Parameters:
newFontSize - The new FontSize value.

addData

void addData(Grapher.Data data)
Adds a new dataset to the axis.

Parameters:
data - a Data value

getString

abstract String getString()
Grapher specific code for generating the axis with the given data sets. For each data instantiate all variables.

Returns:
a String value