public class DerivedMutableStyle extends MutableStyle
MutableStyle which will retrieve properties from a
"parent" style when they are not set locally.MutableStyle.IndexedPropertyValue| Constructor and Description |
|---|
DerivedMutableStyle()
Default constructor.
|
DerivedMutableStyle(Style parentStyle)
Creates a new
DerivedMutableStyle. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
get(java.lang.String propertyName)
Retrieves the value of the specified property.
|
java.lang.Object |
getIndex(java.lang.String propertyName,
int propertyIndex)
Retrieves the value of the specified indexed property.
|
Style |
getParentStyle()
Returns the parent style.
|
java.util.Iterator |
getPropertyNames()
Retrieves the names of all set properties.
|
boolean |
isIndexedPropertySet(java.lang.String propertyName,
int propertyIndex)
Determines if a particular index of an indexed property is set.
|
boolean |
isPropertySet(java.lang.String propertyName)
Determines if a particular property is set.
|
void |
setParentStyle(Style parentStyle)
Sets the parent style, from which properties will be retrieved if they
are not found in this style.
|
addStyleContent, getIndexedProperty, getProperty, getPropertyIndices, removeIndexedProperty, removeProperty, set, setIndex, setIndexedProperty, setProperty, size, toStringpublic DerivedMutableStyle()
public DerivedMutableStyle(Style parentStyle)
DerivedMutableStyle.parentStyle - the style from which to retrieve properties
when they are not set within this stylepublic Style getParentStyle()
public java.lang.Object getIndex(java.lang.String propertyName,
int propertyIndex)
StylegetIndex in interface StylegetIndex in class MutableStyleStyle.getIndex(java.lang.String, int)public java.lang.Object get(java.lang.String propertyName)
Styleget in interface Styleget in class MutableStyleStyle.get(java.lang.String)public java.util.Iterator getPropertyNames()
StylegetPropertyNames in interface StylegetPropertyNames in class MutableStyleIterator that returns the names of all set
propertiesStyle.getPropertyNames()public boolean isIndexedPropertySet(java.lang.String propertyName,
int propertyIndex)
StyleisIndexedPropertySet in interface StyleisIndexedPropertySet in class MutableStylepropertyName - the property namepropertyIndex - the indexStyle.isIndexedPropertySet(java.lang.String, int)public boolean isPropertySet(java.lang.String propertyName)
StyleisPropertySet in interface StyleisPropertySet in class MutableStylepropertyName - the property nameStyle.isPropertySet(java.lang.String)public void setParentStyle(Style parentStyle)
parentStyle - the parent style