Class Bitmap

    • Constructor Summary

      Constructors 
      Constructor Description
      Bitmap​(int x, int y, int z, java.awt.image.BufferedImage image)
      Public constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object rhs)
      Comparison check.
      java.awt.image.BufferedImage getImage​(int textWidth, int textHeight)
      Get this item rendered to a bitmap, offset to align on a grid of cells with pixel dimensions (textWidth, textHeight).
      int hashCode()
      Hashcode uses all fields in equals().
      void setImage​(java.awt.image.BufferedImage image)
      Set the image.
      java.lang.String toString()
      Make human-readable description of this item.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Bitmap

        public Bitmap​(int x,
                      int y,
                      int z,
                      java.awt.image.BufferedImage image)
        Public constructor.
        Parameters:
        x - X pixel coordinate
        y - Y pixel coordinate
        z - Z coordinate
        image - the image
    • Method Detail

      • equals

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

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

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

        public java.awt.image.BufferedImage getImage​(int textWidth,
                                                     int textHeight)
        Get this item rendered to a bitmap, offset to align on a grid of cells with pixel dimensions (textWidth, textHeight).
        Overrides:
        getImage in class TackboardItem
        Parameters:
        textWidth - the width of a text cell
        textHeight - the height of a text cell
        Returns:
        the image, or null if this item does not have any pixels to show
      • setImage

        public void setImage​(java.awt.image.BufferedImage image)
        Set the image.
        Parameters:
        image - the new image