Package pamViewFX.fxNodes.pamAxis
Class PamDateAxis
- All Implemented Interfaces:
javafx.css.Styleable,javafx.event.EventTarget
-
Property Summary
PropertiesTypePropertyDescriptionfinal javafx.beans.property.BooleanPropertyWhen true zero is always included in the visible range.final javafx.beans.property.DoublePropertyThe value between each major tick mark in data units.Properties inherited from class javafx.scene.chart.ValueAxis
lowerBound, minorTickCount, minorTickLength, minorTickVisible, scale, tickLabelFormatter, upperBoundProperties inherited from class javafx.scene.chart.Axis
animated, autoRanging, label, side, tickLabelFill, tickLabelFont, tickLabelGap, tickLabelRotation, tickLabelsVisible, tickLength, tickMarkVisibleProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties inherited from 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 -
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classDefault number formatter for DateAxis, this stays in sync with auto-ranging and formats values appropriately.Nested classes/interfaces inherited from class javafx.scene.chart.Axis
javafx.scene.chart.Axis.TickMark<T> -
Field Summary
Fields inherited from class javafx.scene.chart.ValueAxis
currentLowerBoundFields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionCreate a auto-ranging DateAxisPamDateAxis(double lowerBound, double upperBound, double tickUnit) Create a non-auto-ranging DateAxis with the given upper bound, lower bound and tick unitPamDateAxis(String axisLabel, double lowerBound, double upperBound, double tickUnit) Create a non-auto-ranging DateAxis with the given upper bound, lower bound and tick unit -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectautoRange(double minValue, double maxValue, double length, double labelSize) Called to set the upper and lower bound and anything else that needs to be auto-rangedCalculate a list of the data values for every minor tick markcalculateTickValues(double length, Object range) Calculate a list of all the data values for each tick mark in rangefinal javafx.beans.property.BooleanPropertyWhen true zero is always included in the visible range.static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> protected ObjectgetRange()Called to get the current axis range.protected StringgetTickMarkLabel(Long value) Get the string label name for a tick mark with the given valuefinal doubleGets the value of thetickUnitproperty.final booleanGets the value of theforceZeroInRangeproperty.static voidprotected javafx.geometry.Dimension2DmeasureTickMarkSize(Long value, Object range) Measure the size of the label for given tick mark value.double[]final voidsetForceZeroInRange(boolean value) Sets the value of theforceZeroInRangeproperty.protected voidCalled to set the current axis range to the given range.final voidsetTickUnit(double value) Sets the value of thetickUnitproperty.final javafx.beans.property.DoublePropertyThe value between each major tick mark in data units.Methods inherited from class javafx.scene.chart.ValueAxis
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, upperBoundPropertyMethods inherited from class javafx.scene.chart.Axis
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, tickMarkVisiblePropertyMethods inherited from 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, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBoundsMethods inherited from 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, 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, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNode
-
Property Details
-
forceZeroInRange
public final javafx.beans.property.BooleanProperty forceZeroInRangePropertyWhen true zero is always included in the visible range. This only has effect if auto-ranging is on.- See Also:
-
tickUnit
public final javafx.beans.property.DoubleProperty tickUnitPropertyThe value between each major tick mark in data units. This is automatically set if we are auto-ranging.- See Also:
-
-
Constructor Details
-
PamDateAxis
public PamDateAxis()Create a auto-ranging DateAxis -
PamDateAxis
public PamDateAxis(double lowerBound, double upperBound, double tickUnit) Create a non-auto-ranging DateAxis with the given upper bound, lower bound and tick unit- Parameters:
lowerBound- The lower bound for this axis, ie min plottable valueupperBound- The upper bound for this axis, ie max plottable valuetickUnit- The tick unit, ie space between tickmarks
-
PamDateAxis
Create a non-auto-ranging DateAxis with the given upper bound, lower bound and tick unit- Parameters:
axisLabel- The name to display for this axislowerBound- The lower bound for this axis, ie min plottable valueupperBound- The upper bound for this axis, ie max plottable valuetickUnit- The tick unit, ie space between tickmarks
-
-
Method Details
-
isForceZeroInRange
public final boolean isForceZeroInRange()Gets the value of theforceZeroInRangeproperty.- Property description:
- When true zero is always included in the visible range. This only has effect if auto-ranging is on.
- Returns:
- the value of the
forceZeroInRangeproperty - See Also:
-
setForceZeroInRange
public final void setForceZeroInRange(boolean value) Sets the value of theforceZeroInRangeproperty.- Property description:
- When true zero is always included in the visible range. This only has effect if auto-ranging is on.
- Parameters:
value- the value for theforceZeroInRangeproperty- See Also:
-
forceZeroInRangeProperty
public final javafx.beans.property.BooleanProperty forceZeroInRangeProperty()When true zero is always included in the visible range. This only has effect if auto-ranging is on.- Returns:
- the
forceZeroInRangeproperty - See Also:
-
getTickUnit
public final double getTickUnit()Gets the value of thetickUnitproperty.- Property description:
- The value between each major tick mark in data units. This is automatically set if we are auto-ranging.
- Returns:
- the value of the
tickUnitproperty - See Also:
-
setTickUnit
public final void setTickUnit(double value) Sets the value of thetickUnitproperty.- Property description:
- The value between each major tick mark in data units. This is automatically set if we are auto-ranging.
- Parameters:
value- the value for thetickUnitproperty- See Also:
-
tickUnitProperty
public final javafx.beans.property.DoubleProperty tickUnitProperty()The value between each major tick mark in data units. This is automatically set if we are auto-ranging.- Returns:
- the
tickUnitproperty - See Also:
-
getTickMarkLabel
Get the string label name for a tick mark with the given value- Specified by:
getTickMarkLabelin classjavafx.scene.chart.Axis<Long>- Parameters:
value- The value to format into a tick label string- Returns:
- A formatted string for the given value
-
getRange
Called to get the current axis range.- Specified by:
getRangein classjavafx.scene.chart.Axis<Long>- Returns:
- A range object that can be passed to setRange() and calculateTickValues()
-
recalculateTicks
public double[] recalculateTicks() -
setRange
Called to set the current axis range to the given range. If isAnimating() is true then this method should animate the range to the new range.- Specified by:
setRangein classjavafx.scene.chart.Axis<Long>- Parameters:
range- A range object returned from autoRange()animate- If true animate the change in range
-
calculateTickValues
Calculate a list of all the data values for each tick mark in range- Specified by:
calculateTickValuesin classjavafx.scene.chart.Axis<Long>- Parameters:
length- The length of the axis in display unitsrange- A range object returned from autoRange()- Returns:
- A list of tick marks that fit along the axis if it was the given length
-
calculateMinorTickMarks
Calculate a list of the data values for every minor tick mark- Specified by:
calculateMinorTickMarksin classjavafx.scene.chart.ValueAxis<Long>- Returns:
- List of data values where to draw minor tick marks
-
measureTickMarkSize
Measure the size of the label for given tick mark value. This uses the font that is set for the tick marks- Overrides:
measureTickMarkSizein classjavafx.scene.chart.Axis<Long>- Parameters:
value- tick mark valuerange- range to use during calculations- Returns:
- size of tick mark label for given value
-
autoRange
Called to set the upper and lower bound and anything else that needs to be auto-ranged- Overrides:
autoRangein classjavafx.scene.chart.ValueAxis<Long>- Parameters:
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 axis- Returns:
- The calculated range
-
getClassCssMetaData
- Returns:
- The CssMetaData associated with this class, which may include the CssMetaData of its super classes.
- Since:
- JavaFX 8.0
-
getCssMetaData
- Specified by:
getCssMetaDatain interfacejavafx.css.Styleable- Overrides:
getCssMetaDatain classjavafx.scene.chart.ValueAxis<Long>- Since:
- JavaFX 8.0
-
main
-