Class ThemeResolver

java.lang.Object
org.springframework.shell.style.ThemeResolver

public class ThemeResolver extends Object
Service which helps to do various things with styles.
  • Constructor Details

  • Method Details

    • resolveValues

      public ThemeResolver.ResolvedValues resolveValues(org.jline.utils.AttributedStyle attributedStyle)
      Resolve style, foreground color and background color from an AttributedStyle.
      Parameters:
      attributedStyle - the attibuted style
      Returns:
      resolved values
    • themeNames

      public Set<String> themeNames()
      Return all known theme names.
      Returns:
      all theme names
    • evaluateExpression

      public org.jline.utils.AttributedString evaluateExpression(String expression)
      Evaluate expression.
      Parameters:
      expression - the expression
      Returns:
      evaluated attributed string
    • resolveStyleTag

      public String resolveStyleTag(String tag)
      Resolve style from a tag with activated theme.
      Parameters:
      tag - the tag
      Returns:
      a style
    • resolveStyleTag

      public String resolveStyleTag(String tag, String themeName)
      Resolve style from a tag with given theme.
      Parameters:
      tag - the tag
      themeName - the theme name
      Returns:
      a style
    • resolveFigureTag

      public String resolveFigureTag(String tag)
      Resolve figure from a tag with activated theme.
      Parameters:
      tag - the tag
      Returns:
      a style
    • resolveSpinnerTag

      public Spinner resolveSpinnerTag(String tag)
      Resolve spinner from a tag with activated theme.
      Parameters:
      tag - the tag
      Returns:
      a spinner
    • resolveStyle

      public org.jline.utils.AttributedStyle resolveStyle(String spec)
      Resolve AttributedStyle from a spec.
      Parameters:
      spec - the spec
      Returns:
      resolved attributed style