Class ValueAxis<T extends Number>
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.chart.Axis<T>
javafx.scene.chart.ValueAxis<T>
- Type Parameters:
-
T- the axis value type
- All Implemented Interfaces:
-
Styleable,EventTarget
- Direct Known Subclasses:
NumberAxis
public abstract class ValueAxis<T extends Number> extends Axis<T>
An axis whose data is defined as Numbers. It can also draw minor tick-marks between the major ones.
- Since:
- JavaFX 2.0
Nested Class Summary
Nested classes/interfaces declared in class javafx.scene.chart.Axis
Axis.TickMark<T>
Property Summary
| Type | Property | Description |
|---|---|---|
final DoubleProperty |
lowerBound |
The value for the lower bound of this axis (minimum value). |
final IntegerProperty |
minorTickCount |
The number of minor tick divisions to be displayed between each major tick mark. |
final DoubleProperty |
minorTickLength |
The length of minor tick mark lines. |
final BooleanProperty |
minorTickVisible |
true if minor tick marks should be displayed |
final ReadOnlyDoubleProperty |
scale |
The scale factor from data units to visual units |
final ObjectProperty |
tickLabelFormatter |
StringConverter used to format tick mark labels. |
final DoubleProperty |
upperBound |
The value for the upper bound of this axis (maximum value). |
Properties declared in class javafx.scene.chart.Axis
animated, autoRanging, label, side, tickLabelFill, tickLabelFont, tickLabelGap, tickLabelRotation, tickLabelsVisible, tickLength, tickMarkVisible
Properties declared in class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
Properties declared in class javafx.scene.Parent
needsLayout
Properties declared in class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, focusVisible, focusWithin, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
Field Summary
| Modifier and Type | Field | Description |
|---|---|---|
protected final DoubleProperty |
currentLowerBound |
The current value for the lowerBound of this axis (minimum value). |
Fields declared in class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
Fields declared in class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor Summary
| Constructor | Description |
|---|---|
ValueAxis() |
Creates a auto-ranging ValueAxis. |
ValueAxis |
Creates a non-auto-ranging ValueAxis with the given lower and upper bound. |
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
protected final Object |
autoRange |
This calculates the upper and lower bound based on the data provided to invalidateRange() method. |
protected Object |
autoRange |
Called to set the upper and lower bound and anything else that needs to be auto-ranged. |
protected abstract List |
calculateMinorTickMarks() |
Calculates a list of the data values for every minor tick mark |
protected final double |
calculateNewScale |
Calculates new scale for this axis. |
static List |
getClassCssMetaData() |
Gets the CssMetaData associated with this class, which may include the CssMetaData of its superclasses. |
List |
getCssMetaData() |
This method should delegate to Node.getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection. |
double |
getDisplayPosition |
Gets the display position along this axis for a given value. |
final double |
getLowerBound() |
Gets the value of the lowerBound property. |
final int |
getMinorTickCount() |
Gets the value of the minorTickCount property. |
final double |
getMinorTickLength() |
Gets the value of the minorTickLength property. |
final double |
getScale() |
Gets the value of the scale property. |
final StringConverter |
getTickLabelFormatter() |
Gets the value of the tickLabelFormatter property. |
final double |
getUpperBound() |
Gets the value of the upperBound property. |
T |
getValueForDisplay |
Gets the data value for the given display position on this axis. |
double |
getZeroPosition() |
Gets the display position of the zero line along this axis. |
void |
invalidateRange |
Called when the data has changed and the range may not be valid anymore. |
final boolean |
isMinorTickVisible() |
Gets the value of the minorTickVisible property. |
boolean |
isValueOnAxis |
Checks if the given value is plottable on this axis |
protected void |
layoutChildren() |
Invoked during the layout pass to layout this axis and all its content. |
final DoubleProperty |
lowerBoundProperty() |
The value for the lower bound of this axis (minimum value). |
final IntegerProperty |
minorTickCountProperty() |
The number of minor tick divisions to be displayed between each major tick mark. |
final DoubleProperty |
minorTickLengthProperty() |
The length of minor tick mark lines. |
final BooleanProperty |
minorTickVisibleProperty() |
true if minor tick marks should be displayed |
final ReadOnlyDoubleProperty |
scaleProperty() |
The scale factor from data units to visual units |
final void |
setLowerBound |
Sets the value of the lowerBound property. |
final void |
setMinorTickCount |
Sets the value of the minorTickCount property. |
final void |
setMinorTickLength |
Sets the value of the minorTickLength property. |
final void |
setMinorTickVisible |
Sets the value of the minorTickVisible property. |
protected final void |
setScale |
Sets the value of the scale property. |
final void |
setTickLabelFormatter |
Sets the value of the tickLabelFormatter property. |
final void |
setUpperBound |
Sets the value of the upperBound property. |
final ObjectProperty |
tickLabelFormatterProperty() |
StringConverter used to format tick mark labels. |
protected void |
tickMarksUpdated() |
Called during layout if the tickmarks have been updated, allowing subclasses to do anything they need to in reaction. |
double |
toNumericValue |
All axis values must be representable by some numeric value. |
T |
toRealValue |
All axis values must be representable by some numeric value. |
final DoubleProperty |
upperBoundProperty() |
The value for the upper bound of this axis (maximum value). |
Methods declared in class javafx.scene.chart.Axis
animatedProperty, autoRangingProperty, calculateTickValues, computePrefHeight, computePrefWidth, getAnimated, getLabel, getRange, getSide, getTickLabelFill, getTickLabelFont, getTickLabelGap, getTickLabelRotation, getTickLength, getTickMarkLabel, getTickMarks, invalidateRange, isAutoRanging, isRangeValid, isTickLabelsVisible, isTickMarkVisible, labelProperty, measureTickMarkLabelSize, measureTickMarkSize, measureTickMarkSize, requestAxisLayout, requestLayout, setAnimated, setAutoRanging, setLabel, setRange, setSide, setTickLabelFill, setTickLabelFont, setTickLabelGap, setTickLabelRotation, setTickLabelsVisible, setTickLength, setTickMarkVisible, shouldAnimate, sideProperty, tickLabelFillProperty, tickLabelFontProperty, tickLabelGapProperty, tickLabelRotationProperty, tickLabelsVisibleProperty, tickLengthProperty, tickMarkVisibleProperty
Methods declared in class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods declared in class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, needsLayoutProperty, requestParentLayout, setNeedsLayout, updateBounds
Methods declared in class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isFocusVisible, isFocusWithin, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookup, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, queryAccessibleAttribute, relocate, removeEventFilter, removeEventHandler, requestFocus, requestFocusTraversal, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods declared in interface javafx.css.Styleable
getStyleableNode
Property Details
minorTickVisible
public final BooleanProperty minorTickVisibleProperty
true if minor tick marks should be displayed
- See Also:
scale
public final ReadOnlyDoubleProperty scaleProperty
The scale factor from data units to visual units
- See Also:
upperBound
public final DoubleProperty upperBoundProperty
The value for the upper bound of this axis (maximum value). This is automatically set if auto ranging is on.
- See Also:
lowerBound
public final DoubleProperty lowerBoundProperty
The value for the lower bound of this axis (minimum value). This is automatically set if auto ranging is on.
- See Also:
tickLabelFormatter
public final ObjectProperty<StringConverter<T extends Number>> tickLabelFormatterProperty
StringConverter used to format tick mark labels. If null a default will be used
- See Also:
minorTickLength
public final DoubleProperty minorTickLengthProperty
The length of minor tick mark lines. Set to 0 to not display minor tick marks.
- See Also:
minorTickCount
public final IntegerProperty minorTickCountProperty
The number of minor tick divisions to be displayed between each major tick mark. The number of actual minor tick marks will be one less than this.
- See Also:
Field Details
currentLowerBound
protected final DoubleProperty currentLowerBound
The current value for the lowerBound of this axis (minimum value). This may be the same as lowerBound or different. It is used by NumberAxis to animate the lowerBound from the old value to the new value.
Constructor Details
ValueAxis
public ValueAxis()
Creates a auto-ranging ValueAxis.
ValueAxis
public ValueAxis(double lowerBound, double upperBound)
Creates a non-auto-ranging ValueAxis with the given lower and upper bound.
- Parameters:
-
lowerBound- The lower bound for this axis, i.e. min plottable value -
upperBound- The upper bound for this axis, i.e. max plottable value
Method Details
isMinorTickVisible
public final boolean isMinorTickVisible()
Gets the value of the
minorTickVisible property.- Property description:
- true if minor tick marks should be displayed
- Returns:
- the value of the
minorTickVisibleproperty - See Also:
setMinorTickVisible
public final void setMinorTickVisible(boolean value)
Sets the value of the
minorTickVisible property.- Property description:
- true if minor tick marks should be displayed
- Parameters:
-
value- the value for theminorTickVisibleproperty - See Also:
minorTickVisibleProperty
public final BooleanProperty minorTickVisibleProperty()
true if minor tick marks should be displayed
- Returns:
- the
minorTickVisibleproperty - See Also:
getScale
public final double getScale()
Gets the value of the
scale property.- Property description:
- The scale factor from data units to visual units
- Returns:
- the value of the
scaleproperty - See Also:
setScale
protected final void setScale(double scale)
Sets the value of the
scale property.- Property description:
- The scale factor from data units to visual units
- Parameters:
-
scale- the value for thescaleproperty - See Also:
scaleProperty
public final ReadOnlyDoubleProperty scaleProperty()
The scale factor from data units to visual units
- Returns:
- the
scaleproperty - See Also:
getUpperBound
public final double getUpperBound()
Gets the value of the
upperBound property.- Property description:
- The value for the upper bound of this axis (maximum value). This is automatically set if auto ranging is on.
- Returns:
- the value of the
upperBoundproperty - See Also:
setUpperBound
public final void setUpperBound(double value)
Sets the value of the
upperBound property.- Property description:
- The value for the upper bound of this axis (maximum value). This is automatically set if auto ranging is on.
- Parameters:
-
value- the value for theupperBoundproperty - See Also:
upperBoundProperty
public final DoubleProperty upperBoundProperty()
The value for the upper bound of this axis (maximum value). This is automatically set if auto ranging is on.
- Returns:
- the
upperBoundproperty - See Also:
getLowerBound
public final double getLowerBound()
Gets the value of the
lowerBound property.- Property description:
- The value for the lower bound of this axis (minimum value). This is automatically set if auto ranging is on.
- Returns:
- the value of the
lowerBoundproperty - See Also:
setLowerBound
public final void setLowerBound(double value)
Sets the value of the
lowerBound property.- Property description:
- The value for the lower bound of this axis (minimum value). This is automatically set if auto ranging is on.
- Parameters:
-
value- the value for thelowerBoundproperty - See Also:
lowerBoundProperty
public final DoubleProperty lowerBoundProperty()
The value for the lower bound of this axis (minimum value). This is automatically set if auto ranging is on.
- Returns:
- the
lowerBoundproperty - See Also:
getTickLabelFormatter
public final StringConverter<T> getTickLabelFormatter()
Gets the value of the
tickLabelFormatter property.- Property description:
- StringConverter used to format tick mark labels. If null a default will be used
- Returns:
- the value of the
tickLabelFormatterproperty - See Also:
setTickLabelFormatter
public final void setTickLabelFormatter(StringConverter<T> value)
Sets the value of the
tickLabelFormatter property.- Property description:
- StringConverter used to format tick mark labels. If null a default will be used
- Parameters:
-
value- the value for thetickLabelFormatterproperty - See Also:
tickLabelFormatterProperty
public final ObjectProperty<StringConverter<T>> tickLabelFormatterProperty()
StringConverter used to format tick mark labels. If null a default will be used
- Returns:
- the
tickLabelFormatterproperty - See Also:
getMinorTickLength
public final double getMinorTickLength()
Gets the value of the
minorTickLength property.- Property description:
- The length of minor tick mark lines. Set to 0 to not display minor tick marks.
- Returns:
- the value of the
minorTickLengthproperty - See Also:
setMinorTickLength
public final void setMinorTickLength(double value)
Sets the value of the
minorTickLength property.- Property description:
- The length of minor tick mark lines. Set to 0 to not display minor tick marks.
- Parameters:
-
value- the value for theminorTickLengthproperty - See Also:
minorTickLengthProperty
public final DoubleProperty minorTickLengthProperty()
The length of minor tick mark lines. Set to 0 to not display minor tick marks.
- Returns:
- the
minorTickLengthproperty - See Also:
getMinorTickCount
public final int getMinorTickCount()
Gets the value of the
minorTickCount property.- Property description:
- The number of minor tick divisions to be displayed between each major tick mark. The number of actual minor tick marks will be one less than this.
- Returns:
- the value of the
minorTickCountproperty - See Also:
setMinorTickCount
public final void setMinorTickCount(int value)
Sets the value of the
minorTickCount property.- Property description:
- The number of minor tick divisions to be displayed between each major tick mark. The number of actual minor tick marks will be one less than this.
- Parameters:
-
value- the value for theminorTickCountproperty - See Also:
minorTickCountProperty
public final IntegerProperty minorTickCountProperty()
The number of minor tick divisions to be displayed between each major tick mark. The number of actual minor tick marks will be one less than this.
- Returns:
- the
minorTickCountproperty - See Also:
autoRange
protected final Object autoRange(double length)
This calculates the upper and lower bound based on the data provided to invalidateRange() method. This must not affect the state of the axis. Any results of the auto-ranging should be returned in the range object. This will we passed to setRange() if it has been decided to adopt this range for this axis.
calculateNewScale
protected final double calculateNewScale(double length, double lowerBound, double upperBound)
Calculates new scale for this axis. This should not affect any properties of this axis.
- Parameters:
-
length- The display length of the axis -
lowerBound- The lower bound value -
upperBound- The upper bound value - Returns:
- new scale to fit the range from lower bound to upper bound in the given display length
autoRange
protected Object autoRange(double minValue, double maxValue, double length, double labelSize)
Called to set the upper and lower bound and anything else that needs to be auto-ranged. This must not affect the state of the axis. Any results of the auto-ranging should be returned in the range object. This will we passed to setRange() if it has been decided to adopt this range for this axis.
- Parameters:
-
minValue- The min data value that needs to be plotted on this axis -
maxValue- The max data value that needs to be plotted on this axis -
length- The length of the axis in display coordinates -
labelSize- The approximate average size a label takes along the axis - Returns:
- The calculated range
calculateMinorTickMarks
protected abstract List<T> calculateMinorTickMarks()
Calculates a list of the data values for every minor tick mark
- Returns:
- List of data values where to draw minor tick marks
tickMarksUpdated
protected void tickMarksUpdated()
Called during layout if the tickmarks have been updated, allowing subclasses to do anything they need to in reaction.
- Overrides:
-
tickMarksUpdatedin classAxis<T extends Number>
layoutChildren
protected void layoutChildren()
Invoked during the layout pass to layout this axis and all its content.
- Overrides:
-
layoutChildrenin classAxis<T extends Number>
invalidateRange
public void invalidateRange(List<T> data)
Called when the data has changed and the range may not be valid anymore. This is only called by the chart if isAutoRanging() returns true. If we are auto ranging it will cause layout to be requested and auto ranging to happen on next layout pass.
- Overrides:
-
invalidateRangein classAxis<T extends Number> - Parameters:
-
data- The current set of all data that needs to be plotted on this axis
getDisplayPosition
public double getDisplayPosition(T value)
Gets the display position along this axis for a given value. If the value is not in the current range, the returned value will be an extrapolation of the display position.
- Specified by:
-
getDisplayPositionin classAxis<T extends Number> - Parameters:
-
value- The data value to work out display position for - Returns:
- display position
getValueForDisplay
public T getValueForDisplay(double displayPosition)
Gets the data value for the given display position on this axis. If the axis is a CategoryAxis this will be the nearest value.
- Specified by:
-
getValueForDisplayin classAxis<T extends Number> - Parameters:
-
displayPosition- A pixel position on this axis - Returns:
- the nearest data value to the given pixel position or null if not on axis;
getZeroPosition
public double getZeroPosition()
Gets the display position of the zero line along this axis.
- Specified by:
-
getZeroPositionin classAxis<T extends Number> - Returns:
- display position or Double.NaN if zero is not in current range;
isValueOnAxis
public boolean isValueOnAxis(T value)
Checks if the given value is plottable on this axis
- Specified by:
-
isValueOnAxisin classAxis<T extends Number> - Parameters:
-
value- The value to check if its on axis - Returns:
- true if the given value is plottable on this axis
toNumericValue
public double toNumericValue(T value)
All axis values must be representable by some numeric value. This gets the numeric value for a given data value.
- Specified by:
-
toNumericValuein classAxis<T extends Number> - Parameters:
-
value- The data value to convert - Returns:
- Numeric value for the given data value
toRealValue
public T toRealValue(double value)
All axis values must be representable by some numeric value. This gets the data value for a given numeric value.
- Specified by:
-
toRealValuein classAxis<T extends Number> - Parameters:
-
value- The numeric value to convert - Returns:
- Data value for given numeric value
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
Gets the
CssMetaData associated with this class, which may include the CssMetaData of its superclasses.- Returns:
- the
CssMetaData - Since:
- JavaFX 8.0
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
This method should delegate to
Node.getClassCssMetaData() so that a Node's CssMetaData can be accessed without the need for reflection.- Specified by:
-
getCssMetaDatain interfaceStyleable - Overrides:
-
getCssMetaDatain classAxis<T extends Number> - Returns:
- The CssMetaData associated with this node, which may include the CssMetaData of its superclasses.
- Since:
- JavaFX 8.0
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.