|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CSS2BackgroundPosition
interface represents the
background-position CSS Level 2 property.
For this extension of the CSSValue
interface, the
valueType
attribute of the underlying CSSValue
interface shall be CSS_CUSTOM
.
See also the Document Object Model (DOM) Level 2 Specification.
Fields inherited from interface org.w3c.dom.css.CSSValue |
CSS_CUSTOM, CSS_INHERIT, CSS_PRIMITIVE_VALUE, CSS_VALUE_LIST |
Method Summary | |
java.lang.String |
getHorizontalIdentifier()
If horizontalType is CSS_IDENT or
CSS_INHERIT , this attribute contains the string
representation of the ident, otherwise it contains an empty string. |
float |
getHorizontalPosition(float hType)
This method is used to get the float value in a specified unit if the horizontalPosition represents a length or a percentage. |
short |
getHorizontalType()
A code defining the type of the horizontal value. |
java.lang.String |
getVerticalIdentifier()
If verticalType is CSS_IDENT or
CSS_INHERIT , this attribute contains the string
representation of the ident, otherwise it contains an empty string. |
float |
getVerticalPosition(float vType)
This method is used to get the float value in a specified unit if the verticalPosition represents a length or a percentage. |
short |
getVerticalType()
A code defining the type of the horizontal value. |
void |
setHorizontalPosition(short hType,
float value)
This method is used to set the horizontal position with a specified unit. |
void |
setPositionIdentifier(java.lang.String hIdentifier,
java.lang.String vIdentifier)
Sets the identifiers. |
void |
setVerticalPosition(short vType,
float value)
This method is used to set the vertical position with a specified unit. |
Methods inherited from interface org.w3c.dom.css.CSSValue |
getCssText, getCssValueType, setCssText |
Method Detail |
public short getHorizontalType()
CSS_PERCENTAGE
, CSS_EMS
,
CSS_EXS
, CSS_PX
, CSS_CM
,
CSS_MM
, CSS_IN
, CSS_PT
,
CSS_PC
or CSS_IDENT
. If one of horizontal or
vertical is CSS_IDENT
, it's guaranteed that the other is
the same.public short getVerticalType()
CSS_PERCENTAGE
,
CSS_EMS
, CSS_EXS
, CSS_PX
,
CSS_CM
, CSS_MM
, CSS_IN
,
CSS_PT
, CSS_PC
, CSS_IDENT
,
CSS_INHERIT
. If one of horizontal or vertical is
CSS_IDENT
or CSS_INHERIT
, it's guaranteed
that the other is the same.public java.lang.String getHorizontalIdentifier()
horizontalType
is CSS_IDENT
or
CSS_INHERIT
, this attribute contains the string
representation of the ident, otherwise it contains an empty string.public java.lang.String getVerticalIdentifier()
verticalType
is CSS_IDENT
or
CSS_INHERIT
, this attribute contains the string
representation of the ident, otherwise it contains an empty string. The
value is "center"
if only the horizontalIdentifier has
been set.public float getHorizontalPosition(float hType) throws DOMException
horizontalPosition
represents a length or a percentage. If
the float doesn't contain a float value or can't be converted into the
specified unit, a DOMException
is raised.hType
- The horizontal unit.DOMException
- INVALID_ACCESS_ERR: Raised if the property doesn't contain a float
or the value can't be converted.public float getVerticalPosition(float vType) throws DOMException
verticalPosition
represents a length or a percentage. If
the float doesn't contain a float value or can't be converted into the
specified unit, a DOMException
is raised. The value is
50%
if only the horizontal value has been specified.vType
- The vertical unit.DOMException
- INVALID_ACCESS_ERR: Raised if the property doesn't contain a float
or the value can't be converted.public void setHorizontalPosition(short hType, float value) throws DOMException
50%
.hType
- The specified unit (a length or a percentage).value
- The new value.DOMException
- INVALID_ACCESS_ERR: Raised if the specified unit is not a length or
a percentage.
public void setVerticalPosition(short vType, float value) throws DOMException
50%
.vType
- The specified unit (a length or a percentage).value
- The new value.DOMException
- INVALID_ACCESS_ERR: Raised if the specified unit is not a length or
a percentage.
public void setPositionIdentifier(java.lang.String hIdentifier, java.lang.String vIdentifier) throws DOMException
"center"
).hIdentifier
- The new horizontal identifier.vIdentifier
- The new vertical identifier.DOMException
- SYNTAX_ERR: Raised if the identifiers have a syntax error and are
unparsable.
|
Source code is GPL'd at http://xmlconf.sourceforge.net. |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |