|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface StyleDatabase
CSS Style database.
To use CSS in practice, you need to have information about the target
rendering device: available fonts, page sizes, etc. This information is
supplied by an instance of the StyleDatabase interface.
The appropriate implementation must be supplied to the style declaration,
through the StyleDatabaseAware interface.
This interface is a work in progress.
StyleDatabaseAware| Method Summary | |
|---|---|
float |
floatValueConversion(float initialValue,
short initialUnitType)
Makes an unit conversion to the natural unit of this device. |
float |
floatValueConversion(float initialValue,
short initialUnitType,
short destUnitType)
Makes an unit conversion (for the units known to this device). |
String |
getDefaultGenericFontFamily()
Gets the real name of the default font. |
String |
getDefaultGenericFontFamily(String genericFamily)
Gets the name of the default font used when a generic font family (serif, sans-serif, monospace, cursive, fantasy) is specified. |
float |
getDocumentHeight()
Gets the height of the document (or screen viewport) in the natural unit for the device. |
float |
getDocumentWidth()
Gets the width of the document (or screen viewport) in the natural unit for the device. |
int |
getExSizeInPt(String familyName,
int size)
Gives the size of the 'ex' unit, expressed in 'pt' (typographic points) unit. |
int |
getFontSizeFromIdentifier(String familyName,
String fontSizeIdentifier)
Gets the font size from the given size identifier (small, medium, etc.), expressed in typographic points. |
org.w3c.dom.css.CSSPrimitiveValue |
getInitialColor()
Gives the initial (default) value for the 'color' property on this device. |
short |
getNaturalUnit()
Gets the identifier of the device's natural unit. |
float |
getScrollbarWidth()
Gets the width of the scrollbar that appears when a box overflows with scroll. |
float |
getWidthSize(String widthIdentifier)
Gets the size corresponging to the given identifier (thin, thick, medium). |
boolean |
isFontFamilyAvailable(String fontFamily)
Checks if a font family is available. |
void |
setInitialColor(String initialColor)
Sets the initial (default) value for the 'color' property on this device. |
| Method Detail |
|---|
org.w3c.dom.css.CSSPrimitiveValue getInitialColor()
void setInitialColor(String initialColor)
initialColor - the String representing default color value.String getDefaultGenericFontFamily(String genericFamily)
genericFamily - the name of the logical font.
String getDefaultGenericFontFamily()
For example, if the default generic font name is 'serif', this method should return the same as getDefaultGenericFontFamily("serif").
boolean isFontFamilyAvailable(String fontFamily)
fontFamily - the font family name.
int getFontSizeFromIdentifier(String familyName,
String fontSizeIdentifier)
throws DOMException
familyName - the font family name.fontSizeIdentifier - the font size identifier.
DOMExceptionshort getNaturalUnit()
CSSPrimitiveValue.
float floatValueConversion(float initialValue,
short initialUnitType,
short destUnitType)
throws DOMException
initialValue - the value to be converted, expressed in the initial unit.initialUnitType - the initial unit type.destUnitType - the destination unit type.
DOMException
float floatValueConversion(float initialValue,
short initialUnitType)
throws DOMException
initialValue - the value to be converted, expressed in the initial unit.initialUnitType - the initial unit type.
DOMException
int getExSizeInPt(String familyName,
int size)
familyName - the font family name.size - the font size.
float getWidthSize(String widthIdentifier)
throws DOMException
widthIdentifier - the CSS width identifier.
DOMExceptionfloat getDocumentHeight()
float getDocumentWidth()
float getScrollbarWidth()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||