Class StyleDeclarations
java.lang.Object
java.util.AbstractMap<K,V>
 
java.util.EnumMap<StyleAttribute,String>
 
com.inductiveautomation.perspective.common.config.styles.StyleDeclarations
- All Implemented Interfaces:
- Serializable,- Cloneable,- Map<StyleAttribute,- String> 
A "style declaration" is a map of style attribute to value. Basically, the contents of a block of CSS attributes.
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class java.util.AbstractMapAbstractMap.SimpleEntry<K extends Object,V extends Object>, AbstractMap.SimpleImmutableEntry<K extends Object, V extends Object> 
- 
Constructor SummaryConstructorsConstructorDescriptionStyleDeclarations(com.inductiveautomation.ignition.common.gson.JsonObject obj, KeyStyle mode) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidappendAttributes(StringBuilder cssBuilder, int indentLevel) Append the CSS style block represented by this object to the given appender.com.inductiveautomation.ignition.common.gson.JsonObjectasJsonObject(KeyStyle mode) com.inductiveautomation.ignition.common.gson.JsonObjectasJsonObject(KeyStyle mode, boolean inline) Returns mapping as a json object.Methods inherited from class java.util.EnumMapclear, clone, containsKey, containsValue, entrySet, equals, get, hashCode, keySet, put, putAll, remove, size, valuesMethods inherited from class java.util.AbstractMapisEmpty, toStringMethods inherited from class java.lang.Objectfinalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Mapcompute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
- 
Constructor Details- 
StyleDeclarationspublic StyleDeclarations()
- 
StyleDeclarations
- 
StyleDeclarationspublic StyleDeclarations(com.inductiveautomation.ignition.common.gson.JsonObject obj, KeyStyle mode) 
 
- 
- 
Method Details- 
appendAttributesAppend the CSS style block represented by this object to the given appender. Does not include braces, just includes multiple lines ofindent key: value\n
- 
asJsonObject
- 
asJsonObjectpublic com.inductiveautomation.ignition.common.gson.JsonObject asJsonObject(KeyStyle mode, boolean inline) Returns mapping as a json object. Allows the option to coerce certain attribute values to numbers This allows React to properly append 'px' to inline styles for attributes that use length values- Parameters:
- mode- - style of key (CSS or React)
- inline- - if inline coerce the string to a number so React can append 'px' otherwise do it ourselves
- Returns:
- JSON object
 
 
-