Class TextOptions

java.lang.Object
rekit.primitives.TextOptions
All Implemented Interfaces:
Cloneable

public final class TextOptions extends Object implements Cloneable
This class combines several text options for formatting texts.
  • Constructor Details

    • TextOptions

      public TextOptions(Vec alignment, int height, RGBAColor color, String font, int fontOptions)
      Create a TextOption container.
      Parameters:
      alignment - the alignment (left anchor)
      height - the height
      color - the color
      font - the font
      fontOptions - the font-options
    • TextOptions

      public TextOptions(Vec alignment, int height, RGBAColor color, String font, int fontOptions, boolean usefilter)
      Create a TextOption container.
      Parameters:
      alignment - the alignment (left anchor)
      height - the height
      color - the color
      font - the font
      fontOptions - the font-options
      usefilter - indicates whether a filter shall used
  • Method Details

    • getAlignment

      public Vec getAlignment()
      Get the alignment.
      Returns:
      the alignment
    • setAlignmentLeft

      public TextOptions setAlignmentLeft(Vec alignment)
      Set alignment (anchor left).
      Parameters:
      alignment - the alignment
      Returns:
      the modified text-options (this)
    • getHeight

      public int getHeight()
      Get the height.
      Returns:
      the height
    • getColor

      public RGBAColor getColor()
      Get the color.
      Returns:
      the color
    • setColor

      public TextOptions setColor(RGBAColor color)
      Set the color.
      Parameters:
      color - the color
      Returns:
      the modified text-options (this)
    • setHeight

      public TextOptions setHeight(int height)
      Set the height.
      Parameters:
      height - the height
      Returns:
      the modified text-options (this)
    • getFont

      public String getFont()
      Get the font.
      Returns:
      the font
    • setFont

      public TextOptions setFont(String font)
      Set the font.
      Parameters:
      font - the font
      Returns:
      the modified text-options (this)
    • getFontOptions

      public int getFontOptions()
      Get the font-options.
      Returns:
      the font-options
    • setFontOptions

      public TextOptions setFontOptions(int fontOptions)
      Set the font-options.
      Parameters:
      fontOptions - the font-options
      Returns:
      the modified text-options (this)
    • getUseFilter

      public boolean getUseFilter()
      Get the usefilter-option.
      Returns:
      the usefilter-option
    • setUseFilter

      public TextOptions setUseFilter(boolean usefilter)
      Set the usefilter-option.
      Parameters:
      usefilter - the usefilter-option
      Returns:
      the modified text-options (this)
    • clone

      public TextOptions clone()
      Overrides:
      clone in class Object