javafx.scene.chart
Class PieChart.Data
- javafx.scene.chart.PieChart.Data
Enclosing class:
public static final class PieChart.Data extends Object
PieChart Data Item, represents one slice in the PieChart
Since:
JavaFX 2.0
-
Property Summary
All MethodsInstance MethodsConcrete Methods Type Property and Description ReadOnlyObjectProperty<PieChart>chartThe chart which this data belongs to.StringPropertynameThe name of the pie sliceReadOnlyObjectProperty<Node>nodeReadonly access to the node that represents the pie slice.DoublePropertypieValueThe value of the pie slice
-
Constructor Summary
Constructors Constructor and Description Data(String name, double value)Constructs a PieChart.Data object with the given name and value.
-
Method Summary
All MethodsInstance MethodsConcrete Methods Modifier and Type Method and Description ReadOnlyObjectProperty<PieChart>chartProperty()The chart which this data belongs to.PieChartgetChart()Gets the value of the property chart.StringgetName()Gets the value of the property name.NodegetNode()Returns the node that represents the pie slice.doublegetPieValue()Gets the value of the property pieValue.StringPropertynameProperty()The name of the pie sliceReadOnlyObjectProperty<Node>nodeProperty()Readonly access to the node that represents the pie slice.DoublePropertypieValueProperty()The value of the pie slicevoidsetName(String value)Sets the value of the property name.voidsetPieValue(double value)Sets the value of the property pieValue.StringtoString()Returns a string representation of thisDataobject.
-
Property Detail
-
chart
public final ReadOnlyObjectProperty<PieChart> chartProperty
The chart which this data belongs to.See Also:
-
name
public final StringProperty nameProperty
The name of the pie sliceSee Also:
-
pieValue
public final DoubleProperty pieValueProperty
The value of the pie sliceSee Also:
-
node
public ReadOnlyObjectProperty<Node> nodeProperty
Readonly access to the node that represents the pie slice. You can use this to add mouse event listeners etc.See Also:
-
-
Constructor Detail
-
Data
public Data(String name, double value)Constructs a PieChart.Data object with the given name and value.Parameters:
name- name for Pie
-
-
Method Detail
-
getChart
public final PieChart getChart()
Gets the value of the property chart.Property description:
The chart which this data belongs to.
-
chartProperty
public final ReadOnlyObjectProperty<PieChart> chartProperty()
The chart which this data belongs to.See Also:
-
setName
public final void setName(String value)
Sets the value of the property name.Property description:
The name of the pie slice
-
getName
public final String getName()
Gets the value of the property name.Property description:
The name of the pie slice
-
nameProperty
public final StringProperty nameProperty()
The name of the pie sliceSee Also:
-
getPieValue
public final double getPieValue()
Gets the value of the property pieValue.Property description:
The value of the pie slice
-
setPieValue
public final void setPieValue(double value)
Sets the value of the property pieValue.Property description:
The value of the pie slice
-
pieValueProperty
public final DoubleProperty pieValueProperty()
The value of the pie sliceSee Also:
-
getNode
public Node getNode()
Returns the node that represents the pie slice. You can use this to add mouse event listeners etc.
-
nodeProperty
public ReadOnlyObjectProperty<Node> nodeProperty()
Readonly access to the node that represents the pie slice. You can use this to add mouse event listeners etc.See Also:
-
toString
public String toString()
Returns a string representation of thisDataobject.
-
© 2008, 2025, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from JavaFX API Documentation.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Java, JavaFX and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.