|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.batik.css.CSSOMStyleDeclaration
This class implements the CSSStyleDeclaration
interface.
Inner Class Summary | |
protected class |
CSSOMStyleDeclaration.StyleDeclarationHandler
To handle the parsing of a style declaration |
protected static class |
CSSOMStyleDeclaration.ValueEntry
To store the CSSValue of a property. |
Field Summary | |
protected CSSStyleDeclarationChangeSupport |
declarationChangeSupport
The style declaration change event support. |
protected static ValueFactoryMap |
EMPTY_MAP
The default value factory map. |
protected ValueFactoryMap |
factories
The value factories. |
protected DocumentHandler |
handler
The document handler. |
protected PropertyMap |
oldProperties
The old properties. |
protected CSSRule |
parentRule
The parent rule |
protected ExtendedParser |
parser
The CSS parser. |
protected PropertyMap |
properties
The properties. |
Constructor Summary | |
CSSOMStyleDeclaration()
Creates a new CSSStyleDeclaration object. |
|
CSSOMStyleDeclaration(CSSRule r,
Parser p)
Creates a new CSSStyleDeclaration object. |
Method Summary | |
void |
addCSSStyleDeclarationChangeListener(CSSStyleDeclarationChangeListener listener)
Adds a CSSStyleDeclarationChangeListener to the listener list. |
void |
cssValueChange(java.lang.String prop,
CSSValue oldV,
CSSValue newV)
Notifies this style declaration that a CSSValue as changed. |
void |
fireCSSStyleDeclarationChangeCancel()
Reports the cancellation of a CSSStyleDeclaration update to any registered listeners. |
void |
fireCSSStyleDeclarationChangeEnd()
Reports the end of a CSSStyleDeclaration update to any registered listeners. |
void |
fireCSSStyleDeclarationChangeStart()
Reports the start of a CSSStyleDeclaration update to any registered listeners. |
java.lang.String |
getCssText()
DOM: Implements CSSStyleDeclaration.getCssText() . |
int |
getLength()
DOM: Implements CSSStyleDeclaration.getLength() . |
CSSRule |
getParentRule()
DOM: Implements CSSStyleDeclaration.getParentRule() . |
CSSValue |
getPropertyCSSValue(java.lang.String propertyName)
DOM: Implements CSSStyleDeclaration.getPropertyCSSValue(String) . |
java.lang.String |
getPropertyPriority(java.lang.String propertyName)
DOM: Implements CSSStyleDeclaration.getPropertyPriority(String) . |
java.lang.String |
getPropertyValue(java.lang.String propertyName)
DOM: Implements CSSStyleDeclaration.getPropertyValue(String) . |
ValueFactoryMap |
getValueFactoryMap()
Returns the value factory map. |
java.lang.String |
item(int index)
DOM: Implements CSSStyleDeclaration.item(int) . |
void |
removeCSSStyleDeclarationChangeListener(CSSStyleDeclarationChangeListener listener)
Removes a CSSStyleDeclarationChangeListener from the listener list. |
java.lang.String |
removeProperty(java.lang.String propertyName)
DOM: Implements CSSStyleDeclaration.removeProperty(String) . |
void |
setCssText(java.lang.String cssText)
DOM: Implements CSSStyleDeclaration.setCssText(String) . |
void |
setProperty(java.lang.String propertyName,
java.lang.String value,
java.lang.String prio)
DOM: Implements CSSStyleDeclaration.setProperty(String,String,String) . |
void |
setPropertyCSSValue(java.lang.String propertyName,
CSSValue v,
java.lang.String imp)
Sets a property value. |
void |
setValueFactoryMap(ValueFactoryMap map)
Sets the value factory map. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final ValueFactoryMap EMPTY_MAP
protected ExtendedParser parser
protected PropertyMap properties
protected PropertyMap oldProperties
protected DocumentHandler handler
protected ValueFactoryMap factories
protected CSSRule parentRule
protected CSSStyleDeclarationChangeSupport declarationChangeSupport
Constructor Detail |
public CSSOMStyleDeclaration()
public CSSOMStyleDeclaration(CSSRule r, Parser p)
Method Detail |
public void setValueFactoryMap(ValueFactoryMap map)
public ValueFactoryMap getValueFactoryMap()
public void cssValueChange(java.lang.String prop, CSSValue oldV, CSSValue newV)
cssValueChange
in interface CSSValueChangeListener
org.apache.batik.css.event.CSSValueChangeListener
property
- The name of the CSS property the value represents.before
- The value before it changes.after
- The value after it changes.public void addCSSStyleDeclarationChangeListener(CSSStyleDeclarationChangeListener listener)
listener
- The CSSStyleDeclarationChangeListener to be addedpublic void removeCSSStyleDeclarationChangeListener(CSSStyleDeclarationChangeListener listener)
listener
- The CSSStyleDeclarationChangeListener to be removedpublic void fireCSSStyleDeclarationChangeStart()
public void fireCSSStyleDeclarationChangeCancel()
public void fireCSSStyleDeclarationChangeEnd()
public java.lang.String getCssText()
CSSStyleDeclaration.getCssText()
.getCssText
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
DOMException
- SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public void setCssText(java.lang.String cssText) throws DOMException
CSSStyleDeclaration.setCssText(String)
.setCssText
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
DOMException
- SYNTAX_ERR: Raised if the specified CSS string value has a syntax
error and is unparsable.
public java.lang.String getPropertyValue(java.lang.String propertyName)
CSSStyleDeclaration.getPropertyValue(String)
.getPropertyValue
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
propertyName
- The name of the CSS property. See the CSS
property index.public CSSValue getPropertyCSSValue(java.lang.String propertyName)
CSSStyleDeclaration.getPropertyCSSValue(String)
.getPropertyCSSValue
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
propertyName
- The name of the CSS property. See the CSS
property index.null
if the
property has not been set.public void setPropertyCSSValue(java.lang.String propertyName, CSSValue v, java.lang.String imp)
public java.lang.String removeProperty(java.lang.String propertyName) throws DOMException
CSSStyleDeclaration.removeProperty(String)
.removeProperty
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
propertyName
- The name of the CSS property. See the CSS
property index.DOMException
- NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly
or the property is readonly.public java.lang.String getPropertyPriority(java.lang.String propertyName)
CSSStyleDeclaration.getPropertyPriority(String)
.getPropertyPriority
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
propertyName
- The name of the CSS property. See the CSS
property index."important"
) if one exists. The empty string if none
exists.public void setProperty(java.lang.String propertyName, java.lang.String value, java.lang.String prio) throws DOMException
CSSStyleDeclaration.setProperty(String,String,String)
.setProperty
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
propertyName
- The name of the CSS property. See the CSS
property index.value
- The new value of the property.priority
- The new priority of the property (e.g.
"important"
).DOMException
- SYNTAX_ERR: Raised if the specified value has a syntax error and is
unparsable.
public int getLength()
CSSStyleDeclaration.getLength()
.getLength
in interface CSSStyleDeclaration
public java.lang.String item(int index)
CSSStyleDeclaration.item(int)
.item
in interface CSSStyleDeclaration
org.w3c.dom.css.CSSStyleDeclaration
index
- Index of the property name to retrieve.public CSSRule getParentRule()
CSSStyleDeclaration.getParentRule()
.getParentRule
in interface CSSStyleDeclaration
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |