java.lang.Object
io.sf.carte.doc.style.css.om.AbstractStyleDatabase
- All Implemented Interfaces:
StyleDatabase,Serializable
- Direct Known Subclasses:
AWTStyleDatabase
Abstract base class for CSS Style databases.
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected AbstractStyleDatabase.FontFormatfontFormatFromContentType(String conType) protected AbstractStyleDatabase.FontFormatfontFormatFromRule(String format) Gets the real name of the default font.Gives the initial (default) value for the 'color' property on this device.getUsedFontFamily(CSSComputedProperties computedStyle) Gets the used font family name according to the given style.protected abstract booleanisFontFamilyAvailable(String fontFamily) protected booleanisFontFamilyAvailable(String requestedFamily, CSSComputedProperties style) protected booleanloadFontFace(String familyName, AbstractStyleDatabase.FontFormat fontFormat, InputStream is, CSSFontFaceRule rule) voidTry to load the font family according to the given font face rule, and make it available to this object.voidsetInitialColor(String initialColor) Sets the initial (default) value for the 'color' property on this device.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.sf.carte.doc.style.css.StyleDatabase
getColorDepth, getDefaultGenericFontFamily, getDeviceHeight, getDeviceWidth, getEnvValue, getExSizeInPt, getFontSizeFromIdentifier, getNaturalUnit, getSystemFontDeclaration, getWidthSize, isFontFaceName, supports, supports, supports
-
Field Details
-
DEFAULT_GENERIC_FONT_FAMILY
- See Also:
-
-
Constructor Details
-
AbstractStyleDatabase
public AbstractStyleDatabase()
-
-
Method Details
-
getInitialColor
Description copied from interface:StyleDatabaseGives the initial (default) value for the 'color' property on this device.- Specified by:
getInitialColorin interfaceStyleDatabase- Returns:
- the default color value.
-
setInitialColor
Description copied from interface:StyleDatabaseSets the initial (default) value for the 'color' property on this device.- Specified by:
setInitialColorin interfaceStyleDatabase- Parameters:
initialColor- the String representing default color value.
-
getDefaultGenericFontFamily
Description copied from interface:StyleDatabaseGets the real name of the default font.For example, if the default generic font name is 'serif', this method should return the same as getDefaultGenericFontFamily("serif").
- Specified by:
getDefaultGenericFontFamilyin interfaceStyleDatabase- Returns:
- the name of the default real font.
-
getUsedFontFamily
Description copied from interface:StyleDatabaseGets the used font family name according to the given style.- Specified by:
getUsedFontFamilyin interfaceStyleDatabase- Parameters:
computedStyle- the computed style.- Returns:
- the name of the used font family.
-
isFontFamilyAvailable
-
loadFontFaceRule
Description copied from interface:StyleDatabaseTry to load the font family according to the given font face rule, and make it available to this object.- Specified by:
loadFontFaceRulein interfaceStyleDatabase- Parameters:
rule- the font face rule.
-
fontFormatFromContentType
-
fontFormatFromRule
-
loadFontFace
protected boolean loadFontFace(String familyName, AbstractStyleDatabase.FontFormat fontFormat, InputStream is, CSSFontFaceRule rule) throws IOException - Throws:
IOException
-
isFontFamilyAvailable
-