chart
Class Axis

java.lang.Object
  extended by chart.Axis
All Implemented Interfaces:
java.io.Serializable

public class Axis
extends java.lang.Object
implements java.io.Serializable

A serializable representation of all relevant settings for an Axis on a Chart.

An Axis is used to represent a Parameter. Each Axis has an upper Filter and a lower Filter, which are represented by triangles and can be dragged by the user. The positions of the Filters determine which Designs are displayed, and which are not.

See Also:
Chart, Filter, Parameter, Design, Serialized Form

Constructor Summary
Axis(DataSheet dataSheet, Chart chart, Parameter parameter)
          Instantiates a new Axis.
 
Method Summary
 void addFilters()
          Adds the Filters.
 void applyFilters()
          Apply filters to designs
 void autofit()
          Sets the Axis display range such that all Designs lie within the upper and the lower bound of this Axis.
 java.awt.Color getAxisColor()
          Gets the axis color.
 java.awt.Color getAxisLabelFontColor()
          Gets the axis label font color.
 int getAxisLabelFontSize()
          Gets the axis label font size.
 java.awt.Color getAxisTicLabelFontColor()
          Gets the axis tic label font color.
 Chart getChart()
          Gets the chart to which this Axis belongs.
 DataSheet getDataSheet()
          Gets the data sheet.
 int getHeight()
          Gets the Axis height in pixels.
 Filter getLowerFilter()
          Gets the lower filter.
 double getMax()
          Gets the maximum value of this Axis.
 double getMin()
          Gets the minimum value of this Axis.
 java.lang.String getName()
          Gets the name of the Parameter represented by this Axis.
 Parameter getParameter()
          Gets the parameter represented by this Axis.
 double getRange()
          Gets the range of this Axis.
 int getTicCount()
          Gets the tic count.
 int getTicLabelFontSize()
          Gets the tic label font size.
 java.lang.String getTicLabelFormat()
          Gets the tic label format.
 int getTicLength()
          Gets the tic length in pixels.
 Filter getUpperFilter()
          Gets the upper filter.
 int getWidth()
          Gets the Axis width in pixels.
 void initialiseSettings()
          Initialise display settings.
 boolean isActive()
          Checks if this Axis is active.
 boolean isAutoFit()
          Checks if this axis is autofitted.
 boolean isAxisInverted()
          Checks if this Axis is inverted.
 boolean isFilterInverted()
          Checks if the Filters are inverted.
 void resetFilters()
          Resets both filters to the Axis min and max values..
 void resetSettingsToDefault()
          Reset display settings to default.
 void setActive(boolean active)
          Specifies whether this Axis is active.
 void setAutoFit(boolean autoFit)
          Specifies whether this Axis should be autofitted.
 void setAxisColor(java.awt.Color axisColor)
          Sets the axis color.
 void setAxisInverted(boolean axisInverted)
          Specifies whether this axis is inverted.
 void setAxisLabelFontColor(java.awt.Color axisLabelFontColor)
          Sets the axis label font color.
 void setAxisLabelFontSize(int axisLabelFontSize)
          Sets the axis label font size.
 void setDataSheet(DataSheet dataSheet)
          Sets the data sheet.
 void setFilterInverted(boolean filterInverted)
          Specifies whether the filter should be inverted.
 void setHeight(int height)
          Sets the Axis height in pixels.
 void setMax(double max)
          Sets the maximum value of this Axis.
 void setMin(double min)
          Sets the minimum value of this Axis.
 void setParameter(Parameter parameter)
          Sets the parameter represented by this Axis.
 void setTicCount(int ticCount)
          Sets the tic count.
 void setTicLabelFontColor(java.awt.Color ticLabelFontColor)
          Sets the tic label font color.
 void setTicLabelFontSize(int ticLabelFontSize)
          Sets the tic label font size.
 void setTicLabelFormat(java.lang.String ticLabelFormat)
          Sets the tic label number format.
 void setTicLength(int ticLength)
          Sets the tic length in pixels.
 void setWidth(int width)
          Sets the Axis width in pixels.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Axis

public Axis(DataSheet dataSheet,
            Chart chart,
            Parameter parameter)
Instantiates a new Axis.

Parameters:
dataSheet - the data sheet
chart - the Chart to which this Axis belongs
parameter - the Parameter represented by this Axis
Method Detail

initialiseSettings

public void initialiseSettings()
Initialise display settings.


resetSettingsToDefault

public void resetSettingsToDefault()
Reset display settings to default.


addFilters

public void addFilters()
Adds the Filters.


autofit

public void autofit()
Sets the Axis display range such that all Designs lie within the upper and the lower bound of this Axis.


getAxisLabelFontColor

public java.awt.Color getAxisLabelFontColor()
Gets the axis label font color.

Returns:
the axis label font color

setAxisLabelFontColor

public void setAxisLabelFontColor(java.awt.Color axisLabelFontColor)
Sets the axis label font color.

Parameters:
axisLabelFontColor - the new axis label font color

getAxisLabelFontSize

public int getAxisLabelFontSize()
Gets the axis label font size.

