Class MousePointer

  • All Implemented Interfaces:
    java.lang.Comparable<TackboardItem>, Pointer

    public class MousePointer
    extends Bitmap
    implements Pointer
    MousePointer is a Bitmap with a hotspot location to represent the "tip" of a mouse icon.
    • Constructor Detail

      • MousePointer

        public MousePointer​(int x,
                            int y,
                            int z,
                            java.awt.image.BufferedImage image,
                            int hotspotX,
                            int hotspotY)
        Public constructor.
        Parameters:
        x - X pixel coordinate
        y - Y pixel coordinate
        z - Z coordinate
        image - the image
        hotspotX - the hotspot X location relative to x
        hotspotY - the hotspot Y location relative to y
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object rhs)
        Comparison check. All fields must match to return true.
        Overrides:
        equals in class Bitmap
        Parameters:
        rhs - another MousePointer instance
        Returns:
        true if all fields are equal
      • hashCode

        public int hashCode()
        Hashcode uses all fields in equals().
        Overrides:
        hashCode in class Bitmap
        Returns:
        the hash
      • toString

        public java.lang.String toString()
        Make human-readable description of this item.
        Overrides:
        toString in class Bitmap
        Returns:
        displayable String
      • getHotspotX

        public int getHotspotX()
        Get the hotspot X location relative to the X location of the icon.
        Specified by:
        getHotspotX in interface Pointer
      • getHotspotY

        public int getHotspotY()
        Get the hotspot Y location relative to the Y location of the icon.
        Specified by:
        getHotspotY in interface Pointer