public abstract class ValueAxis<T extends Number> extends Axis<T>
Type | Property and Description |
---|---|
DoubleProperty |
lowerBound
The value for the lower bound of this axis, ie min value.
|
IntegerProperty |
minorTickCount
The number of minor tick divisions to be displayed between each major tick mark.
|
DoubleProperty |
minorTickLength
The length of minor tick mark lines.
|
BooleanProperty |
minorTickVisible
true if minor tick marks should be displayed
|
ReadOnlyDoubleProperty |
scale
The scale factor from data units to visual units
|
ObjectProperty<StringConverter<T>> |
tickLabelFormatter
StringConverter used to format tick mark labels.
|
DoubleProperty |
upperBound
The value for the upper bound of this axis, ie max value.
|
animated, autoRanging, label, side, tickLabelFill, tickLabelFont, tickLabelGap, tickLabelRotation, tickLabelsVisible, tickLength, tickMarkVisible
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
needsLayout
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, 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, visible
Axis.TickMark<T>
Modifier and Type | Field and Description |
---|---|
protected DoubleProperty |
currentLowerBound
The current value for the lowerBound of this axis, ie min value.
|
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description |
---|
ValueAxis()
Create a auto-ranging ValueAxis
|
ValueAxis(double lowerBound,
double upperBound)
Create a non-auto-ranging ValueAxis with the given upper & lower bound
|
Modifier and Type | Method and Description |
---|---|
protected Object |
autoRange(double length)
This calculates the upper and lower bound based on the data provided to invalidateRange() method.
|
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.
|
protected abstract List<T> |
calculateMinorTickMarks()
Calculate a list of the data values for every minor tick mark
|
protected double |
calculateNewScale(double length,
double lowerBound,
double upperBound)
Calculate a new scale for this axis.
|
static List<CssMetaData<? extends Styleable,?>> |
getClassCssMetaData() |
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. |
double |
getDisplayPosition(T value)
Get the display position along this axis for a given value.
|
double |
getLowerBound()
Gets the value of the property lowerBound.
|
int |
getMinorTickCount()
Gets the value of the property minorTickCount.
|
double |
getMinorTickLength()
Gets the value of the property minorTickLength.
|
double |
getScale()
Gets the value of the property scale.
|
StringConverter<T> |
getTickLabelFormatter()
Gets the value of the property tickLabelFormatter.
|
double |
getUpperBound()
Gets the value of the property upperBound.
|
T |
getValueForDisplay(double displayPosition)
Get the data value for the given display position on this axis.
|
double |
getZeroPosition()
Get the display position of the zero line along this axis.
|
void |
invalidateRange(List<T> data)
Called when data has changed and the range may not be valid any more.
|
boolean |
isMinorTickVisible()
Gets the value of the property minorTickVisible.
|
boolean |
isValueOnAxis(T value)
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.
|
DoubleProperty |
lowerBoundProperty()
The value for the lower bound of this axis, ie min value.
|
IntegerProperty |
minorTickCountProperty()
The number of minor tick divisions to be displayed between each major tick mark.
|
DoubleProperty |
minorTickLengthProperty()
The length of minor tick mark lines.
|
BooleanProperty |
minorTickVisibleProperty()
true if minor tick marks should be displayed
|
ReadOnlyDoubleProperty |
scaleProperty()
The scale factor from data units to visual units
|
void |
setLowerBound(double value)
Sets the value of the property lowerBound.
|
void |
setMinorTickCount(int value)
Sets the value of the property minorTickCount.
|
void |
setMinorTickLength(double value)
Sets the value of the property minorTickLength.
|
void |
setMinorTickVisible(boolean value)
Sets the value of the property minorTickVisible.
|
protected void |
setScale(double scale)
Sets the value of the property scale.
|
void |
setTickLabelFormatter(StringConverter<T> value)
Sets the value of the property tickLabelFormatter.
|
void |
setUpperBound(double value)
Sets the value of the property upperBound.
|
ObjectProperty<StringConverter<T>> |
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(T value)
All axis values must be representable by some numeric value.
|
T |
toRealValue(double value)
All axis values must be representable by some numeric value.
|
DoubleProperty |
upperBoundProperty()
The value for the upper bound of this axis, ie max value.
|
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
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, snapSize, snapSpace, snapToPixelProperty, widthProperty
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBounds
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, 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, 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 final BooleanProperty minorTickVisibleProperty
isMinorTickVisible()
,
setMinorTickVisible(boolean)
public final ReadOnlyDoubleProperty scaleProperty
getScale()
,
setScale(double)
public final DoubleProperty upperBoundProperty
getUpperBound()
,
setUpperBound(double)
public final DoubleProperty lowerBoundProperty
getLowerBound()
,
setLowerBound(double)
public final ObjectProperty<StringConverter<T extends Number>> tickLabelFormatterProperty
public final DoubleProperty minorTickLengthProperty
getMinorTickLength()
,
setMinorTickLength(double)
public final IntegerProperty minorTickCountProperty
getMinorTickCount()
,
setMinorTickCount(int)
protected final DoubleProperty currentLowerBound
public ValueAxis()
public ValueAxis(double lowerBound, double upperBound)
lowerBound
- The lower bound for this axis, ie min plottable valueupperBound
- The upper bound for this axis, ie max plottable valuepublic final boolean isMinorTickVisible()
public final void setMinorTickVisible(boolean value)
public final BooleanProperty minorTickVisibleProperty()
isMinorTickVisible()
,
setMinorTickVisible(boolean)
public final double getScale()
protected final void setScale(double scale)
public final ReadOnlyDoubleProperty scaleProperty()
getScale()
,
setScale(double)
public final double getUpperBound()
public final void setUpperBound(double value)
public final DoubleProperty upperBoundProperty()
getUpperBound()
,
setUpperBound(double)
public final double getLowerBound()
public final void setLowerBound(double value)
public final DoubleProperty lowerBoundProperty()
getLowerBound()
,
setLowerBound(double)
public final StringConverter<T> getTickLabelFormatter()
public final void setTickLabelFormatter(StringConverter<T> value)
public final ObjectProperty<StringConverter<T>> tickLabelFormatterProperty()
public final double getMinorTickLength()
public final void setMinorTickLength(double value)
public final DoubleProperty minorTickLengthProperty()
getMinorTickLength()
,
setMinorTickLength(double)
public final int getMinorTickCount()
public final void setMinorTickCount(int value)
public final IntegerProperty minorTickCountProperty()
getMinorTickCount()
,
setMinorTickCount(int)
protected final Object autoRange(double length)
protected final double calculateNewScale(double length, double lowerBound, double upperBound)
length
- The display length of the axislowerBound
- The lower bound valueupperBound
- The upper bound valueprotected Object autoRange(double minValue, double maxValue, double length, double labelSize)
minValue
- The min data value that needs to be plotted on this axismaxValue
- The max data value that needs to be plotted on this axislength
- The length of the axis in display coordinateslabelSize
- The approximate average size a label takes along the axisprotected abstract List<T> calculateMinorTickMarks()
protected void tickMarksUpdated()
tickMarksUpdated
in class Axis<T extends Number>
protected void layoutChildren()
layoutChildren
in class Axis<T extends Number>
public void invalidateRange(List<T> data)
invalidateRange
in class Axis<T extends Number>
data
- The current set of all data that needs to be plotted on this axispublic double getDisplayPosition(T value)
getDisplayPosition
in class Axis<T extends Number>
value
- The data value to work out display position forpublic T getValueForDisplay(double displayPosition)
getValueForDisplay
in class Axis<T extends Number>
displayPosition
- A pixel position on this axispublic double getZeroPosition()
getZeroPosition
in class Axis<T extends Number>
public boolean isValueOnAxis(T value)
isValueOnAxis
in class Axis<T extends Number>
value
- The value to check if its on axispublic double toNumericValue(T value)
toNumericValue
in class Axis<T extends Number>
value
- The data value to convertpublic T toRealValue(double value)
toRealValue
in class Axis<T extends Number>
value
- The numeric value to convertpublic static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
Node.getClassCssMetaData()
so that
a Node's CssMetaData can be accessed without the need for reflection.getCssMetaData
in interface Styleable
getCssMetaData
in class Axis<T extends Number>
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 2008, 2017, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.