Class DialPointer.Pointer

All Implemented Interfaces:
Serializable, Cloneable, DialLayer, PublicCloneable
Enclosing class:
DialPointer

public static class DialPointer.Pointer extends DialPointer
A dial pointer.
See Also:
  • Field Details

    • serialVersionUID

      static final long serialVersionUID
      For serialization.
      See Also:
    • widthRadius

      private double widthRadius
      The radius that defines the width of the pointer at the base.
    • fillPaint

      private transient Paint fillPaint
      The fill paint.
    • outlinePaint

      private transient Paint outlinePaint
      The outline paint.
  • Constructor Details

    • Pointer

      public Pointer()
      Creates a new instance.
    • Pointer

      public Pointer(int datasetIndex)
      Creates a new instance.
      Parameters:
      datasetIndex - the dataset index.
  • Method Details

    • getWidthRadius

      public double getWidthRadius()
      Returns the width radius.
      Returns:
      The width radius.
      See Also:
    • setWidthRadius

      public void setWidthRadius(double radius)
      Sets the width radius and sends a DialLayerChangeEvent to all registered listeners.
      Parameters:
      radius - the radius
      See Also:
    • getFillPaint

      public Paint getFillPaint()
      Returns the fill paint.
      Returns:
      The paint (never null).
      See Also:
    • setFillPaint

      public void setFillPaint(Paint paint)
      Sets the fill paint and sends a DialLayerChangeEvent to all registered listeners.
      Parameters:
      paint - the paint (null not permitted).
      See Also:
    • getOutlinePaint

      public Paint getOutlinePaint()
      Returns the outline paint.
      Returns:
      The paint (never null).
      See Also:
    • setOutlinePaint

      public void setOutlinePaint(Paint paint)
      Sets the outline paint and sends a DialLayerChangeEvent to all registered listeners.
      Parameters:
      paint - the paint (null not permitted).
      See Also:
    • draw

      public void draw(Graphics2D g2, DialPlot plot, Rectangle2D frame, Rectangle2D view)
      Draws the pointer.
      Parameters:
      g2 - the graphics target.
      plot - the plot.
      frame - the dial's reference frame.
      view - the dial's view.
    • equals

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

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

      private void writeObject(ObjectOutputStream stream) throws IOException
      Provides serialization support.
      Parameters:
      stream - the output stream.
      Throws:
      IOException - if there is an I/O error.
    • readObject

      private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException
      Provides serialization support.
      Parameters:
      stream - the input stream.
      Throws:
      IOException - if there is an I/O error.
      ClassNotFoundException - if there is a classpath problem.