Class StyleFactory


  • public class StyleFactory
    extends java.lang.Object
    Factory to create styled strings.
    Since:
    3.4
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      AttributedString evaluate​(java.lang.String expression)
      Evaluate a style expression.
      AttributedString evaluate​(java.lang.String format, java.lang.Object... params)
      Evaluate a style expression with format.
      AttributedString style​(java.lang.String style, java.lang.String value)
      Encode string with style applying value.
      AttributedString style​(java.lang.String style, java.lang.String format, java.lang.Object... params)
      Encode string with style formatted value.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • style

        public AttributedString style​(java.lang.String style,
                                      java.lang.String value)
        Encode string with style applying value.
        Parameters:
        style - the style
        value - the value
        Returns:
        the result string
      • style

        public AttributedString style​(java.lang.String style,
                                      java.lang.String format,
                                      java.lang.Object... params)
        Encode string with style formatted value.
        Parameters:
        style - the style
        format - the format
        params - the parameters
        Returns:
        the result string
        See Also:
        style(String, String)
      • evaluate

        public AttributedString evaluate​(java.lang.String expression)
        Evaluate a style expression.
        Parameters:
        expression - the expression to evaluate
        Returns:
        the result string
      • evaluate

        public AttributedString evaluate​(java.lang.String format,
                                         java.lang.Object... params)
        Evaluate a style expression with format.
        Parameters:
        format - the format
        params - the parameters
        Returns:
        the result string
        See Also:
        evaluate(String)