| org.w3c.dom.css.CSS2PageSize
CSS2PageSize | public interface CSS2PageSize extends CSSValue(Code) | | 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.
since: DOM Level 2 |
Method Summary | |
public float | getHeightSize(float hType) This method is used to get the float value in a specified unit if the
heightType represents a length. | public short | getHeightType() A code defining the type of the height of the page. | public String | getIdentifier() If width is CSS_IDENT , this attribute
contains the string representation of the ident, otherwise it contains
an empty string. | public float | getWidth(float wType) This method is used to get the float value in a specified unit if the
widthType represents a length. | public short | getWidthType() A code defining the type of the width of the page. | public void | setHeightSize(short hType, float value) This method is used to set the height position with a specified unit. | public void | setIdentifier(String ident) Sets the identifier. | public void | setWidthSize(short wType, float value) This method is used to set the width position with a specified unit. |
getHeightSize | public float getHeightSize(float hType) throws DOMException(Code) | | This method is used to get the float value in a specified unit if the
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.
Parameters: hType - The height unit. The float value. exception: DOMException - INVALID_ACCESS_ERR: Raised if the property doesn't contain a float or the value can't be converted. |
getHeightType | public short getHeightType()(Code) | | A code defining the type of the height of the page. It would be one of
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.
|
getIdentifier | public String getIdentifier()(Code) | | If width is CSS_IDENT , this attribute
contains the string representation of the ident, otherwise it contains
an empty string.
|
getWidth | public float getWidth(float wType) throws DOMException(Code) | | This method is used to get the float value in a specified unit if the
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.
Parameters: wType - The width unit. The float value. exception: DOMException - INVALID_ACCESS_ERR: Raised if the property doesn't contain a float or the value can't be converted. |
getWidthType | public short getWidthType()(Code) | | A code defining the type of the width of the page. It would be one of
CSS_EMS , CSS_EXS , CSS_PX ,
CSS_CM , CSS_MM , CSS_IN ,
CSS_PT , CSS_PC or CSS_IDENT .
|
setHeightSize | public void setHeightSize(short hType, float value) throws DOMException(Code) | | This method is used to set the height position with a specified unit.
If the widthType is not a length, it sets the width
position to the same value.
Parameters: hType - The height unit. Parameters: value - The new value. exception: DOMException - INVALID_ACCESS_ERR: Raised if the specified unit is not a length or a percentage. NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. |
setIdentifier | public void setIdentifier(String ident) throws DOMException(Code) | | Sets the identifier.
Parameters: ident - The new identifier. exception: DOMException - SYNTAX_ERR: Raised if the identifier has a syntax error and is unparsable. NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. |
setWidthSize | public void setWidthSize(short wType, float value) throws DOMException(Code) | | This method is used to set the width position with a specified unit.
If the heightType is not a length, it sets the height
position to the same value.
Parameters: wType - The width unit. Parameters: value - The new value. exception: DOMException - INVALID_ACCESS_ERR: Raised if the specified unit is not a length or a percentage. NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. |
|
|