Interface Screen.Writer

Enclosing interface:
Screen

public static interface Screen.Writer
Interface to write into a Screen. Contains convenient methods user is most likely to need to operate on a Screen.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    background(Rectangle rect, int color)
    Fill background with a given color.
    void
    border(int x, int y, int width, int height)
    Write a border with a given rectangle coordinates.
    void
    text(String text, int x, int y)
    Write a text horizontally starting from a position defined by x and y within a bounds of a Screen.
    void
    text(String text, Rectangle rect, HorizontalAlign hAlign, VerticalAlign vAlign)
    Write aligned text within a bounds.
  • Method Details

    • text

      void text(String text, int x, int y)
      Write a text horizontally starting from a position defined by x and y within a bounds of a Screen.
      Parameters:
      text - the text to write
      x - the x position
      y - the y position
    • border

      void border(int x, int y, int width, int height)
      Write a border with a given rectangle coordinates.
      Parameters:
      x - the x position
      y - the y position
      width - the rectangle width
      height - the rectangle height
    • background

      void background(Rectangle rect, int color)
      Fill background with a given color.
      Parameters:
      rect - the rectange to fill
      color - the color to use
    • text

      void text(String text, Rectangle rect, @Nullable HorizontalAlign hAlign, @Nullable VerticalAlign vAlign)
      Write aligned text within a bounds.
      Parameters:
      text - the text to write
      rect - the rectangle bounds
      hAlign - the horizontal aligment
      vAlign - the vertical aligment