public class AxisParameters extends Object
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.
Modifier and Type | Field and Description |
---|---|
static String |
AUTOMATIC_TIC_CALCULATION_KEY
Configuration parameter key.
|
static String |
AXIS_ATTRIBUTES_KEY
Configuration parameter key.
|
static String |
AXIS_LABEL_ATTRIBUTES_KEY
Configuration parameter key.
|
static String |
AXIS_LABEL_KEY
Configuration parameter key.
|
static String |
AXIS_LABEL_POSITION_KEY
Configuration parameter key.
|
static String |
AXIS_LENGTH_KEY
Configuration parameter key.
|
static String |
GRID_ATTRIBUTES_KEY
Configuration parameter key.
|
static String |
GRID_KEY
Configuration parameter key.
|
static String |
LOG_SCALE_KEY
Configuration parameter key.
|
static String |
MAXIMUM_KEY
Configuration parameter key.
|
static String |
MAXIMUM_TIC_KEY
Configuration parameter key.
|
static String |
MINIMUM_KEY
Configuration parameter key.
|
static String |
MINIMUM_TIC_KEY
Configuration parameter key.
|
static String |
NUMBER_OF_TICS_KEY
Configuration parameter key.
|
static String |
TIC_ATTRIBUTES_KEY
Configuration parameter key.
|
static String |
TIC_LABEL_ATTRIBUTES_KEY
Configuration parameter key.
|
static String |
TIC_LABEL_FORMAT_KEY
Configuration parameter key.
|
static String |
TIC_LABEL_POSITION_KEY
Configuration parameter key.
|
static String |
TIC_LENGTH_KEY
Configuration parameter key.
|
Constructor and Description |
---|
AxisParameters() |
Modifier and Type | Method and Description |
---|---|
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.
|
public static final String LOG_SCALE_KEY
public static final String MINIMUM_KEY
public static final String MAXIMUM_KEY
public static final String AXIS_LENGTH_KEY
public static final String AXIS_ATTRIBUTES_KEY
public static final String AXIS_LABEL_KEY
public static final String AXIS_LABEL_POSITION_KEY
public static final String AXIS_LABEL_ATTRIBUTES_KEY
public static final String AUTOMATIC_TIC_CALCULATION_KEY
public static final String MINIMUM_TIC_KEY
public static final String MAXIMUM_TIC_KEY
public static final String NUMBER_OF_TICS_KEY
public static final String TIC_LENGTH_KEY
public static final String TIC_ATTRIBUTES_KEY
public static final String TIC_LABEL_FORMAT_KEY
public static final String TIC_LABEL_POSITION_KEY
public static final String TIC_LABEL_ATTRIBUTES_KEY
public static final String GRID_KEY
public static final String GRID_ATTRIBUTES_KEY
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. |
Copyright © 2017. All Rights Reserved.