public class FSCssValue extends Object implements org.w3c.dom.css.CSSPrimitiveValue
CSSPrimitiveValue. The main
feature of this class is that on construction, values will be "normalized",
so that color idents (such as 'black') are converted to valid java.awt.Color
strings, and other idents are resolved as possible.CSS_ATTR, CSS_CM, CSS_COUNTER, CSS_DEG, CSS_DIMENSION, CSS_EMS, CSS_EXS, CSS_GRAD, CSS_HZ, CSS_IDENT, CSS_IN, CSS_KHZ, CSS_MM, CSS_MS, CSS_NUMBER, CSS_PC, CSS_PERCENTAGE, CSS_PT, CSS_PX, CSS_RAD, CSS_RECT, CSS_RGBCOLOR, CSS_S, CSS_STRING, CSS_UNKNOWN, CSS_URICSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST| 构造器和说明 |
|---|
FSCssValue(org.w3c.dom.css.CSSPrimitiveValue primitive)
Constructor for the FSCssValue object
|
FSCssValue(org.w3c.dom.css.CSSPrimitiveValue primitive,
String newValue)
Use a given CSSPrimitiveValue, with an overriding internal text value
|
| 限定符和类型 | 方法和说明 |
|---|---|
org.w3c.dom.css.Counter |
getCounterValue()
Not supported.
|
String |
getCssText()
A string representation of the current value.
|
short |
getCssValueType()
A code defining the type of the value as defined above.
|
float |
getFloatValue(short unitType)
This method is used to get a float value in a specified unit.
|
static FSCssValue |
getNewIdentValue(String identValue) |
short |
getPrimitiveType()
The type of the value as defined by the constants specified above.
|
org.w3c.dom.css.Rect |
getRectValue()
Not supported.
|
org.w3c.dom.css.RGBColor |
getRGBColorValue()
Not supported.
|
String |
getStringValue()
This method is used to get the string value.
|
void |
setCssText(String cssText)
Not supported, class is immutable.
|
void |
setFloatValue(short unitType,
float floatValue)
Not supported, class is immutable.
|
void |
setStringValue(short stringType,
String stringValue)
Not supported, class is immutable.
|
String |
toString()
Returns the string representation of the instance, in this case, the CSS
text value.
|
public FSCssValue(org.w3c.dom.css.CSSPrimitiveValue primitive)
primitive - PARAMpublic FSCssValue(org.w3c.dom.css.CSSPrimitiveValue primitive, String newValue)
primitive - PARAMnewValue - PARAMpublic static FSCssValue getNewIdentValue(String identValue)
public String toString()
public void setCssText(String cssText)
setCssText 在接口中 org.w3c.dom.css.CSSValuecssText - The new cssText valuepublic void setFloatValue(short unitType,
float floatValue)
setFloatValue 在接口中 org.w3c.dom.css.CSSPrimitiveValueunitType - The new floatValue valuefloatValue - The new floatValue valuepublic void setStringValue(short stringType,
String stringValue)
setStringValue 在接口中 org.w3c.dom.css.CSSPrimitiveValuestringType - The new stringValue valuestringValue - The new stringValue valuepublic String getCssText()
getCssText 在接口中 org.w3c.dom.css.CSSValuepublic short getCssValueType()
getCssValueType 在接口中 org.w3c.dom.css.CSSValuepublic org.w3c.dom.css.Counter getCounterValue()
getCounterValue 在接口中 org.w3c.dom.css.CSSPrimitiveValuepublic float getFloatValue(short unitType)
getFloatValue 在接口中 org.w3c.dom.css.CSSPrimitiveValueunitType - PARAMpublic short getPrimitiveType()
getPrimitiveType 在接口中 org.w3c.dom.css.CSSPrimitiveValuepublic org.w3c.dom.css.Rect getRectValue()
getRectValue 在接口中 org.w3c.dom.css.CSSPrimitiveValuepublic org.w3c.dom.css.RGBColor getRGBColorValue()
getRGBColorValue 在接口中 org.w3c.dom.css.CSSPrimitiveValuepublic String getStringValue()
getStringValue 在接口中 org.w3c.dom.css.CSSPrimitiveValueCopyright © 2019. All Rights Reserved.