Package rendering

Class TextArtist

java.lang.Object
rendering.Artist
rendering.TextArtist

public class TextArtist extends Artist
Rendering an object as a text of a specified color, size and font.
  • Constructor Details

  • Method Details

    • getText

      public String getText()
    • setText

      public void setText(String s)
    • getTextWidth

      public double getTextWidth()
    • setTextWidth

      public void setTextWidth(double textWidth)
    • getTextHeight

      public double getTextHeight()
    • setTextHeight

      public void setTextHeight(double textHeight)
    • draw

      public void draw(Graphics2D g)
      Draw the text.
      Specified by:
      draw in class Artist
      Parameters:
      g - The Swing graphics context.