Class InfoDisplay

  • All Implemented Interfaces:
    RenderLifecycle

    public class InfoDisplay
    extends java.lang.Object
    implements RenderLifecycle
    Displays some information on the screen, such as the mouse position and color of the hovered pixel.
    
     // Create and attach a new InfoDisplay with default settings
     new InfoDisplay().attach();
     
    • Constructor Detail

      • InfoDisplay

        public InfoDisplay()
    • Method Detail

      • setFontSize

        public void setFontSize​(int fontSize)
        Set the font size of the displayed text
        Parameters:
        fontSize - The new font size
      • setFont

        public void setFont​(java.awt.Font font)
      • attach

        public void attach()
      • renderEnd

        public void renderEnd​(java.awt.Graphics g)
        Description copied from interface: RenderLifecycle
        Runs after everything else; the image in CanvasPanel will not reflect your changes.
        Specified by:
        renderEnd in interface RenderLifecycle
        Parameters:
        g - The graphics context