- 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.BubbleChart<X,Y>
-
- All Implemented Interfaces:
-
Styleable
,EventTarget
public class BubbleChart<X,Y> extends XYChart<X,Y>
为一系列数据点绘制气泡的图表类型。 Data的extra值属性用于表示它应该是java.lang.Number的气泡的半径。- 从以下版本开始:
- JavaFX 2.0
-
-
Property Summary
-
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 描述 BubbleChart(Axis<X> xAxis, Axis<Y> yAxis)
使用给定的轴构建一个新的BubbleChart。BubbleChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data)
使用给定的轴和数据构建新的BubbleChart。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 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)
当数据项已从数据模型中删除但在图表上仍然可见时调用。protected void
layoutPlotChildren()
被要求更新和布局情节儿童。protected void
seriesAdded(XYChart.Series<X,Y> series, int seriesIndex)
一系列已经添加到图表数据模型中。protected void
seriesRemoved(XYChart.Series<X,Y> series)
数据模型中已经删除了一个系列,但它仍然可以在图表上显示。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, getClassCssMetaData, getCssMetaData, getCurrentDisplayedExtraValue, getCurrentDisplayedXValue, getCurrentDisplayedYValue, getData, getDisplayedDataIterator, getDisplayedSeriesIterator, getPlotChildren, getVerticalGridLinesVisible, getXAxis, getYAxis, horizontalGridLinesVisibleProperty, horizontalZeroLineVisibleProperty, isAlternativeColumnFillVisible, isAlternativeRowFillVisible, isHorizontalGridLinesVisible, isHorizontalZeroLineVisible, isVerticalZeroLineVisible, layoutChartChildren, removeDataItemFromDisplay, removeSeriesFromDisplay, seriesChanged, setAlternativeColumnFillVisible, setAlternativeRowFillVisible, setCurrentDisplayedExtraValue, setCurrentDisplayedXValue, setCurrentDisplayedYValue, setData, setHorizontalGridLinesVisible, setHorizontalZeroLineVisible, setVerticalGridLinesVisible, setVerticalZeroLineVisible, updateLegend, verticalGridLinesVisibleProperty, verticalZeroLineVisibleProperty
-
-
-
-
构造方法详细信息
-
BubbleChart
public BubbleChart(Axis<X> xAxis, Axis<Y> yAxis)
使用给定的轴构建一个新的BubbleChart。 BubbleChart不使用类别轴。 X轴和Y轴均应为NumberAxis型。- 参数
-
xAxis
- 要使用的x轴 -
yAxis
- 要使用的y轴
-
BubbleChart
public BubbleChart(Axis<X> xAxis, Axis<Y> yAxis, ObservableList<XYChart.Series<X,Y>> data)
使用给定的轴和数据构建新的BubbleChart。 BubbleChart不使用类别轴。 X轴和Y轴均应为NumberAxis型。- 参数
-
xAxis
- 要使用的x轴 -
yAxis
- 要使用的y轴 -
data
- 要使用的数据,这是使用的实际列表,所以对其进行的任何更改将反映在图表中
-
-
方法详细信息
-
layoutPlotChildren
protected void layoutPlotChildren()
被要求更新和布局情节儿童。 这应该包括更新表示轴和网格线顶部的图的节点的所有工作。原点是绘图区域的左上角,绘制区域可以通过获取x轴的宽度及其高度从y轴的高度。- Specified by:
-
layoutPlotChildren
在XYChart<X,Y>
-
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
- 已更改的数据项
-
seriesAdded
protected void seriesAdded(XYChart.Series<X,Y> series, int seriesIndex)
描述从类别复制:XYChart
一系列已经添加到图表数据模型中。 这是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>
-
-