Class CategoryItemEntity

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

    public class CategoryItemEntity
    extends ChartEntity
    implements java.lang.Cloneable, java.io.Serializable
    A chart entity that represents one item within a category plot.
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        For serialization.
        See Also:
        Constant Field Values
      • rowKey

        private java.lang.Comparable rowKey
        The row key.
      • columnKey

        private java.lang.Comparable columnKey
        The column key.
    • Constructor Detail

      • CategoryItemEntity

        public CategoryItemEntity​(java.awt.Shape area,
                                  java.lang.String toolTipText,
                                  java.lang.String urlText,
                                  CategoryDataset dataset,
                                  java.lang.Comparable rowKey,
                                  java.lang.Comparable columnKey)
        Creates a new entity instance for an item in the specified dataset.
        Parameters:
        area - the 'hotspot' area (null not permitted).
        toolTipText - the tool tip text.
        urlText - the URL text.
        dataset - the dataset (null not permitted).
        rowKey - the row key (null not permitted).
        columnKey - the column key (null not permitted).
    • Method Detail

      • getDataset

        public CategoryDataset getDataset()
        Returns the dataset this entity refers to. This can be used to differentiate between items in a chart that displays more than one dataset.
        Returns:
        The dataset (never null).
        See Also:
        setDataset(CategoryDataset)
      • setDataset

        public void setDataset​(CategoryDataset dataset)
        Sets the dataset this entity refers to.
        Parameters:
        dataset - the dataset (null not permitted).
        See Also:
        getDataset()
      • getRowKey

        public java.lang.Comparable getRowKey()
        Returns the row key.
        Returns:
        The row key (never null).
        See Also:
        setRowKey(Comparable)
      • setRowKey

        public void setRowKey​(java.lang.Comparable rowKey)
        Sets the row key.
        Parameters:
        rowKey - the row key (null not permitted).
        See Also:
        getRowKey()
      • getColumnKey

        public java.lang.Comparable getColumnKey()
        Returns the column key.
        Returns:
        The column key (never null).
        See Also:
        setColumnKey(Comparable)
      • setColumnKey

        public void setColumnKey​(java.lang.Comparable columnKey)
        Sets the column key.
        Parameters:
        columnKey - the column key (null not permitted).
        See Also:
        getColumnKey()
      • toString

        public java.lang.String toString()
        Returns a string representing this object (useful for debugging purposes).
        Overrides:
        toString in class ChartEntity
        Returns:
        A string (never null).
      • equals

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

        public boolean canEqual​(java.lang.Object other)
        Ensures symmetry between super/subclass implementations of equals. For more detail, see http://jqno.nl/equalsverifier/manual/inheritance.
        Overrides:
        canEqual in class ChartEntity
        Parameters:
        other - Object
        Returns:
        true ONLY if the parameter is THIS class type
      • hashCode

        public int hashCode()
        Description copied from class: ChartEntity
        Returns a hash code for this instance.
        Overrides:
        hashCode in class ChartEntity
        Returns:
        A hash code.