Class StyleVariantConfig
- java.lang.Object
- 
- com.inductiveautomation.perspective.common.config.styles.StyleVariantConfig
 
- 
 public class StyleVariantConfig extends java.lang.ObjectA style variant is one style or animated style, which might serve as the base style for a Style Class or as a media-query or pseudo-selector variant style.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classStyleVariantConfig.GsonAdapter
 - 
Field SummaryFields Modifier and Type Field Description AnimationConfiganimationThis is the style block + animation settings for animated styles.MediaQueryConfigmediaThis will be non-null if this style variant is a media-query varient.PseudoSelectorpseudoThis will be non-null if this style variant is a pseudo-selector variant.StyleDeclarationsstyleThis is the style block for this variant for non-animated styles.
 - 
Constructor SummaryConstructors Constructor Description StyleVariantConfig()StyleVariantConfig(StyleVariantConfig copy)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(java.lang.StringBuilder css, java.lang.String className, java.lang.Integer variantIndex)Compile this style to CSS format.booleanequals(java.lang.Object obj)booleanisAnimated()booleanisDefaultStyle()
 
- 
- 
- 
Field Detail- 
pseudopublic PseudoSelector pseudo This will be non-null if this style variant is a pseudo-selector variant.
 - 
mediapublic MediaQueryConfig media This will be non-null if this style variant is a media-query varient.
 - 
stylepublic StyleDeclarations style This is the style block for this variant for non-animated styles.
 - 
animationpublic AnimationConfig animation This is the style block + animation settings for animated styles.
 
- 
 - 
Constructor Detail- 
StyleVariantConfigpublic StyleVariantConfig() 
 - 
StyleVariantConfigpublic StyleVariantConfig(StyleVariantConfig copy) 
 
- 
 - 
Method Detail- 
isDefaultStylepublic boolean isDefaultStyle() 
 - 
isAnimatedpublic boolean isAnimated() 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
appendpublic void append(@Nonnull java.lang.StringBuilder css, @Nonnull java.lang.String className, @Nullable java.lang.Integer variantIndex)Compile this style to CSS format.For example, let's say we have the following style represented by its serialized JSON format: Resource "A": 
 The output of this method will compile this style to CSS. The CSS class name is equal to the style project resource name prepended with "psc-":{ "declarations": { "paddingTop": "10em", "borderColor": "red" } }.psc-A:in-range { border-color: red; }- Parameters:
- className- The name of the CSS class to generate
- variantIndex- The index of this variant in the parent style class, or null if this is the base variant
 
 
- 
 
-