Module platform

Class DialPointer

java.lang.Object
org.jfree.chart.plot.dial.AbstractDialLayer
org.jfree.chart.plot.dial.DialPointer
All Implemented Interfaces:
Serializable, Cloneable, DialLayer, PublicCloneable
Direct Known Subclasses:
DialPointer.Pin, DialPointer.Pointer

public abstract class DialPointer extends AbstractDialLayer implements DialLayer, Cloneable, PublicCloneable, Serializable
A base class for the pointer in a DialPlot.
See Also:
  • Constructor Details

    • DialPointer

      protected DialPointer()
      Creates a new DialPointer instance.
    • DialPointer

      protected DialPointer(int datasetIndex)
      Creates a new pointer for the specified dataset.
      Parameters:
      datasetIndex - the dataset index.
  • Method Details

    • getDatasetIndex

      public int getDatasetIndex()
      Returns the dataset index that the pointer maps to.
      Returns:
      The dataset index.
      See Also:
    • setDatasetIndex

      public void setDatasetIndex(int index)
      Sets the dataset index for the pointer and sends a DialLayerChangeEvent to all registered listeners.
      Parameters:
      index - the index.
      See Also:
    • getRadius

      public double getRadius()
      Returns the radius of the pointer, as a percentage of the dial's framing rectangle.
      Returns:
      The radius.
      See Also:
    • setRadius

      public void setRadius(double radius)
      Sets the radius of the pointer and sends a DialLayerChangeEvent to all registered listeners.
      Parameters:
      radius - the radius.
      See Also:
    • isClippedToWindow

      public boolean isClippedToWindow()
      Returns true to indicate that this layer should be clipped within the dial window.
      Specified by:
      isClippedToWindow in interface DialLayer
      Returns:
      true.
    • equals

      public boolean equals(Object obj)
      Checks this instance for equality with an arbitrary object.
      Overrides:
      equals in class AbstractDialLayer
      Parameters:
      obj - the object (null not permitted).
      Returns:
      A boolean.
    • hashCode

      public int hashCode()
      Returns a hash code.
      Overrides:
      hashCode in class AbstractDialLayer
      Returns:
      A hash code.
    • clone

      public Object clone() throws CloneNotSupportedException
      Returns a clone of the pointer.
      Specified by:
      clone in interface PublicCloneable
      Overrides:
      clone in class AbstractDialLayer
      Returns:
      a clone.
      Throws:
      CloneNotSupportedException - if one of the attributes cannot be cloned.