|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jcckit.plot.AxisParameters
Helper class with various parameters defining an axis.
This helper class is used by CartesianCoordinateSystem
to set up a coordinate systems.
This class holds more than a dozen parameters. There are two factory
methods creating instances for x- and y-axis based on
ConfigParameters
. They differ in their default parameters for
those axes.
Note, that there is a direct access of these parameters without getters and setters but only for classes in the package jcckit.plot.
Field Summary | |
static java.lang.String |
AUTOMATIC_TIC_CALCULATION_KEY
Configuration parameter key. |
static java.lang.String |
AXIS_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
AXIS_LABEL_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
AXIS_LABEL_KEY
Configuration parameter key. |
static java.lang.String |
AXIS_LABEL_POSITION_KEY
Configuration parameter key. |
static java.lang.String |
AXIS_LENGTH_KEY
Configuration parameter key. |
static java.lang.String |
GRID_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
GRID_KEY
Configuration parameter key. |
static java.lang.String |
LOG_SCALE_KEY
Configuration parameter key. |
static java.lang.String |
MAXIMUM_KEY
Configuration parameter key. |
static java.lang.String |
MAXIMUM_TIC_KEY
Configuration parameter key. |
static java.lang.String |
MINIMUM_KEY
Configuration parameter key. |
static java.lang.String |
MINIMUM_TIC_KEY
Configuration parameter key. |
static java.lang.String |
NUMBER_OF_TICS_KEY
Configuration parameter key. |
static java.lang.String |
TIC_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
TIC_LABEL_ATTRIBUTES_KEY
Configuration parameter key. |
static java.lang.String |
TIC_LABEL_FORMAT_KEY
Configuration parameter key. |
static java.lang.String |
TIC_LABEL_POSITION_KEY
Configuration parameter key. |
static java.lang.String |
TIC_LENGTH_KEY
Configuration parameter key. |
Constructor Summary | |
AxisParameters()
|
Method Summary | |
static AxisParameters |
createXAxis(ConfigParameters config)
Creates an x axis based on the specified configuration parameters. |
static AxisParameters |
createYAxis(ConfigParameters config)
Creates an y axis based on the specified configuration parameters. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String LOG_SCALE_KEY
public static final java.lang.String MINIMUM_KEY
public static final java.lang.String MAXIMUM_KEY
public static final java.lang.String AXIS_LENGTH_KEY
public static final java.lang.String AXIS_ATTRIBUTES_KEY
public static final java.lang.String AXIS_LABEL_KEY
public static final java.lang.String AXIS_LABEL_POSITION_KEY
public static final java.lang.String AXIS_LABEL_ATTRIBUTES_KEY
public static final java.lang.String AUTOMATIC_TIC_CALCULATION_KEY
public static final java.lang.String MINIMUM_TIC_KEY
public static final java.lang.String MAXIMUM_TIC_KEY
public static final java.lang.String NUMBER_OF_TICS_KEY
public static final java.lang.String TIC_LENGTH_KEY
public static final java.lang.String TIC_ATTRIBUTES_KEY
public static final java.lang.String TIC_LABEL_FORMAT_KEY
public static final java.lang.String TIC_LABEL_POSITION_KEY
public static final java.lang.String TIC_LABEL_ATTRIBUTES_KEY
public static final java.lang.String GRID_KEY
public static final java.lang.String GRID_ATTRIBUTES_KEY
Constructor Detail |
public AxisParameters()
Method Detail |
public static AxisParameters createXAxis(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
automaticTicCalculation = true | boolean | no | Has to be true if the tics should be calculated automatically. |
axisAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the axis box. |
axisLabel = x | String | no | Axis label. |
axisLabelAttributes = default values of
BasicGraphicAttributes with a text anchor CENTER
TOP. |
ConfigParameters | no | Text attributes of axis label. |
axisLabelPosition = 0 -0.05 | double[] | no | Position of the anchor of the axis label relative to the center of the x-axis line. |
axisLength = 0.8 | double | no | Length of the x-axis. |
grid = false | boolean | no | If true grid lines will be drawn through the axis tics. |
gridAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the grid lines. |
logScale = false | boolean | no | If true the axis will be logarithmic. Otherwise the axis is linear. |
maximum = 1 | double | no | The corresponding data value of one end of the axis. |
maximumTic = result from automatic calculation | double | no | The corresponding data value of the tic nearest the maximum end of the axis. |
minimum = 0 | double | no | The corresponding data value of one end of the axis. |
minimumTic = result from automatic calculation | double | no | The corresponding data value of the tic nearest the minimum end of the axis. |
numberOfTics = result from automatic calculation | int | no | Number of tics. The tics between the minimum and maximum tic are spaced equidistantly. |
ticAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the tics. |
ticLabelAttributes = default values of
BasicGraphicAttributes with a text anchor CENTER
TOP. |
ConfigParameters | no | Text attributes of tic labels. |
ticLabelFormat = %1.1f | String or ConfigParameters | no | Defines rendering of the tic label. By default a
printf-like format string is given (see Format ).
Note, that an empty string means that tic labels are dropped.
For non-numerical rendering an implementation of a
|
ticLabelPosition = 0 -0.01 | double[] | no | Position of the anchor of the tic label relative to the tic position on the axis. |
ticLength = 0.01 | double | no | Length of the tics. Negative/positive values mean tics inside/outside the box. |
public static AxisParameters createYAxis(ConfigParameters config)
Key & Default Value | Type | Mandatory | Description |
---|---|---|---|
automaticTicCalculation = true | boolean | no | Has to be true if the tics should be calculated automatically. |
axisAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the axis box. |
axisLabel = y | String | no | Axis label. |
axisLabelAttributes = default values of
BasicGraphicAttributes with a text anchor CENTER
BOTTOM and the text rotated by 90 degree. |
ConfigParameters | no | Text attributes of axis label. |
axisLabelPosition = -0.1 0 | double[] | no | Position of the anchor of the axis label relative to the center of the y-axis line. |
axisLength = 0.45 | double | no | Length of the y-axis. |
grid = false | boolean | no | If true grid lines will be drawn through the axis tics. |
gridAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the grid lines. |
logScale = false | boolean | no | If true the axis will be logarithmic. Otherwise the axis is linear. |
maximum = 1 | double | no | The corresponding data value of one end of the axis. |
maximumTic = result from automatic calculation | double | no | The corresponding data value of the tic nearest the maximum end of the axis. |
minimum = 0 | double | no | The corresponding data value of one end of the axis. |
minimumTic = result from automatic calculation | double | no | The corresponding data value of the tic nearest the minimum end of the axis. |
numberOfTics = result from automatic calculation | int | no | Number of tics. The tics between the minimum and maximum tic are spaced equidistantly. |
ticAttributes = default values of
ShapeAttributes |
ConfigParameters | no | Attributes of the tics. |
ticLabelAttributes = default values of
BasicGraphicAttributes with a text anchor RIGHT CENTER.
|
ConfigParameters | no | Text attributes of tic labels. |
ticLabelFormat = %1.1f | String | no | Defines rendering of the tic label. By default a
printf-like format string is given (see Format ).
Note, that an empty string means that tic labels are dropped.
For non-numerical rendering an implementation of a
|
ticLabelPosition = -0.01 0 | double[] | no | Position of the anchor of the tic label relative to the tic position on the axis. |
ticLength = 0.01 | double | no | Length of the tics. Negative/positive values mean tics inside/outside the box. |
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |