Class TitleText

All Implemented Interfaces:
Drawable

public class TitleText extends DrawableTextLine
A text line that is offset relative to a drawing panel's display area.
Version:
1.0
Author:
Wolfgang Christian
  • Field Details

  • Constructor Details

    • TitleText

      public TitleText(String text)
      TitleText draws a TextLine relative to a drawing panel's edge.
      Parameters:
      text - String
  • Method Details

    • setOffsets

      public void setOffsets(int xoff, int yoff)
      Sets the x and y offsets.
      Parameters:
      xoff - double
      yoff - double
    • setLocation

      public void setLocation(int location)
      Sets the location of the text relative to a display area edge
      Parameters:
      location - int
    • setFont

      public void setFont(Font font)
      Sets the font used to display the text.
      Overrides:
      setFont in class TextLine
      Parameters:
      font - Font
    • setText

      public void setText(String text)
      Sets the text to be displayed.
      Overrides:
      setText in class TextLine
      Parameters:
      text - String
    • draw

      public void draw(DrawingPanel panel, Graphics g)
      Draws the TextLine offset from the location.
      Specified by:
      draw in interface Drawable
      Overrides:
      draw in class DrawableTextLine
      Parameters:
      panel - DrawingPanel
      g - Graphics