public final class CategoryAxis extends Axis<String>
Type | Property and Description |
---|---|
ReadOnlyDoubleProperty |
categorySpacing
This is the gap between one category and the next along this axis
|
DoubleProperty |
endMargin
The margin between the last tick mark and the axis end
|
BooleanProperty |
gapStartAndEnd
If this is true then half the space between ticks is left at the start
and end
|
DoubleProperty |
startMargin
The margin between the axis start and the first tick-mark
|
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>
USE_COMPUTED_SIZE, USE_PREF_SIZE
BASELINE_OFFSET_SAME_AS_HEIGHT
Constructor and Description |
---|
CategoryAxis()
Create a auto-ranging category axis with an empty list of categories.
|
CategoryAxis(ObservableList<String> categories)
Create a category axis with the given categories.
|
Modifier and Type | Method and Description |
---|---|
protected Object |
autoRange(double length)
This calculates the categories based on the data provided to invalidateRange() method.
|
protected List<String> |
calculateTickValues(double length,
Object range)
Calculate a list of all the data values for each tick mark in range
|
ReadOnlyDoubleProperty |
categorySpacingProperty()
This is the gap between one category and the next along this axis
|
DoubleProperty |
endMarginProperty()
The margin between the last tick mark and the axis end
|
BooleanProperty |
gapStartAndEndProperty()
If this is true then half the space between ticks is left at the start
and end
|
ObservableList<String> |
getCategories()
Returns a
ObservableList of categories plotted on this axis. |
double |
getCategorySpacing()
Gets the value of the property categorySpacing.
|
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(String value)
Get the display position along this axis for a given value.
|
double |
getEndMargin()
Gets the value of the property endMargin.
|
protected Object |
getRange()
Called to get the current axis range.
|
double |
getStartMargin()
Gets the value of the property startMargin.
|
protected String |
getTickMarkLabel(String value)
Get the string label name for a tick mark with the given value
|
String |
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<String> data)
Called when data has changed and the range may not be valid any more.
|
boolean |
isGapStartAndEnd()
Gets the value of the property gapStartAndEnd.
|
boolean |
isValueOnAxis(String value)
Checks if the given value is plottable on this axis
|
protected Dimension2D |
measureTickMarkSize(String value,
Object range)
Measure the size of the label for given tick mark value.
|
void |
setCategories(ObservableList<String> value)
The ordered list of categories plotted on this axis.
|
void |
setEndMargin(double value)
Sets the value of the property endMargin.
|
void |
setGapStartAndEnd(boolean value)
Sets the value of the property gapStartAndEnd.
|
protected void |
setRange(Object range,
boolean animate)
Called to set the current axis range to the given range.
|
void |
setStartMargin(double value)
Sets the value of the property startMargin.
|
DoubleProperty |
startMarginProperty()
The margin between the axis start and the first tick-mark
|
double |
toNumericValue(String value)
All axis values must be representable by some numeric value.
|
String |
toRealValue(double value)
All axis values must be representable by some numeric value.
|
animatedProperty, autoRangingProperty, computePrefHeight, computePrefWidth, getAnimated, getLabel, getSide, getTickLabelFill, getTickLabelFont, getTickLabelGap, getTickLabelRotation, getTickLength, getTickMarks, invalidateRange, isAutoRanging, isRangeValid, isTickLabelsVisible, isTickMarkVisible, labelProperty, layoutChildren, measureTickMarkLabelSize, measureTickMarkSize, requestAxisLayout, requestLayout, setAnimated, setAutoRanging, setLabel, setSide, setTickLabelFill, setTickLabelFont, setTickLabelGap, setTickLabelRotation, setTickLabelsVisible, setTickLength, setTickMarkVisible, shouldAnimate, sideProperty, tickLabelFillProperty, tickLabelFontProperty, tickLabelGapProperty, tickLabelRotationProperty, tickLabelsVisibleProperty, tickLengthProperty, tickMarksUpdated, 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 DoubleProperty startMarginProperty
getStartMargin()
,
setStartMargin(double)
public final DoubleProperty endMarginProperty
getEndMargin()
,
setEndMargin(double)
public final BooleanProperty gapStartAndEndProperty
isGapStartAndEnd()
,
setGapStartAndEnd(boolean)
public final ReadOnlyDoubleProperty categorySpacingProperty
getCategorySpacing()
public CategoryAxis()
public CategoryAxis(ObservableList<String> categories)
categories
- List of the categories for this axispublic final double getStartMargin()
public final void setStartMargin(double value)
public final DoubleProperty startMarginProperty()
getStartMargin()
,
setStartMargin(double)
public final double getEndMargin()
public final void setEndMargin(double value)
public final DoubleProperty endMarginProperty()
getEndMargin()
,
setEndMargin(double)
public final boolean isGapStartAndEnd()
public final void setGapStartAndEnd(boolean value)
public final BooleanProperty gapStartAndEndProperty()
isGapStartAndEnd()
,
setGapStartAndEnd(boolean)
public final void setCategories(ObservableList<String> value)
IllegalArgumentException
is thrown.public final ObservableList<String> getCategories()
ObservableList
of categories plotted on this axis.categories
public final double getCategorySpacing()
public final ReadOnlyDoubleProperty categorySpacingProperty()
getCategorySpacing()
protected Object getRange()
protected void setRange(Object range, boolean animate)
protected Object autoRange(double length)
protected List<String> calculateTickValues(double length, Object range)
calculateTickValues
in class Axis<String>
length
- The length of the axis in display unitsrange
- A range object returned from autoRange()protected String getTickMarkLabel(String value)
getTickMarkLabel
in class Axis<String>
value
- The value to format into a tick label stringprotected Dimension2D measureTickMarkSize(String value, Object range)
measureTickMarkSize
in class Axis<String>
value
- tick mark valuerange
- range to use during calculationspublic void invalidateRange(List<String> data)
invalidateRange
in class Axis<String>
data
- The current set of all data that needs to be plotted on this axispublic double getDisplayPosition(String value)
getDisplayPosition
in class Axis<String>
value
- The data value to work out display position forpublic String getValueForDisplay(double displayPosition)
getValueForDisplay
in class Axis<String>
displayPosition
- A pixel position on this axispublic boolean isValueOnAxis(String value)
isValueOnAxis
in class Axis<String>
value
- The value to check if its on axispublic double toNumericValue(String value)
toNumericValue
in class Axis<String>
value
- The data value to convertpublic String toRealValue(double value)
toRealValue
in class Axis<String>
value
- The numeric value to convertpublic double getZeroPosition()
getZeroPosition
in class Axis<String>
public 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<String>
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, 2019, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.