The clockwise property is set to true by default, which means slices are placed in the clockwise order. The labelsVisible property is used to either display pie slice labels or not.
| Modifier and Type | Class and Description |
|---|---|
| public static class | PieChart.
PieChart Data Item, represents one slice in the PieChart |
| private static class | |
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private PieChart. | |
| private BooleanProperty | clockwise
When true we start placing slices clockwise from the startAngle |
| private BitSet | |
| private ObjectProperty | data
PieCharts data |
| private final ListChangeListener | |
| private PieChart. | |
| private Timeline | |
| private static final double | |
| private static final double | |
| private List | |
| private DoubleProperty | labelLineLength
The length of the line from the outside of the pie to the slice labels. |
| private final Path | |
| private BooleanProperty | labelsVisible
When true pie slice labels are drawn |
| private Legend | |
| private static final int | |
| private double | |
| private DoubleProperty | startAngle
The angle to start the first pie slice at |
| Access | Constructor and Description |
|---|---|
| public | |
| public | PieChart(ObservableList<PieChart.
The data to use, this is the actual list used so any changes to it will be reflected in the chart dataConstruct a new PieChart with the given data |
| Modifier and Type | Method and Description |
|---|---|
| private static double | |
| private static double | |
| public final BooleanProperty | |
| private Node | |
| private Timeline | |
| private Text | |
| private void | |
| private void | |
| private void | |
| private void | |
| public final ObjectProperty | |
| private void | |
| private int | |
| private boolean | |
| private boolean | |
| public static List | Returns: theCssMetaDataHides javafx. Gets the |
| public List | getCssMetaData()
Overrides javafx. Implements javafx. This method should delegate to |
| public final ObservableList | |
| private int | |
| public final double | |
| public final boolean | Returns: true if pie slice labels are visible and false otherwise.Indicates whether pie slice labels are drawn or not |
| public final double | |
| public final boolean | |
| public final DoubleProperty | |
| public final BooleanProperty | |
| protected void | layoutChartChildren(double top, double left, double contentWidth, double contentHeight)
Implements abstract javafx. Called to update and layout the chart children available from getChartChildren() |
| private static double | |
| private void | |
| private void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final DoubleProperty | |
| private void | |
| private void | updateLegend()
This is called whenever a series is added or removed and the legend needs to be updated |
| pack-priv void | updateSymbolFocusable(boolean on)
Overrides javafx. Invoked in the FX application thread when accessibility active platform property changes. |
| begin | back to summary |
|---|---|
| private PieChart. | |
| clockwise | back to summary |
|---|---|
| private BooleanProperty clockwise When true we start placing slices clockwise from the startAngle | |
| colorBits | back to summary |
|---|---|
| private BitSet colorBits | |
| data | back to summary |
|---|---|
| private ObjectProperty<ObservableList<PieChart. PieCharts data | |
| dataChangeListener | back to summary |
|---|---|
| private final ListChangeListener<PieChart. | |
| dataItemBeingRemoved | back to summary |
|---|---|
| private PieChart. | |
| dataRemoveTimeline | back to summary |
|---|---|
| private Timeline dataRemoveTimeline | |
| LABEL_BALL_RADIUS | back to summary |
|---|---|
| private static final double LABEL_BALL_RADIUS | |
| LABEL_TICK_GAP | back to summary |
|---|---|
| private static final double LABEL_TICK_GAP | |
| labelLayoutInfos | back to summary |
|---|---|
| private List<PieChart. | |
| labelLineLength | back to summary |
|---|---|
| private DoubleProperty labelLineLength The length of the line from the outside of the pie to the slice labels. | |
| labelLinePath | back to summary |
|---|---|
| private final Path labelLinePath | |
| labelsVisible | back to summary |
|---|---|
| private BooleanProperty labelsVisible When true pie slice labels are drawn | |
| legend | back to summary |
|---|---|
| private Legend legend | |
| MIN_PIE_RADIUS | back to summary |
|---|---|
| private static final int MIN_PIE_RADIUS | |
| pieRadius | back to summary |
|---|---|
| private double pieRadius | |
| startAngle | back to summary |
|---|---|
| private DoubleProperty startAngle The angle to start the first pie slice at | |
| PieChart | back to summary |
|---|---|
| public PieChart() Construct a new empty PieChart. | |
| PieChart | back to summary |
|---|---|
| public PieChart(ObservableList<PieChart. Construct a new PieChart with the given data
| |
| calcX | back to summary |
|---|---|
| private static double calcX(double angle, double radius, double centerX) | |
| calcY | back to summary |
|---|---|
| private static double calcY(double angle, double radius, double centerY) | |
| clockwiseProperty | back to summary |
|---|---|
| public final BooleanProperty clockwiseProperty() | |
| createArcRegion | back to summary |
|---|---|
| private Node createArcRegion(PieChart. | |
| createDataRemoveTimeline | back to summary |
|---|---|
| private Timeline createDataRemoveTimeline(final PieChart. | |
| createPieLabel | back to summary |
|---|---|
| private Text createPieLabel(PieChart. | |
| dataItemAdded | back to summary |
|---|---|
| private void dataItemAdded(final PieChart. | |
| dataItemRemoved | back to summary |
|---|---|
| private void dataItemRemoved(final PieChart. | |
| dataNameChanged | back to summary |
|---|---|
| private void dataNameChanged(PieChart. | |
| dataPieValueChanged | back to summary |
|---|---|
| private void dataPieValueChanged(PieChart. | |
| dataProperty | back to summary |
|---|---|
| public final ObjectProperty | |
| drawLabelLinePath | back to summary |
|---|---|
| private void drawLabelLinePath(PieChart. | |
| fuzzyCompare | back to summary |
|---|---|
| private int fuzzyCompare(double o1, double o2) | |
| fuzzyGT | back to summary |
|---|---|
| private boolean fuzzyGT(double o1, double o2) | |
| fuzzyLT | back to summary |
|---|---|
| private boolean fuzzyLT(double o1, double o2) | |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Gets the
| |
| getCssMetaData | back to summary |
|---|---|
| public List Overrides javafx. Implements javafx. Doc from javafx. This method should delegate to
| |
| getData | back to summary |
|---|---|
| public final ObservableList | |
| getDataSize | back to summary |
|---|---|
| private int getDataSize() | |
| getLabelLineLength | back to summary |
|---|---|
| public final double getLabelLineLength() | |
| getLabelsVisible | back to summary |
|---|---|
| public final boolean getLabelsVisible() Indicates whether pie slice labels are drawn or not
| |
| getStartAngle | back to summary |
|---|---|
| public final double getStartAngle() | |
| isClockwise | back to summary |
|---|---|
| public final boolean isClockwise() | |
| labelLineLengthProperty | back to summary |
|---|---|
| public final DoubleProperty labelLineLengthProperty() | |
| labelsVisibleProperty | back to summary |
|---|---|
| public final BooleanProperty labelsVisibleProperty() | |
| layoutChartChildren | back to summary |
|---|---|
| protected void layoutChartChildren(double top, double left, double contentWidth, double contentHeight) Implements abstract javafx. Doc from javafx. Called to update and layout the chart children available from getChartChildren()
| |
| normalizeAngle | back to summary |
|---|---|
| private static double normalizeAngle(double angle) Normalize any angle into -180 to 180 deg range | |
| removeDataItemRef | back to summary |
|---|---|
| private void removeDataItemRef(PieChart. | |
| resolveCollision | back to summary |
|---|---|
| private void resolveCollision(List<PieChart. | |
| setClockwise | back to summary |
|---|---|
| public final void setClockwise(boolean value) | |
| setData | back to summary |
|---|---|
| public final void setData(ObservableList<PieChart. | |
| setLabelLineLength | back to summary |
|---|---|
| public final void setLabelLineLength(double value) | |
| setLabelsVisible | back to summary |
|---|---|
| public final void setLabelsVisible(boolean value) | |
| setStartAngle | back to summary |
|---|---|
| public final void setStartAngle(double value) | |
| startAngleProperty | back to summary |
|---|---|
| public final DoubleProperty startAngleProperty() | |
| updateDataItemStyleClass | back to summary |
|---|---|
| private void updateDataItemStyleClass(final PieChart. | |
| updateLegend | back to summary |
|---|---|
| private void updateLegend() This is called whenever a series is added or removed and the legend needs to be updated | |
| updateSymbolFocusable | back to summary |
|---|---|
| pack-priv void updateSymbolFocusable(boolean on) Overrides javafx. Doc from javafx. Invoked in the FX application thread when accessibility active platform property changes. The child classes should override this method to set focus traversable flag on every symbol, as well as other elements that need to be focusable.
| |
| Modifier and Type | Field and Description |
|---|---|
| private ReadOnlyObjectWrapper | chart
The chart which this data belongs to. |
| private DoubleProperty | currentPieValue
The current pie value, used during animation. |
| private int | defaultColorIndex
Default color index for this slice. |
| private StringProperty | name
The name of the pie slice |
| private PieChart. | next
Next pointer for the next data item : so we can do animation on data delete. |
| private ReadOnlyObjectWrapper | node
Readonly access to the node that represents the pie slice. |
| private DoubleProperty | pieValue
The value of the pie slice |
| private DoubleProperty | radiusMultiplier
Multiplier that is used to animate the radius of the pie slice |
| private Text |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public final ReadOnlyObjectProperty | |
| private DoubleProperty | |
| public final PieChart | |
| private double | |
| public final String | |
| public Node | Returns: the node that represents the pie sliceReturns the node that represents the pie slice. |
| public final double | |
| private double | |
| public final StringProperty | |
| public ReadOnlyObjectProperty | |
| public final DoubleProperty | |
| private DoubleProperty | |
| private void | |
| private void | |
| public final void | |
| private void | |
| public final void | |
| private void | |
| public String | Returns: a string representation of thisData object.Overrides java. Returns a string representation of this |
| chart | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<PieChart> chart The chart which this data belongs to. | |
| currentPieValue | back to summary |
|---|---|
| private DoubleProperty currentPieValue The current pie value, used during animation. This will be the last data value, new data value or anywhere in between | |
| defaultColorIndex | back to summary |
|---|---|
| private int defaultColorIndex Default color index for this slice. | |
| name | back to summary |
|---|---|
| private StringProperty name The name of the pie slice | |
| next | back to summary |
|---|---|
| private PieChart. Next pointer for the next data item : so we can do animation on data delete. | |
| node | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<Node> node Readonly access to the node that represents the pie slice. You can use this to add mouse event listeners etc. | |
| pieValue | back to summary |
|---|---|
| private DoubleProperty pieValue The value of the pie slice | |
| radiusMultiplier | back to summary |
|---|---|
| private DoubleProperty radiusMultiplier Multiplier that is used to animate the radius of the pie slice | |
| textNode | back to summary |
|---|---|
| private Text textNode | |
| Data | back to summary |
|---|---|
| public Data(String name, double value) Constructs a PieChart.Data object with the given name and value.
| |
| chartProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty | |
| currentPieValueProperty | back to summary |
|---|---|
| private DoubleProperty currentPieValueProperty() | |
| getChart | back to summary |
|---|---|
| public final PieChart getChart() | |
| getCurrentPieValue | back to summary |
|---|---|
| private double getCurrentPieValue() | |
| getName | back to summary |
|---|---|
| public final String getName() | |
| getNode | back to summary |
|---|---|
| public Node getNode() Returns the node that represents the pie slice. You can use this to add mouse event listeners etc.
| |
| getPieValue | back to summary |
|---|---|
| public final double getPieValue() | |
| getRadiusMultiplier | back to summary |
|---|---|
| private double getRadiusMultiplier() | |
| nameProperty | back to summary |
|---|---|
| public final StringProperty nameProperty() | |
| nodeProperty | back to summary |
|---|---|
| public ReadOnlyObjectProperty | |
| pieValueProperty | back to summary |
|---|---|
| public final DoubleProperty pieValueProperty() | |
| radiusMultiplierProperty | back to summary |
|---|---|
| private DoubleProperty radiusMultiplierProperty() | |
| setChart | back to summary |
|---|---|
| private void setChart(PieChart value) | |
| setCurrentPieValue | back to summary |
|---|---|
| private void setCurrentPieValue(double value) | |
| setName | back to summary |
|---|---|
| public final void setName(String value) | |
| setNode | back to summary |
|---|---|
| private void setNode(Node value) | |
| setPieValue | back to summary |
|---|---|
| public final void setPieValue(double value) | |
| setRadiusMultiplier | back to summary |
|---|---|
| private void setRadiusMultiplier(double value) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| pack-priv Text | |
| pack-priv double | |
| pack-priv double |
| Access | Constructor and Description |
|---|---|
| pack-priv | LabelLayoutInfo(double startX, double startY, double endX, double endY, double textX, double textY, Text text, double size)
|
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int |
| endX | back to summary |
|---|---|
| pack-priv double endX | |
| endY | back to summary |
|---|---|
| pack-priv double endY | |
| size | back to summary |
|---|---|
| pack-priv double size | |
| startX | back to summary |
|---|---|
| pack-priv double startX | |
| startY | back to summary |
|---|---|
| pack-priv double startY | |
| text | back to summary |
|---|---|
| pack-priv Text text | |
| textX | back to summary |
|---|---|
| pack-priv double textX | |
| textY | back to summary |
|---|---|
| pack-priv double textY | |
| LabelLayoutInfo | back to summary |
|---|---|
| pack-priv LabelLayoutInfo(double startX, double startY, double endX, double endY, double textX, double textY, Text text, double size) | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final List |
| Access | Constructor and Description |
|---|---|
| private |
| CLOCKWISE | back to summary |
|---|---|
| private static final CssMetaData<PieChart, Boolean> CLOCKWISE | |
| LABEL_LINE_LENGTH | back to summary |
|---|---|
| private static final CssMetaData<PieChart, Number> LABEL_LINE_LENGTH | |
| LABELS_VISIBLE | back to summary |
|---|---|
| private static final CssMetaData<PieChart, Boolean> LABELS_VISIBLE | |
| START_ANGLE | back to summary |
|---|---|
| private static final CssMetaData<PieChart, Number> START_ANGLE | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |