Class PointerNeedle

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

    public class PointerNeedle
    extends MeterNeedle
    implements java.lang.Cloneable, java.io.Serializable
    A needle in the shape of a pointer, for use with the CompassPlot class.
    See Also:
    Serialized Form
    • Field Detail

      • serialVersionUID

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

      • PointerNeedle

        public PointerNeedle()
    • Method Detail

      • drawNeedle

        protected void drawNeedle​(java.awt.Graphics2D g2,
                                  java.awt.geom.Rectangle2D plotArea,
                                  java.awt.geom.Point2D rotate,
                                  double angle)
        Draws the needle.
        Specified by:
        drawNeedle in class MeterNeedle
        Parameters:
        g2 - the graphics device.
        plotArea - the plot area.
        rotate - the rotation point.
        angle - the angle.
      • equals

        public boolean equals​(java.lang.Object obj)
        Tests another object for equality with this object.
        Overrides:
        equals in class MeterNeedle
        Parameters:
        obj - the object to test (null permitted).
        Returns:
        A boolean.
      • hashCode

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

        public java.lang.Object clone()
                               throws java.lang.CloneNotSupportedException
        Returns a clone of this needle.
        Overrides:
        clone in class java.lang.Object
        Returns:
        A clone.
        Throws:
        java.lang.CloneNotSupportedException - if the PointerNeedle cannot be cloned (in theory, this should not happen).