org.kde.koala
public class CSSPrimitiveValue extends CSSValue
CSSPrimitiveValue
interface represents a single
CSS
value . This interface may be used to determine the value of a
specific style property currently set in a block or to set a
specific style properties explicitly within the block. An instance
of this interface can be obtained from the
getPropertyCSSValue
method of the
CSSStyleDeclaration
interface.UNKNOWN: The Returns: The Counter value. UNKNOWN: This method is used to get the Counter value. Parameters: unitType A unit code to get the float value. The unit
code can only be a float unit type (e.g. Returns: The float value in the specified unit. UNKNOWN: This method is used to get a float value in a specified unit. Returns: The Rect value. UNKNOWN: This method is used to get the Rect value. Returns: the RGB color value. UNKNOWN: This method is used to get the RGB color. Returns: The string value in the current unit. The current
UNKNOWN: This method is used to get the string value in a specified unit. UNKNOWN: The type of the value as defined by the constants specified above. Parameters: unitType A unit code as defined above. The unit code can
only be a float unit type (e.g. UNKNOWN: A method to set the float value with a specified unit. Parameters: stringType A string code as defined above. The string
code can only be a string unit type (e.g. UNKNOWN: A method to set the string value with a specified unit. CSSPrimitiveValue
interface represents a single
Constructor Summary protected CSSPrimitiveValue(Class dummy) CSSPrimitiveValue() CSSPrimitiveValue(CSSPrimitiveValue other) CSSPrimitiveValue(CSSValue other)
Method Summary Counter getCounterValue() float getFloatValue(short unitType) Rect getRectValue() RGBColor getRGBColorValue() String getStringValue() short primitiveType() void setFloatValue(short unitType, float floatValue) void setStringValue(short stringType, String stringValue) Constructor Detail
CSSPrimitiveValue
CSSPrimitiveValue
CSSPrimitiveValue
CSSPrimitiveValue
Method Detail
getCounterValue
DOMException
is raised. Modification to the corresponding style property can
be achieved using the Counter
interface.getFloatValue
DOMException
is raised.CSS_NUMBER
, CSS_PERCENTAGE
, CSS_EMS
, CSS_EXS
, CSS_PX
,
CSS_PX
, CSS_CM
, CSS_MM
, CSS_IN
, CSS_PT
,
CSS_PC
, CSS_DEG
, CSS_RAD
, CSS_GRAD
, CSS_MS
,
CSS_S
, CSS_HZ
, CSS_KHZ
, CSS_DIMENSION
). getRectValue
DOMException
is
raised. Modification to the corresponding style property can be
achieved using the Rect
interface.getRGBColorValue
DOMException
is raised. Modification to the corresponding style
property can be achieved using the RGBColor
interface.getStringValue
DOMException
is raised.valueType
can only be a string unit type (e.g.
CSS_URI
, CSS_IDENT
and
CSS_ATTR
). primitiveType
setFloatValue
DOMException
will be raised.NUMBER
,
PERCENTAGE
, CSS_EMS
, CSS_EXS
, CSS_PX
, CSS_PX
,
CSS_CM
, CSS_MM
, CSS_IN
, CSS_PT
, CSS_PC
,
CSS_DEG
, CSS_RAD
,
CSS_GRAD
, CSS_MS
, CSS_S
, CSS_HZ
, CSS_KHZ
,
CSS_DIMENSION
). floatValue The new float value.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly. setStringValue
DOMException
will be raised.CSS_URI
, CSS_IDENT
, CSS_INHERIT
and CSS_ATTR
). stringValue The new string value. If the
stringType
is equal to CSS_INHERIT
, the
stringValue
should be inherit
.
NO_MODIFICATION_ALLOWED_ERR: Raised if this property is
readonly.