Class PieSectionEntity

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, org.jfree.util.PublicCloneable

    public class PieSectionEntity
    extends ChartEntity
    implements java.io.Serializable
    A chart entity that represents one section within a pie plot.
    See Also:
    Serialized Form
    • Constructor Detail

      • PieSectionEntity

        public PieSectionEntity​(java.awt.Shape area,
                                PieDataset dataset,
                                int pieIndex,
                                int sectionIndex,
                                java.lang.Comparable sectionKey,
                                java.lang.String toolTipText,
                                java.lang.String urlText)
        Creates a new pie section entity.
        Parameters:
        area - the area.
        dataset - the pie dataset.
        pieIndex - the pie index (zero-based).
        sectionIndex - the section index (zero-based).
        sectionKey - the section key.
        toolTipText - the tool tip text.
        urlText - the URL text for HTML image maps.
    • Method Detail

      • getPieIndex

        public int getPieIndex()
        Returns the pie index. For a regular pie chart, the section index is 0. For a pie chart containing multiple pie plots, the pie index is the row or column index from which the pie data is extracted.
        Returns:
        The pie index.
        See Also:
        setPieIndex(int)
      • setPieIndex

        public void setPieIndex​(int index)
        Sets the pie index.
        Parameters:
        index - the new index value.
        See Also:
        getPieIndex()
      • setSectionKey

        public void setSectionKey​(java.lang.Comparable key)
        Sets the section key.
        Parameters:
        key - the section key.
        See Also:
        getSectionKey()
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests this entity for equality with an arbitrary object.
        Overrides:
        equals in class ChartEntity
        Parameters:
        obj - the object (null permitted).
        Returns:
        A boolean.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class ChartEntity
        Returns:
        A hash code.
      • toString

        public java.lang.String toString()
        Returns a string representing the entity.
        Overrides:
        toString in class ChartEntity
        Returns:
        A string representing the entity.