|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.informatica.doc.style.css.AbstractStyleDatabase
info.informatica.doc.style.css.j2d.Java2DStyleDatabase
public class Java2DStyleDatabase
CSS style database for use with Java2D objects.
| Field Summary |
|---|
| Fields inherited from class info.informatica.doc.style.css.AbstractStyleDatabase |
|---|
DEFAULT_GENERIC_FONT_FAMILY, DEFAULT_INITIAL_COLOR |
| Constructor Summary | |
|---|---|
Java2DStyleDatabase()
|
|
| Method Summary | |
|---|---|
protected static float |
clipColorValue(float color)
|
protected static int |
clipColorValue(int color)
|
protected float |
cmToPixels(float cm)
Converts from centimeters to pixels. |
protected float |
deviceResolutionFactor()
This method is used to normalize sizes to a 1024x768 screen. |
static Color |
getAWTColor(org.w3c.dom.css.CSSPrimitiveValue cssColor)
Gets the AWT color as obtained from the given CSS primitive value. |
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 |
getFontSizeFromIdentifier(String familyName,
String fontSizeIdentifier)
Gets the font size from the given size identifier (small, medium, etc.), expressed in typographic points. |
protected GraphicsConfiguration |
getGraphicsConfiguration()
Gets the GraphicsConfiguration for this style database. |
short |
getNaturalUnit()
Gets the identifier of the device's natural unit. |
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. |
protected float |
pxTocm(int px)
Converts from pixels to centimeters. |
void |
setGraphicsConfiguration(GraphicsConfiguration configuration)
|
void |
setNaturalUnit(short naturalUnit)
Sets the natural unit for this device. |
| Methods inherited from class info.informatica.doc.style.css.AbstractStyleDatabase |
|---|
floatValueConversion, floatValueConversion, getDefaultGenericFontFamily, getExSizeInPt, getInitialColor, getScrollbarWidth, setInitialColor |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Java2DStyleDatabase()
| Method Detail |
|---|
public String getDefaultGenericFontFamily(String genericFamily)
This class attempts to map the generic name to a "logical font" name.
As, in Java, logical font names are internally mapped to physical fonts by the Java runtime environment, the name of the corresponding "logical font" is returned, and no further mapping is attempted.
genericFamily - the name of the logical font.
public boolean isFontFamilyAvailable(String fontFamily)
StyleDatabase
fontFamily - the font family name.
protected GraphicsConfiguration getGraphicsConfiguration()
UnsupportedOperationException - if no appropriate GraphicsConfiguration could be found.public void setGraphicsConfiguration(GraphicsConfiguration configuration)
protected float cmToPixels(float cm)
AbstractStyleDatabase
cmToPixels in class AbstractStyleDatabasecm - the value, in centimeters, to be converted.
protected float pxTocm(int px)
AbstractStyleDatabase
pxTocm in class AbstractStyleDatabasepx - the value, in pixels, to be converted.
protected float deviceResolutionFactor()
public int getFontSizeFromIdentifier(String familyName,
String fontSizeIdentifier)
throws DOMException
StyleDatabase
familyName - the font family name.fontSizeIdentifier - the font size identifier.
DOMException
public float getWidthSize(String widthIdentifier)
throws DOMException
StyleDatabase
widthIdentifier - the CSS width identifier.
DOMExceptionpublic short getNaturalUnit()
StyleDatabase
CSSPrimitiveValue.public void setNaturalUnit(short naturalUnit)
naturalUnit - the natural unit.CSSPrimitiveValuepublic float getDocumentHeight()
StyleDatabase
public float getDocumentWidth()
StyleDatabase
public static Color getAWTColor(org.w3c.dom.css.CSSPrimitiveValue cssColor)
cssColor - the primitive color value, which can contain an RGB color, a
number or an identifier.
protected static int clipColorValue(int color)
protected static float clipColorValue(float color)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||