Class JavaStyleRewriter

java.lang.Object
com.vaadin.copilot.javarewriter.JavaStyleRewriter

public class JavaStyleRewriter extends Object
  • Constructor Details

    • JavaStyleRewriter

      public JavaStyleRewriter()
  • Method Details

    • getStyles

      public static List<JavaStyleRewriter.StyleInfo> getStyles(ComponentInfo componentInfo)
      Gets the (active) styles of a component.
      Parameters:
      componentInfo - the component to get the styles of
      Returns:
      the styles, as a list of style names and values
    • setStyle

      public static void setStyle(ComponentInfo componentInfo, String dashSeparatedProperty, String value)
      Sets the given inline style on the given component, replacing an existing style property if present.
      Parameters:
      componentInfo - the component to set the style on
      dashSeparatedProperty - the style property to set
      value - the style value to set or null to remove the style