|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The CSS2PageSize
interface represents the size CSS Level 2
descriptor.
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 | |
float |
getHeightSize(float hType)
This method is used to get the float value in a specified unit if the heightType represents a length. |
short |
getHeightType()
A code defining the type of the height of the page. |
java.lang.String |
getIdentifier()
If width is CSS_IDENT , this attribute
contains the string representation of the ident, otherwise it contains
an empty string. |
float |
getWidth(float wType)
This method is used to get the float value in a specified unit if the widthType represents a length. |
short |
getWidthType()
A code defining the type of the width of the page. |
void |
setHeightSize(short hType,
float value)
This method is used to set the height position with a specified unit. |
void |
setIdentifier(java.lang.String ident)
Sets the identifier. |
void |
setWidthSize(short wType,
float value)
This method is used to set the width position with a specified unit. |
Methods inherited from interface org.w3c.dom.css.CSSValue |
getCssText, getCssValueType, setCssText |
Method Detail |
public short getWidthType()
CSS_EMS
, CSS_EXS
, CSS_PX
,
CSS_CM
, CSS_MM
, CSS_IN
,
CSS_PT
, CSS_PC
or CSS_IDENT
.public short getHeightType()
CSS_EMS
, CSS_EXS
, CSS_PX
,
CSS_CM
, CSS_MM
, CSS_IN
,
CSS_PT
, CSS_PC
or CSS_IDENT
.
If one of width or height is CSS_IDENT
, it's guaranteed
that the other is the same.public java.lang.String getIdentifier()
width
is CSS_IDENT
, this attribute
contains the string representation of the ident, otherwise it contains
an empty string.public float getWidth(float wType) throws DOMException
widthType
represents a length. If the float doesn't
contain a float value or can't be converted into the specified unit, a
DOMException
is raised.wType
- The width unit.DOMException
- INVALID_ACCESS_ERR: Raised if the property doesn't contain a float
or the value can't be converted.public float getHeightSize(float hType) throws DOMException
heightType
represents a length. If the float doesn't
contain a float value or can't be converted into the specified unit, a
DOMException
is raised. If only the width value has been
specified, the height value is the same.hType
- The height unit.DOMException
- INVALID_ACCESS_ERR: Raised if the property doesn't contain a float
or the value can't be converted.public void setWidthSize(short wType, float value) throws DOMException
heightType
is not a length, it sets the height
position to the same value.wType
- The width unit.value
- The new value.DOMException
- INVALID_ACCESS_ERR: Raised if the specified unit is not a length or
a percentage.
public void setHeightSize(short hType, float value) throws DOMException
widthType
is not a length, it sets the width
position to the same value.hType
- The height unit.value
- The new value.DOMException
- INVALID_ACCESS_ERR: Raised if the specified unit is not a length or
a percentage.
public void setIdentifier(java.lang.String ident) throws DOMException
ident
- The new identifier.DOMException
- SYNTAX_ERR: Raised if the identifier has a syntax error and is
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 |