http://www.eteks.com

com.eteks.java2d
クラス PJAGraphicsEnvironment

java.lang.Object
  |
  +--java.awt.GraphicsEnvironment
        |
        +--sun.java2d.SunGraphicsEnvironment
              |
              +--com.eteks.java2d.PJAGraphicsEnvironment

public class PJAGraphicsEnvironment
extends sun.java2d.SunGraphicsEnvironment

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 :

Java2D 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).

導入されたバージョン:
PJA2.0
バージョン:
2.1
作成者:
Emmanuel Puybaret
関連項目:
PJAToolkit, PJAGraphicsManager

クラス sun.java2d.SunGraphicsEnvironment から継承した内部クラス
sun.java2d.SunGraphicsEnvironment.T1Filter, sun.java2d.SunGraphicsEnvironment.T2KFilter, sun.java2d.SunGraphicsEnvironment.TTFilter
 
クラス sun.java2d.SunGraphicsEnvironment から継承したフィールド
fontPath, fprops, loadNativeFonts, osVersion, registeredFonts
 
コンストラクタの概要
PJAGraphicsEnvironment()
           
 
メソッドの概要
 java.awt.Graphics2D createGraphics(java.awt.image.BufferedImage image)
          Returns a Graphics2D instance or throws an AWTError exception.
protected  int getNumScreens()
          Returns the number of screens.
protected  java.awt.GraphicsDevice makeScreenDevice(int screenNum)
           
 
クラス sun.java2d.SunGraphicsEnvironment から継承したメソッド
createFont, getAllFonts, getAvailableFontFamilyNames, getAvailableFontFamilyNames, getBestFontFor, getDefaultScreenDevice, getFileNameFromPlatformName, getFontProperties, getFontPropertyFD, getOsVersion, getPrinterJob, getPropString, getScreenDevices, initCompositeFonts, initializeProps, isLogicalFont, loadFonts, mapFamilyName, mapFamilyNameAll, parseFamilyNameProperty, platformReady, registerFontFile, registerFontPath, registerNative, registerNativeFonts, styleStr
 
クラス java.awt.GraphicsEnvironment から継承したメソッド
getLocalGraphicsEnvironment
 
クラス java.lang.Object から継承したメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

コンストラクタの詳細

PJAGraphicsEnvironment

public PJAGraphicsEnvironment()
メソッドの詳細

getNumScreens

protected int getNumScreens()
Returns the number of screens.
オーバーライド:
クラス sun.java2d.SunGraphicsEnvironment 内の getNumScreens
戻り値:
1

makeScreenDevice

protected java.awt.GraphicsDevice makeScreenDevice(int screenNum)
オーバーライド:
クラス sun.java2d.SunGraphicsEnvironment 内の makeScreenDevice

createGraphics

public java.awt.Graphics2D createGraphics(java.awt.image.BufferedImage image)
Returns a Graphics2D instance or throws an AWTError exception.
オーバーライド:
クラス sun.java2d.SunGraphicsEnvironment 内の createGraphics

© 1997-2001 eTeks - All rights reserved