Class PieChart.Data
java.lang.Object
javafx.scene.chart.PieChart.Data
- Enclosing class:
- PieChart
public static final class PieChart.Data
extends Object PieChart Data Item, represents one slice in the PieChart
- Since:
- JavaFX 2.0
Property Summary
| Type | Property | Description |
|---|---|---|
ReadOnlyObjectProperty<PieChart> | chart | The chart which this data belongs to. |
StringProperty | name | The name of the pie slice |
ReadOnlyObjectProperty<Node> | node | Readonly access to the node that represents the pie slice. |
DoubleProperty | pieValue | The value of the pie slice |
Constructor Summary
Method Summary
| Modifier and Type | Method | Description |
|---|---|---|
ReadOnlyObjectProperty<PieChart> | chartProperty() | The chart which this data belongs to. |
PieChart | getChart() | Gets the value of the property chart. |
String | getName() | Gets the value of the property name. |
Node | getNode() | Returns the node that represents the pie slice. |
double | getPieValue() | Gets the value of the property pieValue. |
StringProperty | nameProperty() | The name of the pie slice |
ReadOnlyObjectProperty<Node> | nodeProperty() | Readonly access to the node that represents the pie slice. |
DoubleProperty | pieValueProperty() | The value of the pie slice |
void | setName(String value) | Sets the value of the property name. |
void | setPieValue(double value) | Sets the value of the property pieValue. |
String | toString() | Returns a string representation of this Data object. |
Property Details
chart
public final ReadOnlyObjectProperty<PieChart> chartProperty
The chart which this data belongs to.
- See Also:
getChart()
name
public final StringProperty nameProperty
The name of the pie slice
- See Also:
-
getName(),setName(String)
pieValue
public final DoubleProperty pieValueProperty
The value of the pie slice
- See Also:
-
getPieValue(),setPieValue(double)
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:
getNode()
Constructor Details
Data
public Data(String name, double value)
Constructs a PieChart.Data object with the given name and value.
- Parameters:
-
name- name for Pie -
value- pie value
Method Details
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:
getChart()
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 slice
- See Also:
-
getName(),setName(String)
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 slice
- See Also:
-
getPieValue(),setPieValue(double)
getNode
public Node getNode()
Returns the node that represents the pie slice. You can use this to add mouse event listeners etc.
- Returns:
- the node that represents the pie slice
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:
getNode()
toString
public String toString()
Returns a string representation of this
Data object.- Overrides:
-
toStringin classObject - Returns:
- a string representation of this
Dataobject.
© 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.