|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.GraphicsEnvironment
|
+--sun.java2d.SunGraphicsEnvironment
|
+--com.eteks.java2d.PJAGraphicsEnvironment
Pure Java AWT GraphicsEnvironment implementation. This implementation enables to get
an environment even when no Display is available.
java.awt.graphicsenv system property have to be set
to com.eteks.java2d.PJAGraphicsEnvironment to allow the change
of java.awt.GraphicsEnvironment default implementation.
java.awt.fonts system property must be set to the
path where True Type fonts files will be loaded from
(this property must be defined to avoid calling the getFontPath ()
native method of the class NativeFontWrapper which
needs a X11 Display in Motif implementation).
This path can be equal to :
/usr/openwin/lib/X11/fonts/Type1:/usr/openwin/lib/X11/fonts/TrueType
directories on SolarisWinDir\Font directory on Windows($JAVAHOME)/lib/fontsJava2D can work with PJA only with JVM version >= 1.2.
When GraphicsEnvironment.getLocalGraphicsEnvironment () fails because
PJAGraphicsEnvironment class can't be loaded or java.awt.graphicsenv system
property can't be changed, java.awt.Font can't be instantiated without a Display since
this class requires an instance of java.awt.GraphicsEnvironment in Java 1.2. In that case,
it forbids to use Graphics2D methods in a program because Graphics2D needs a default
font (see PJADemo.java source for a way to change of .pjaf font).
PJAToolkit,
PJAGraphicsManager| Inner classes inherited from class sun.java2d.SunGraphicsEnvironment |
sun.java2d.SunGraphicsEnvironment.T1Filter, sun.java2d.SunGraphicsEnvironment.T2KFilter, sun.java2d.SunGraphicsEnvironment.TTFilter |
| Fields inherited from class sun.java2d.SunGraphicsEnvironment |
fontPath, fprops, loadNativeFonts, osVersion, registeredFonts |
| Constructor Summary | |
PJAGraphicsEnvironment()
|
|
| Method Summary | |
Graphics2D |
createGraphics(BufferedImage image)
Returns a Graphics2D instance or throws an AWTError
exception. |
protected int |
getNumScreens()
Returns the number of screens. |
protected GraphicsDevice |
makeScreenDevice(int screenNum)
|
| Methods inherited from class sun.java2d.SunGraphicsEnvironment |
createFont, getAllFonts, getAvailableFontFamilyNames, getAvailableFontFamilyNames, getBestFontFor, getDefaultScreenDevice, getFileNameFromPlatformName, getFontProperties, getFontPropertyFD, getOsVersion, getPrinterJob, getPropString, getScreenDevices, initCompositeFonts, initializeProps, loadFonts, mapFamilyName, mapFamilyNameAll, parseFamilyNameProperty, platformReady, registerFontPath, registerNative, registerNativeFonts, styleStr |
| Methods inherited from class java.awt.GraphicsEnvironment |
getLocalGraphicsEnvironment |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public PJAGraphicsEnvironment()
| Method Detail |
protected int getNumScreens()
getNumScreens in class sun.java2d.SunGraphicsEnvironmentprotected GraphicsDevice makeScreenDevice(int screenNum)
makeScreenDevice in class sun.java2d.SunGraphicsEnvironmentpublic Graphics2D createGraphics(BufferedImage image)
Graphics2D instance or throws an AWTError
exception.createGraphics in class sun.java2d.SunGraphicsEnvironment
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||