Package de.gsi.chart.axes.spi
Class Axes
- java.lang.Object
-
- de.gsi.chart.axes.spi.Axes
-
public final class Axes extends java.lang.ObjectStatic utility methods related to instances ofAxisclass.- Author:
- Grzegorz Kruk
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidbindBounds(javafx.scene.chart.ValueAxis<?> axis, javafx.scene.chart.ValueAxis<?> observable)Binds lower and upper bound of given axis to the specifiedobservableaxis.static booleanhasBoundedRange(Axis axis)Indicates if the given axislowerand/orupperbound propertyis bound.static booleanhasBoundedRange(javafx.scene.chart.ValueAxis<?> axis)Indicates if the given axislowerand/orupperbound propertyis bound.static booleanisCategoryAxis(Axis axis)Returnstrueif given axis is an instance ofCategoryAxis.static booleanisNumericAxis(Axis axis)Returnstrueif given axis is an instance ofValueAxis.static AxistoNumericAxis(Axis axis)Casts given axis toAxis.static voidunbindBounds(javafx.scene.chart.ValueAxis<?> axis)Unbindslower and upper bound of given axis.
-
-
-
Method Detail
-
isNumericAxis
public static boolean isNumericAxis(Axis axis)
Returnstrueif given axis is an instance ofValueAxis.- Parameters:
axis- the axis to test- Returns:
trueif given axis is an instance ofValueAxis.
-
isCategoryAxis
public static boolean isCategoryAxis(Axis axis)
Returnstrueif given axis is an instance ofCategoryAxis.- Parameters:
axis- the axis to test- Returns:
trueif given axis is an instance ofCategoryAxis.
-
toNumericAxis
public static Axis toNumericAxis(Axis axis)
Casts given axis toAxis.- Parameters:
axis- the axis to be cast- Returns:
- given axis
- Throws:
java.lang.IllegalArgumentException- if the given axis is not an instance of ValueAxis
-
hasBoundedRange
public static boolean hasBoundedRange(javafx.scene.chart.ValueAxis<?> axis)
Indicates if the given axislowerand/orupperbound propertyis bound.- Parameters:
axis- the tested axis- Returns:
trueif either lower or upper bound is bound
-
hasBoundedRange
public static boolean hasBoundedRange(Axis axis)
Indicates if the given axislowerand/orupperbound propertyis bound.- Parameters:
axis- the tested axis- Returns:
trueif either lower or upper bound is bound
-
bindBounds
public static void bindBounds(javafx.scene.chart.ValueAxis<?> axis, javafx.scene.chart.ValueAxis<?> observable)Binds lower and upper bound of given axis to the specifiedobservableaxis.- Parameters:
axis- axis whose lower/upper bound should be boundobservable- the target axis- Throws:
java.lang.NullPointerException- if either axis isnullTODO: found bug if axis and observable axis are slightly different (e.g. one longer or shifted w.r.t. the other) This function the forces the axis of observable (basechart) even if the 'axis' extends beyond that
-
unbindBounds
public static void unbindBounds(javafx.scene.chart.ValueAxis<?> axis)
Unbindslower and upper bound of given axis.- Parameters:
axis- axis whose lower and upper bound should be unbound- Throws:
java.lang.NullPointerException- if the given axis isnull
-
-