java.lang.Object
io.sf.carte.echosvg.css.engine.StyleDeclaration
- All Implemented Interfaces:
- Serializable
This class represents a collection of CSS property values.
- See Also:
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected intThe number of values in the declaration.protected int[]The value indexes.protected static final intprotected boolean[]The value priorities.protected Value[]The values.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAppends a value to the declaration.Get the map of custom properties.intgetIndex(int idx) Returns the property index of a value.booleangetPriority(int idx) Tells whether a value is important.getValue(int idx) Returns the value at the given index.voidSets a value within the declaration.voidremove(int idx) Removes the value at the given index.voidsetCustomProperty(String name, LexicalUnit value, boolean important) Set a custom property value in the declaration.intsize()Returns the number of values in the declaration.Returns a printable representation of this style rule.
- 
Field Details- 
INITIAL_LENGTHprotected static final int INITIAL_LENGTH- See Also:
 
- 
valuesThe values.
- 
indexesprotected int[] indexesThe value indexes.
- 
prioritiesprotected boolean[] prioritiesThe value priorities.
- 
countprotected int countThe number of values in the declaration.
 
- 
- 
Constructor Details- 
StyleDeclarationpublic StyleDeclaration()
 
- 
- 
Method Details- 
sizepublic int size()Returns the number of values in the declaration.
- 
getValueReturns the value at the given index.
- 
getIndexpublic int getIndex(int idx) Returns the property index of a value.
- 
getPrioritypublic boolean getPriority(int idx) Tells whether a value is important.
- 
removepublic void remove(int idx) Removes the value at the given index.
- 
putSets a value within the declaration.
- 
appendAppends a value to the declaration.
- 
setCustomPropertySet a custom property value in the declaration.- Parameters:
- name- the custom property name.
- value- the custom property value.
- important- the priority.
 
- 
getCustomPropertiesGet the map of custom properties.- Returns:
- the custom property map, or nullif there are no custom properties.
 
- 
toStringReturns a printable representation of this style rule.
 
-