APIdia Launch Partner
Top Description Fields Methods
org.w3c.dom.css

public Interface CSSValue

Known Direct Subinterfaces
org.w3c.dom.css.CSSValueList, org.w3c.dom.css.CSSPrimitiveValue
Imports
org.w3c.dom.DOMException

The CSSValue interface represents a simple or a complex value. A CSSValue object only occurs in a context of a CSS property.

See also the Document Object Model (DOM) Level 2 Style Specification.

Since
1.4, DOM Level 2

Field Summary

Modifier and TypeField and Description
public static final short
CSS_CUSTOM

The value is a custom value.

public static final short
CSS_INHERIT

The value is inherited and the cssText contains "inherit".

public static final short
CSS_PRIMITIVE_VALUE

The value is a primitive value and an instance of the CSSPrimitiveValue interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.

public static final short
CSS_VALUE_LIST

The value is a CSSValue list and an instance of the CSSValueList interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.

Method Summary

Modifier and TypeMethod and Description
public String
getCssText()

A string representation of the current value.

public short
getCssValueType()

A code defining the type of the value as defined above.

public void
setCssText(String cssText)

A string representation of the current value.

Field Detail

CSS_CUSTOMback to summary
public static final short CSS_CUSTOM

The value is a custom value.

CSS_INHERITback to summary
public static final short CSS_INHERIT

The value is inherited and the cssText contains "inherit".

CSS_PRIMITIVE_VALUEback to summary
public static final short CSS_PRIMITIVE_VALUE

The value is a primitive value and an instance of the CSSPrimitiveValue interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.

CSS_VALUE_LISTback to summary
public static final short CSS_VALUE_LIST

The value is a CSSValue list and an instance of the CSSValueList interface can be obtained by using binding-specific casting methods on this instance of the CSSValue interface.

Method Detail

getCssTextback to summary
public String getCssText()

A string representation of the current value.

getCssValueTypeback to summary
public short getCssValueType()

A code defining the type of the value as defined above.

setCssTextback to summary
public void setCssText(String cssText) throws DOMException

A string representation of the current value.

Exceptions
DOMException:
SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly.