public final class NumericAxis extends AbstractNumericAxis
Compared to the NumberAxis
, this one has a few additional features:
auto-ranging
is offauto-range padding
auto-range rounding
tick unit suppliers
Type | Property and Description |
---|---|
DoubleProperty |
autoRangePadding
Fraction of the range to be applied as padding on both sides of the axis range.
|
BooleanProperty |
forceZeroInRange
When set to
true zero is always included in the visible range. |
DoubleProperty |
tickUnit
The value between each major tick mark in data units.
|
ObjectProperty<TickUnitSupplier> |
tickUnitSupplier
Strategy to compute major tick unit when auto-range is on or when axis bounds change.
|
autoRangeRoundingProperty
lowerBoundProperty, minorTickCountProperty, minorTickLengthProperty, minorTickVisibleProperty, scaleProperty, tickLabelFormatterProperty, upperBoundProperty
animatedProperty, autoRangingProperty, labelProperty, sideProperty, tickLabelFillProperty, tickLabelFontProperty, tickLabelGapProperty, tickLabelRotationProperty, tickLabelsVisibleProperty, tickLengthProperty, tickMarkVisibleProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, heightProperty, insetsProperty, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, opaqueInsetsProperty, paddingProperty, prefHeightProperty, prefWidthProperty, scaleShapeProperty, shapeProperty, snapToPixelProperty, widthProperty
impl_traversalEngineProperty, needsLayoutProperty
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, cacheHintProperty, cacheProperty, clipProperty, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, focusedProperty, focusTraversableProperty, hoverProperty, idProperty, impl_showMnemonicsProperty, impl_treeVisibleProperty, inputMethodRequestsProperty, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParentTransformProperty, localToSceneTransformProperty, managedProperty, mouseTransparentProperty, nodeOrientationProperty, 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, pickOnBoundsProperty, pressedProperty, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, styleProperty, translateXProperty, translateYProperty, translateZProperty, visibleProperty
AbstractNumericAxis.DefaultFormatter, AbstractNumericAxis.Range
Axis.TickMark<T>
currentLowerBound
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description |
---|
NumericAxis()
Creates an
auto-ranging NumericAxis. |
NumericAxis(double lowerBound,
double upperBound,
double tickUnit)
Creates a
non-auto-ranging NumericAxis with the given upper bound, lower bound and
tick unit. |
NumericAxis(String axisLabel,
double lowerBound,
double upperBound,
double tickUnit)
Create a
non-auto-ranging NumericAxis with the given upper bound, lower bound and
tick unit. |
Modifier and Type | Method and Description |
---|---|
protected Object |
autoRange(double minValue,
double maxValue,
double length,
double labelSize) |
DoubleProperty |
autoRangePaddingProperty()
Fraction of the range to be applied as padding on both sides of the axis range.
|
protected List<Number> |
calculateMinorTickMarks() |
protected List<Number> |
calculateTickValues(double axisLength,
Object range) |
protected AbstractNumericAxis.Range |
computeRange(double min,
double max,
double axisLength,
double labelSize)
Computes range of this axis, similarly to
ValueAxis.autoRange(double, double, double, double) . |
BooleanProperty |
forceZeroInRangeProperty()
When set to
true zero is always included in the visible range. |
double |
getAutoRangePadding()
Returns the value of the
autoRangePaddingProperty() . |
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
List<CssMetaData<? extends Styleable,?>> |
getCssMetaData() |
protected AbstractNumericAxis.Range |
getRange() |
double |
getTickUnit()
Returns tick unit value expressed in data units.
|
TickUnitSupplier |
getTickUnitSupplier()
Returns the value of the
tickUnitSupplierProperty() . |
boolean |
isForceZeroInRange()
Returns the value of the
forceZeroInRangeProperty() . |
void |
setAutoRangePadding(double padding)
Sets the value of the
autoRangePaddingProperty() |
void |
setForceZeroInRange(boolean value)
Sets the value of the
forceZeroInRangeProperty() . |
protected void |
setRange(Object range,
boolean animate) |
void |
setTickUnit(double unit)
Sets the value of the
tickUnitProperty() . |
void |
setTickUnitSupplier(TickUnitSupplier supplier)
Sets the value of the
tickUnitSupplierProperty() . |
DoubleProperty |
tickUnitProperty()
The value between each major tick mark in data units.
|
ObjectProperty<TickUnitSupplier> |
tickUnitSupplierProperty()
Strategy to compute major tick unit when auto-range is on or when axis bounds change.
|
autoRangeRoundingProperty, getTickMarkLabel, isAutoRangeRounding, measureTickMarkSize, measureTickMarkSizeWithFormat, setAutoRangeRounding
autoRange, calculateNewScale, getDisplayPosition, getLowerBound, getMinorTickCount, getMinorTickLength, getScale, getTickLabelFormatter, getUpperBound, getValueForDisplay, getZeroPosition, invalidateRange, isMinorTickVisible, isValueOnAxis, layoutChildren, lowerBoundProperty, minorTickCountProperty, minorTickLengthProperty, minorTickVisibleProperty, scaleProperty, setLowerBound, setMinorTickCount, setMinorTickLength, setMinorTickVisible, setScale, setTickLabelFormatter, setUpperBound, tickLabelFormatterProperty, tickMarksUpdated, toNumericValue, toRealValue, upperBoundProperty
animatedProperty, autoRangingProperty, computePrefHeight, computePrefWidth, getAnimated, getLabel, getSide, getTickLabelFill, getTickLabelFont, getTickLabelGap, getTickLabelRotation, getTickLength, getTickMarks, invalidateRange, isAutoRanging, isRangeValid, isTickLabelsVisible, isTickMarkVisible, labelProperty, measureTickMarkLabelSize, measureTickMarkSize, requestAxisLayout, requestLayout, setAnimated, setAutoRanging, setLabel, setSide, setTickLabelFill, setTickLabelFont, setTickLabelGap, setTickLabelRotation, setTickLabelsVisible, setTickLength, setTickMarkVisible, shouldAnimate, sideProperty, tickLabelFillProperty, tickLabelFontProperty, tickLabelGapProperty, tickLabelRotationProperty, tickLabelsVisibleProperty, tickLengthProperty, tickMarkVisibleProperty
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, impl_computeContains, impl_computeGeomBounds, impl_computeLayoutBounds, impl_createPeer, impl_notifyLayoutBoundsChanged, impl_pickNodeLocal, impl_updatePeer, 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, snapSize, snapSpace, snapToPixelProperty, widthProperty
getBaselineOffset, getChildren, getChildrenUnmodifiable, getImpl_traversalEngine, getManagedChildren, getStylesheets, impl_getAllParentStylesheets, impl_processCSS, impl_processMXNode, impl_traversalEngineProperty, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setImpl_traversalEngine, setNeedsLayout, updateBounds
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, containsBounds, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, 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, hasProperties, hoverProperty, idProperty, impl_clearDirty, impl_computeIntersects, impl_cssGetCursorInitialValue, impl_cssGetFocusTraversableInitialValue, impl_findStyles, impl_geomChanged, impl_getLeafTransform, impl_getMatchingStyles, impl_getPeer, impl_getPivotX, impl_getPivotY, impl_getPivotZ, impl_getStyleMap, impl_hasTransforms, impl_intersects, impl_intersectsBounds, impl_isDirty, impl_isDirtyEmpty, impl_isShowMnemonics, impl_isTreeVisible, impl_layoutBoundsChanged, impl_markDirty, impl_pickNode, impl_processCSS, impl_reapplyCSS, impl_setShowMnemonics, impl_setStyleMap, impl_showMnemonicsProperty, impl_syncPeer, impl_transformsChanged, impl_traverse, impl_treeVisibleProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, 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, 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, relocate, removeEventFilter, removeEventHandler, requestFocus, 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, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, visibleProperty
public BooleanProperty forceZeroInRangeProperty
true
zero is always included in the visible range.
This only has effect if auto-ranging
is on.isForceZeroInRange()
,
setForceZeroInRange(boolean)
public DoubleProperty autoRangePaddingProperty
getAutoRangePadding()
,
setAutoRangePadding(double)
public DoubleProperty tickUnitProperty
getTickUnit()
,
setTickUnit(double)
public ObjectProperty<TickUnitSupplier> tickUnitSupplierProperty
DefaultTickUnitSupplier
.
See TickUnitSupplier
for more information about the expected behavior of the strategy.
public NumericAxis()
auto-ranging
NumericAxis.public NumericAxis(double lowerBound, double upperBound, double tickUnit)
non-auto-ranging
NumericAxis with the given upper bound, lower bound and
tick unit.lowerBound
- the lower bound
of the axisupperBound
- the upper bound
of the axistickUnit
- the tick unit, i.e. space between tick markspublic NumericAxis(String axisLabel, double lowerBound, double upperBound, double tickUnit)
non-auto-ranging
NumericAxis with the given upper bound, lower bound and
tick unit.axisLabel
- the axis label
lowerBound
- the lower bound
of the axisupperBound
- the upper bound
of the axistickUnit
- the tick unit, i.e. space between tick markspublic BooleanProperty forceZeroInRangeProperty()
true
zero is always included in the visible range.
This only has effect if auto-ranging
is on.isForceZeroInRange()
,
setForceZeroInRange(boolean)
public boolean isForceZeroInRange()
forceZeroInRangeProperty()
.public void setForceZeroInRange(boolean value)
forceZeroInRangeProperty()
.value
- if true
, zero is always included in the visible rangepublic DoubleProperty autoRangePaddingProperty()
getAutoRangePadding()
,
setAutoRangePadding(double)
public double getAutoRangePadding()
autoRangePaddingProperty()
.public void setAutoRangePadding(double padding)
autoRangePaddingProperty()
padding
- padding factorpublic DoubleProperty tickUnitProperty()
getTickUnit()
,
setTickUnit(double)
public double getTickUnit()
public void setTickUnit(double unit)
tickUnitProperty()
.unit
- major tick unitpublic ObjectProperty<TickUnitSupplier> tickUnitSupplierProperty()
DefaultTickUnitSupplier
.
See TickUnitSupplier
for more information about the expected behavior of the strategy.
public TickUnitSupplier getTickUnitSupplier()
tickUnitSupplierProperty()
.public void setTickUnitSupplier(TickUnitSupplier supplier)
tickUnitSupplierProperty()
.supplier
- the tick unit supplier. If null
, the default one will be usedprotected void setRange(Object range, boolean animate)
setRange
in class AbstractNumericAxis
protected List<Number> calculateTickValues(double axisLength, Object range)
calculateTickValues
in class Axis<Number>
protected List<Number> calculateMinorTickMarks()
calculateMinorTickMarks
in class ValueAxis<Number>
protected AbstractNumericAxis.Range getRange()
getRange
in class AbstractNumericAxis
protected Object autoRange(double minValue, double maxValue, double length, double labelSize)
protected AbstractNumericAxis.Range computeRange(double min, double max, double axisLength, double labelSize)
AbstractNumericAxis
ValueAxis.autoRange(double, double, double, double)
. The major
difference is that this method is called when auto-range
is off.computeRange
in class AbstractNumericAxis
min
- The min data value that needs to be plotted on this axismax
- The max data value that needs to be plotted on this axisaxisLength
- The length of the axis in display coordinateslabelSize
- The approximate average size a label takes along the axisValueAxis.autoRange(double, double, double, double)
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
getCssMetaData
in interface Styleable
getCssMetaData
in class ValueAxis<Number>
Copyright © 2019 CERN. All rights reserved.