Class TextStyle

java.lang.Object
com.motivewave.platform.sdk.common.TextStyle
All Implemented Interfaces:
Cloneable

public class TextStyle extends Object implements Cloneable
  • Constructor Details

    • TextStyle

      public TextStyle(Font font)
    • TextStyle

      public TextStyle(Font font, Color color)
    • TextStyle

      public TextStyle(Font font, Color color, Color bgColor)
    • TextStyle

      public TextStyle(float fs)
    • TextStyle

      public TextStyle(float fs, Color color)
    • TextStyle

      public TextStyle(float fs, Color color, Color bgColor)
  • Method Details

    • strWidth

      public double strWidth(String text)
    • getFont

      public Font getFont()
    • getFontFX

      public javafx.scene.text.Font getFontFX()
    • getColor

      public Color getColor()
    • getColor

      public Color getColor(Defaults def)
    • getBgColor

      public Color getBgColor()
    • isBold

      public boolean isBold()
    • isItalic

      public boolean isItalic()
    • isUnderline

      public boolean isUnderline()
    • withColor

      public TextStyle withColor(Color c)
    • withBgColor

      public TextStyle withBgColor(Color c)
    • withFont

      public TextStyle withFont(Font f)
    • withStyle

      public TextStyle withStyle(int style)
    • withBold

      public TextStyle withBold(boolean bold)
    • withItalic

      public TextStyle withItalic(boolean italic)
    • withUnderline

      public TextStyle withUnderline(boolean b)
    • withSize

      public TextStyle withSize(float size)
    • getFontMetrics

      public FontMetrics getFontMetrics()
    • getHeight

      public int getHeight()
    • equals

      public boolean equals(Object o)
      Compares the give object with this object and returns true if they are equal.
      Overrides:
      equals in class Object
      Returns:
      true if the given object equals this TextStyle
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • clone

      public TextStyle clone()
      Creates a clone (copy) of this object.
      Overrides:
      clone in class Object
      Returns:
      clone of this object
    • toJson

      public Object toJson()
    • fromJson

      public static TextStyle fromJson(Object json)
    • readStyle

      public static TextStyle readStyle(String str)
    • writeStyle

      public static String writeStyle(TextStyle ts)