- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.chart.Chart
-
- javafx.scene.chart.XYChart<X,Y>
-
- javafx.scene.chart.StackedBarChart<X,Y>
-
- All Implemented Interfaces:
-
Styleable
,EventTarget
public class StackedBarChart<X,Y> extends XYChart<X,Y>
- 从以下版本开始:
- JavaFX 2.1
-
-
Property Summary
Properties Type Property 描述 DoubleProperty
categoryGap
在不同类别的酒吧之间留下的差距-
Properties inherited from class javafx.scene.chart.Chart
animated, legend, legendSide, legendVisible, title, titleSide
-
Properties 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, 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
-
Properties inherited from class javafx.scene.Parent
needsLayout
-
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
-
Properties inherited from class javafx.scene.chart.XYChart
alternativeColumnFillVisible, alternativeRowFillVisible, data, horizontalGridLinesVisible, horizontalZeroLineVisible, verticalGridLinesVisible, verticalZeroLineVisible
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class javafx.scene.chart.XYChart
XYChart.Data<X,Y>, XYChart.Series<X,Y>
-
-
Field Summary
-
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
-
-
构造方法摘要
构造方法 Constructor 描述 StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis)
使用给定的轴构建一个新的StackedBarChart。StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data)
使用给定的轴和数据构造一个新的StackedBarChart。StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data, double categoryGap)
使用给定的轴和数据构造一个新的StackedBarChart。
-
方法摘要
所有方法 静态方法 接口方法 具体的方法 Modifier and Type 方法 描述 DoubleProperty
categoryGapProperty()
在不同类别的酒吧之间留下的差距protected void
dataItemAdded(XYChart.Series<X,Y> series, int itemIndex, XYChart.Data<X,Y> item)
将数据项添加到系列时调用。protected void
dataItemChanged(XYChart.Data<X,Y> item)
数据项已更改时调用,即其xValue,yValue或extraValue已更改。protected void
dataItemRemoved(XYChart.Data<X,Y> item, XYChart.Series<X,Y> series)
当数据项已从数据模型中删除但在图表上仍然可见时调用。double
getCategoryGap()
获取属性categoryGap的值。static List<CssMetaData<? extends Styleable,?>>
getClassCssMetaData()
List<CssMetaData<? extends Styleable,?>>
getCssMetaData()
该方法应该委托给Node.getClassCssMetaData()
,以便可以访问节点的CssMetaData而不需要反射。protected void
layoutPlotChildren()
被要求更新和布局情节儿童。protected void
seriesAdded(XYChart.Series<X,Y> series, int seriesIndex)
一系列已经添加到图表数据模型中。protected void
seriesChanged(ListChangeListener.Change<? extends XYChart.Series> c)
当将每个原子更改作为此图表的系列列表时调用protected void
seriesRemoved(XYChart.Series<X,Y> series)
数据模型中已经删除了一个系列,但它仍然可以在图表上显示。void
setCategoryGap(double value)
设置属性categoryGap的值。protected void
updateAxisRange()
当范围已经无效并且我们需要更新时,这被称为。-
Methods inherited from class javafx.scene.chart.Chart
animate, animatedProperty, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, getAnimated, getChartChildren, getLegend, getLegendSide, getTitle, getTitleSide, isLegendVisible, layoutChildren, legendProperty, legendSideProperty, legendVisibleProperty, requestChartLayout, setAnimated, setLegend, setLegendSide, setLegendVisible, setTitle, setTitleSide, shouldAnimate, titleProperty, titleSideProperty
-
Methods 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, 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, 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, visibleProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, 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 inherited from interface javafx.css.Styleable
getStyleableNode
-
Methods inherited from class javafx.scene.chart.XYChart
alternativeColumnFillVisibleProperty, alternativeRowFillVisibleProperty, currentDisplayedExtraValueProperty, currentDisplayedXValueProperty, currentDisplayedYValueProperty, dataProperty, getCurrentDisplayedExtraValue, getCurrentDisplayedXValue, getCurrentDisplayedYValue, getData, getDisplayedDataIterator, getDisplayedSeriesIterator, getPlotChildren, getVerticalGridLinesVisible, getXAxis, getYAxis, horizontalGridLinesVisibleProperty, horizontalZeroLineVisibleProperty, isAlternativeColumnFillVisible, isAlternativeRowFillVisible, isHorizontalGridLinesVisible, isHorizontalZeroLineVisible, isVerticalZeroLineVisible, layoutChartChildren, removeDataItemFromDisplay, removeSeriesFromDisplay, setAlternativeColumnFillVisible, setAlternativeRowFillVisible, setCurrentDisplayedExtraValue, setCurrentDisplayedXValue, setCurrentDisplayedYValue, setData, setHorizontalGridLinesVisible, setHorizontalZeroLineVisible, setVerticalGridLinesVisible, setVerticalZeroLineVisible, updateLegend, verticalGridLinesVisibleProperty, verticalZeroLineVisibleProperty
-
-
-
-
Property Detail
-
categoryGap
public DoubleProperty categoryGapProperty
在不同类别的酒吧之间留下的差距
-
-
构造方法详细信息
-
StackedBarChart
public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis)
使用给定的轴构建一个新的StackedBarChart。 两轴应该是ValueAxis / NumberAxis和CategoryAxis,它们可以是任意顺序,具体取决于是否要使用水平或垂直条形图。- 参数
-
xAxis
- 要使用的x轴 -
yAxis
- 要使用的y轴
-
StackedBarChart
public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data)
使用给定的轴和数据构造一个新的StackedBarChart。 两轴应该是ValueAxis / NumberAxis和CategoryAxis,它们可以是任意顺序,具体取决于是否要使用水平或垂直条形图。- 参数
-
xAxis
- 要使用的x轴 -
yAxis
- 要使用的y轴 -
data
- 要使用的数据,这是使用的实际列表,所以对其进行的任何更改将反映在图表中
-
StackedBarChart
public StackedBarChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data, double categoryGap)
使用给定的轴和数据构造一个新的StackedBarChart。 两轴应该是ValueAxis / NumberAxis和CategoryAxis,它们可以是任意顺序,具体取决于是否要使用水平或垂直条形图。- 参数
-
xAxis
- 要使用的x轴 -
yAxis
- 要使用的y轴 -
data
- 要使用的数据,这是使用的实际列表,所以对其进行的任何更改将反映在图表中 -
categoryGap
- 在不同类别的酒吧之间留下的差距
-
-
方法详细信息
-
getCategoryGap
public double getCategoryGap()
获取属性categoryGap的值。- Property description:
- 在不同类别的酒吧之间留下的差距
-
setCategoryGap
public void setCategoryGap(double value)
设置属性categoryGap的值。- Property description:
- 在不同类别的酒吧之间留下的差距
-
categoryGapProperty
public DoubleProperty categoryGapProperty()
在不同类别的酒吧之间留下的差距
-
dataItemAdded
protected void dataItemAdded(XYChart.Series<X,Y> series, int itemIndex, XYChart.Data<X,Y> item)
描述从类别复制:XYChart
将数据项添加到系列时调用。 这是XYChart的实现可以创建/添加新节点,以使getPlotChildren表示此数据项。 如果animated = true,他们也可以将数据添加为淡入淡出或相似。- Specified by:
-
dataItemAdded
在XYChart<X,Y>
- 参数
-
series
- 数据项被添加到的系列 -
itemIndex
- 系列中新项目的索引 -
item
- 添加的新数据项
-
dataItemRemoved
protected void dataItemRemoved(XYChart.Data<X,Y> item, XYChart.Series<X,Y> series)
描述从类复制:XYChart
当数据项已从数据模型中删除但在图表上仍然可见时调用。 它仍然可见,以便您可以处理动画,以删除它在这种方法。 完成动画数据项后,您必须调用removeDataItemFromDisplay()来删除项目节点不显示在图表上。- Specified by:
-
dataItemRemoved
在XYChart<X,Y>
- 参数
-
item
- 从系列中删除的项目 -
series
- 该项目已被删除
-
dataItemChanged
protected void dataItemChanged(XYChart.Data<X,Y> item)
数据项已更改时调用,即其xValue,yValue或extraValue已更改。- Specified by:
-
dataItemChanged
在XYChart<X,Y>
- 参数
-
item
- 已更改的数据项
-
seriesChanged
protected void seriesChanged(ListChangeListener.Change<? extends XYChart.Series> c)
说明从类别复制:XYChart
当将每个原子更改作为此图表的系列列表时调用- 重写:
-
seriesChanged
在XYChart<X,Y>
- 参数
-
c
- 表示系列更改的更改实例
-
seriesAdded
protected void seriesAdded(XYChart.Series<X,Y> series, int seriesIndex)
一系列已经添加到图表数据模型中。 这是XYChart的实现可以创建/添加新的节点来getPlotChildren来表示这个系列。 此外,您必须处理添加已经在系列中的任何数据项。 您可以简单地为每一个调用dataItemAdded(),或为要添加的整个系列提供一些不同的动画。- Specified by:
-
seriesAdded
在XYChart<X,Y>
- 参数
-
series
- 已添加的系列 -
seriesIndex
- 新系列的索引
-
seriesRemoved
protected void seriesRemoved(XYChart.Series<X,Y> series)
描述从类别复制:XYChart
数据模型中已经删除了一个系列,但它仍然可以在图表上显示。 它仍然可见,以便您可以处理动画,以删除它在这种方法。 完成动画数据项后,您必须调用removeSeriesFromDisplay()从显示列表中删除该系列。- Specified by:
-
seriesRemoved
在XYChart<X,Y>
- 参数
-
series
- 已被删除的系列
-
updateAxisRange
protected void updateAxisRange()
当范围已经无效并且我们需要更新时,这被称为。 如果轴是自动测距,那么我们编译给定轴必须绘制的所有数据的列表,并在传递该数据的轴上调用invalidateRange()。- 重写:
-
updateAxisRange
在XYChart<X,Y>
-
layoutPlotChildren
protected void layoutPlotChildren()
被要求更新和布局情节儿童。 这应该包括更新表示轴和网格线顶部的图的节点的所有工作。原点是绘图区域的左上角,绘制区域可以通过获取x轴的宽度及其高度从y轴的高度。- Specified by:
-
layoutPlotChildren
在XYChart<X,Y>
-
getClassCssMetaData
public static List<CssMetaData<? extends Styleable,?>> getClassCssMetaData()
- 结果
- 与此类相关联的CssMetaData可能包括其类的CssMetaData。
- 从以下版本开始:
- JavaFX 8.0
-
getCssMetaData
public List<CssMetaData<? extends Styleable,?>> getCssMetaData()
该方法应该委托给Node.getClassCssMetaData()
,以便可以访问节点的CssMetaData而不需要反射。- Specified by:
-
getCssMetaData
在接口Styleable
- 重写:
-
getCssMetaData
在XYChart<X,Y>
- 结果
- 与该节点相关联的CssMetaData,其可以包括其超类的CssMetaData。
- 从以下版本开始:
- JavaFX 8.0
-
-