|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchart.Axis
public class Axis
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.
Chart
,
Filter
,
Parameter
,
Design
,
Serialized FormField Summary | |
---|---|
private boolean |
active
Specifies whether the Axis is displayed on the Chart. |
private boolean |
autoFit
Specifies whether this Axis is autofitted. |
private java.awt.Color |
axisColor
The axis color. |
private boolean |
axisInverted
Specifies whether the Axis should be displayed upside down. |
private java.awt.Color |
axisLabelFontColor
The axis label font color. |
private int |
axisLabelFontSize
The axis label font size. |
private Chart |
chart
The Chart to which this Axis belongs. |
private DataSheet |
dataSheet
The data sheet that is displayed with the Chart to which this Axis belongs. |
private boolean |
filterInverted
Specifies whether the Filters should be inverted. |
private int |
height
The height of this Axis on the Chart. |
private Filter |
lowerFilter
The lower Filter on the Axis. |
private double |
max
The maximum value of this Axis. |
private double |
min
The minimum value of this Axis. |
private Parameter |
parameter
The parameter that is represented by this Axis. |
(package private) static boolean |
printLog
Flag to enable debug message printing for this class. |
(package private) static long |
serialVersionUID
The version tracking unique identifier for Serialization. |
private int |
ticCount
The number of tics on this Axis. |
private java.awt.Color |
ticLabelFontColor
The tic label font color. |
private int |
ticLabelFontSize
The tic label font size. |
private java.lang.String |
ticLabelFormat
The tic label number format. |
private int |
ticLength
The tic length in pixels. |
private Filter |
upperFilter
The upper Filter on the Axis. |
private int |
width
Determines the distance to the adjacent Axes in pixels. |
Constructor Summary | |
---|---|
Axis(DataSheet dataSheet,
Chart chart,
Parameter parameter)
Instantiates a new Axis. |
Method Summary | |
---|---|
void |
addFilters()
Adds the Filters. |
void |
applyFiltersToDesigns()
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. |
private void |
log(java.lang.String message)
Prints debug information to stdout when printLog is set to true. |
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 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
static final long serialVersionUID
static final boolean printLog
private Chart chart
private boolean autoFit
If true, the autoFit
method is called before painting the Axis on the Chart.
private double max
private double min
private DataSheet dataSheet
private Parameter parameter
private int width
The distance to an adjacent Axis is determined by half the sum of both axes widths.
private int height
private int ticCount
private java.awt.Color axisColor
The Color in which the Axis is displayed on the Chart.
private java.awt.Color axisLabelFontColor
Each Axis is labeled with the Parameter name on top of the Axis. This field specifies which Color should be used for this label.
private java.awt.Color ticLabelFontColor
Each tic has a label showing the value to which the tic corresponds. This field specifies which Color should be used for this label.
private int axisLabelFontSize
Each Axis is labeled with the Parameter name on top of the Axis. This field specifies which font size should be used for this label.
private int ticLabelFontSize
Each tic has a label showing the value to which the tic corresponds. This field specifies which font size should be used for this label.
private java.lang.String ticLabelFormat
Each tic has a label showing the value to which the tic corresponds. This field specifies which number format should be used for this label.
private int ticLength
private boolean active
private Filter upperFilter
Filter
private Filter lowerFilter
Filter
private boolean filterInverted
If true, designs become inactive if they have values between the upper and lower Filter and vice versa otherwise.
Filter
private boolean axisInverted
If true, values are ascending from top to bottom. If false, values are ascending from bottom to top.
Constructor Detail |
---|
public Axis(DataSheet dataSheet, Chart chart, Parameter parameter)
dataSheet
- the data sheetchart
- the Chart to which this Axis belongsparameter
- the Parameter represented by this AxisMethod Detail |
---|
public void initialiseSettings()
public void resetSettingsToDefault()
public void addFilters()
public void autofit()
public java.awt.Color getAxisLabelFontColor()
public void setAxisLabelFontColor(java.awt.Color axisLabelFontColor)
axisLabelFontColor
- the new axis label font colorpublic int getAxisLabelFontSize()
public void setAxisLabelFontSize(int axisLabelFontSize)
axisLabelFontSize
- the new axis label font sizepublic int getHeight()
public void setHeight(int height)
height
- the new heightpublic double getMax()
public void setMax(double max)
max
- the new maximum value of this Axispublic double getMin()
public void setMin(double min)
min
- the new minimum value of this Axispublic double getRange()
public int getTicCount()
public void setTicCount(int ticCount)
ticCount
- the new tic countpublic int getTicLabelFontSize()
public void setTicLabelFontSize(int ticLabelFontSize)
ticLabelFontSize
- the new tic label font sizepublic java.lang.String getTicLabelFormat()
public void setTicLabelFormat(java.lang.String ticLabelFormat)
ticLabelFormat
- the new tic label number formatpublic int getTicLength()
public void setTicLength(int ticLength)
ticLength
- the new tic lengthpublic int getWidth()
public void setWidth(int width)
width
- the new Axis widthpublic boolean isActive()
public void setActive(boolean active)
active
- the new activepublic DataSheet getDataSheet()
public void setDataSheet(DataSheet dataSheet)
dataSheet
- the new data sheetpublic Parameter getParameter()
public void setParameter(Parameter parameter)
parameter
- the new parameter represented by this Axispublic java.awt.Color getAxisColor()
public void setAxisColor(java.awt.Color axisColor)
axisColor
- the new axis colorpublic java.awt.Color getAxisTicLabelFontColor()
public void setTicLabelFontColor(java.awt.Color ticLabelFontColor)
ticLabelFontColor
- the new tic label font colorpublic java.lang.String getName()
public Filter getLowerFilter()
public Filter getUpperFilter()
public Chart getChart()
private void log(java.lang.String message)
message
- the messagepublic boolean isFilterInverted()
public void setFilterInverted(boolean filterInverted)
filterInverted
- specifies whether the filter should be invertedpublic boolean isAxisInverted()
public void setAxisInverted(boolean axisInverted)
axisInverted
- Specifies whether this axis is inverted.public boolean isAutoFit()
public void setAutoFit(boolean autoFit)
autoFit
- specifies whether this Axis should be autofittedpublic void applyFiltersToDesigns()
Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |