TAttributeHolder - type of the AttributeHolder of this style.TAttributeType - type of the AttributeWrapper of this style.public abstract class CssStyle<TAttributeType extends AttributeWrapper,TAttributeHolder extends AttributeHolder<TAttributeType>> extends Object
| Constructor and Description |
|---|
CssStyle(String name,
TAttributeHolder attributeHolder)
Creates a new instance.
|
CssStyle(TAttributeHolder attributeHolder)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
combineWithStyle(CssStyle<TAttributeType,TAttributeHolder> style)
Combines this
CssStyle with the given CssStyle, new AttributeWrappers not present in this style will be added. |
boolean |
equals(Object obj)
Determines if the given object areEqualOrNull the provided object.
|
TAttributeHolder |
getAttributeHolder()
Return the
attributeHolder. |
String |
getName() |
Map<String,TAttributeType> |
getProperties()
Returns the
attributeHolders AttributeHolder.getAttributes(). |
int |
hashCode()
Gets the HashCode this object, which is based on the
name. |
void |
parseCssText(String cssText)
Consumes the given css text and set the style. the css text must follow the default rules of a css style.
|
public CssStyle(TAttributeHolder attributeHolder)
attributeHolder - the element that will contain the attributes of this style.public CssStyle(String name, TAttributeHolder attributeHolder)
name - the name to of this style.attributeHolder - the element that will contain the attributes of this style.public final TAttributeHolder getAttributeHolder()
attributeHolder.attributeHolder.public final Map<String,TAttributeType> getProperties()
attributeHolders AttributeHolder.getAttributes().attributeHolders AttributeHolder.getAttributes().public final void combineWithStyle(CssStyle<TAttributeType,TAttributeHolder> style)
CssStyle with the given CssStyle, new AttributeWrappers not present in this style will be added.style - the CssStyle which is be used, must not be null.IllegalArgumentException - if the given CssStyle is null.public final void parseCssText(String cssText)
cssText - the text that is to be consumed, must not be null or empty.IllegalStateException - if the css text is not formatted correctly.public int hashCode()
name.Copyright © 2017 Saxonia Systems AG. All rights reserved.