Class 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
    • 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
        value - pie value
    • Method Detail

      • getChart

        public final PieChart getChart​()
        Gets the value of the property chart.
        Property description:
        The chart which this data belongs to.
      • 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
      • 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
      • 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:
        toString in class Object
        Returns:
        a string representation of this Data object.