Returns:
the axis label font size

setAxisLabelFontSize

public void setAxisLabelFontSize(int axisLabelFontSize)
Sets the axis label font size.

Parameters:
axisLabelFontSize - the new axis label font size

getHeight

public int getHeight()
Gets the Axis height in pixels.

Returns:
the height

setHeight

public void setHeight(int height)
Sets the Axis height in pixels.

Parameters:
height - the new height

getMax

public double getMax()
Gets the maximum value of this Axis.

Returns:
the maximum value of this Axis

setMax

public void setMax(double max)
Sets the maximum value of this Axis.

Parameters:
max - the new maximum value of this Axis

getMin

public double getMin()
Gets the minimum value of this Axis.

Returns:
the minimum value of this Axis

setMin

public void setMin(double min)
Sets the minimum value of this Axis.

Parameters:
min - the new minimum value of this Axis

getRange

public double getRange()
Gets the range of this Axis.

Returns:
the range of this Axis

getTicCount

public int getTicCount()
Gets the tic count.

Returns:
the tic count

setTicCount

public void setTicCount(int ticCount)
Sets the tic count.

Parameters:
ticCount - the new tic count

getTicLabelFontSize

public int getTicLabelFontSize()
Gets the tic label font size.

Returns:
the tic label font size

setTicLabelFontSize

public void setTicLabelFontSize(int ticLabelFontSize)
Sets the tic label font size.

Parameters:
ticLabelFontSize - the new tic label font size

getTicLabelFormat

public java.lang.String getTicLabelFormat()
Gets the tic label format.

Returns:
the tic label format

setTicLabelFormat

public void setTicLabelFormat(java.lang.String ticLabelFormat)
Sets the tic label number format.

Parameters:
ticLabelFormat - the new tic label number format

getTicLength

public int getTicLength()
Gets the tic length in pixels.

Returns:
the tic length

setTicLength

public void setTicLength(int ticLength)
Sets the tic length in pixels.

Parameters:
ticLength - the new tic length

getWidth

public int getWidth()
Gets the Axis width in pixels.

Returns:
the Axis width

setWidth

public void setWidth(int width)
Sets the Axis width in pixels.

Parameters:
width - the new Axis width

isActive

public boolean isActive()
Checks if this Axis is active.

Returns:
true, if this Axis is active

setActive

public void setActive(boolean active)
Specifies whether this Axis is active.

Parameters:
active - the new active

getDataSheet

public DataSheet getDataSheet()
Gets the data sheet.

Returns:
the data sheet

setDataSheet

public void setDataSheet(DataSheet dataSheet)
Sets the data sheet.

Parameters:
dataSheet - the new data sheet

getParameter

public Parameter getParameter()
Gets the parameter represented by this Axis.

Returns:
the parameter represented by this Axis

setParameter

public void setParameter(Parameter parameter)
Sets the parameter represented by this Axis.

Parameters:
parameter - the new parameter represented by this Axis

getAxisColor

public java.awt.Color getAxisColor()
Gets the axis color.

Returns:
the axis color

setAxisColor

public void setAxisColor(java.awt.Color axisColor)
Sets the axis color.

Parameters:
axisColor - the new axis color

getAxisTicLabelFontColor

public java.awt.Color getAxisTicLabelFontColor()
Gets the axis tic label font color.

Returns:
the axis tic label font color

setTicLabelFontColor

public void setTicLabelFontColor(java.awt.Color ticLabelFontColor)
Sets the tic label font color.

Parameters:
ticLabelFontColor - the new tic label font color

getName

public java.lang.String getName()
Gets the name of the Parameter represented by this Axis.

Returns:
the name of the Parameter represented by this Axis.

getLowerFilter

public Filter getLowerFilter()
Gets the lower filter.

Returns:
the lower filter

getUpperFilter

public Filter getUpperFilter()
Gets the upper filter.

Returns:
the upper filter

getChart

public Chart getChart()
Gets the chart to which this Axis belongs.

Returns:
the chart to which this Axis belongs

isFilterInverted

public boolean isFilterInverted()
Checks if the Filters are inverted.

Returns:
true, if is filter inverted

setFilterInverted

public void setFilterInverted(boolean filterInverted)
Specifies whether the filter should be inverted.

Parameters:
filterInverted - specifies whether the filter should be inverted

isAxisInverted

public boolean isAxisInverted()
Checks if this Axis is inverted.

Returns:
true, if this Axis is inverted

setAxisInverted

public void setAxisInverted(boolean axisInverted)
Specifies whether this axis is inverted.

Parameters:
axisInverted - Specifies whether this axis is inverted.

isAutoFit

public boolean isAutoFit()
Checks if this axis is autofitted.

Returns:
true, if this axis is autofitted.

setAutoFit

public void setAutoFit(boolean autoFit)
Specifies whether this Axis should be autofitted.

Parameters:
autoFit - specifies whether this Axis should be autofitted

applyFilters

public void applyFilters()
Apply filters to designs

See Also:
Filter

resetFilters

public void resetFilters()
Resets both filters to the Axis min and max values..

See Also:
Filter