|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.kde.koala.CSSValue
org.kde.koala.CSSPrimitiveValue
public class CSSPrimitiveValue
The 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.
Constructor Summary | |
---|---|
|
CSSPrimitiveValue()
|
protected |
CSSPrimitiveValue(java.lang.Class dummy)
|
|
CSSPrimitiveValue(CSSPrimitiveValue other)
|
|
CSSPrimitiveValue(CSSValue other)
|
Method Summary | |
---|---|
Counter |
getCounterValue()
This method is used to get the Counter value. |
float |
getFloatValue(short unitType)
This method is used to get a float value in a specified unit. |
Rect |
getRectValue()
This method is used to get the Rect value. |
RGBColor |
getRGBColorValue()
This method is used to get the RGB color. |
java.lang.String |
getStringValue()
This method is used to get the string value in a specified unit. |
short |
primitiveType()
The type of the value as defined by the constants specified above. |
void |
setFloatValue(short unitType,
float floatValue)
A method to set the float value with a specified unit. |
void |
setStringValue(short stringType,
java.lang.String stringValue)
A method to set the string value with a specified unit. |
Methods inherited from class org.kde.koala.CSSValue |
---|
cssText, cssValueType, isCSSPrimitiveValue, isCSSValueList, isNull, setCssText |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected CSSPrimitiveValue(java.lang.Class dummy)
public CSSPrimitiveValue()
public CSSPrimitiveValue(CSSPrimitiveValue other)
public CSSPrimitiveValue(CSSValue other)
Method Detail |
---|
public short primitiveType()
public void setFloatValue(short unitType, float floatValue)
DOMException
will be raised.
unitType
- A unit code as defined above. The unit code can
only be a float unit type (e.g. 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.public float getFloatValue(short unitType)
DOMException
is raised.
unitType
- A unit code to get the float value. The unit
code can only be a float unit type (e.g. 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
).
public void setStringValue(short stringType, java.lang.String stringValue)
DOMException
will be raised.
stringType
- A string code as defined above. The string
code can only be a string unit type (e.g. 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.public java.lang.String getStringValue()
DOMException
is raised.
valueType
can only be a string unit type (e.g.
CSS_URI
, CSS_IDENT
and
CSS_ATTR
).public Counter getCounterValue()
DOMException
is raised. Modification to the corresponding style property can
be achieved using the Counter
interface.
public Rect getRectValue()
DOMException
is
raised. Modification to the corresponding style property can be
achieved using the Rect
interface.
public RGBColor getRGBColorValue()
DOMException
is raised. Modification to the corresponding style
property can be achieved using the RGBColor
interface.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |