Class CategoryItemEntity<R extends Comparable<R>,​C extends Comparable<C>>

    • Constructor Detail

      • CategoryItemEntity

        public CategoryItemEntity​(Shape area,
                                  String toolTipText,
                                  String urlText,
                                  CategoryDataset dataset,
                                  R rowKey,
                                  C 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<R,​CgetDataset()
        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)
      • setRowKey

        public void setRowKey​(R rowKey)
        Sets the row key.
        Parameters:
        rowKey - the row key (null not permitted).
        See Also:
        getRowKey()
      • setColumnKey

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

        public 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​(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.