|
http://www.eteks.com | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.eteks.awt.PJAGraphicsManager com.eteks.java2d.PJAGraphicsManager2D
Pure Java AWT Manager for Java2D. This class manages fonts and images with Java 2D GraphicsEnvironment
.
Fonts come from True Type font files and images are build with PJABufferedImage
.
PJAToolkit
Constructor Summary | |
PJAGraphicsManager2D()
|
Method Summary | |
int |
checkImage(java.awt.Image image,
int width,
int height,
java.awt.image.ImageObserver observer)
Checks the status of an image laoding. |
java.awt.Image |
createImage(java.awt.image.ImageProducer producer)
Creates an image from the producer . |
java.awt.Image |
createImage(int width,
int height)
Creates an image of width x height pixels. |
java.lang.String[] |
getFontList()
Returns the array {"Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"} .
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font font)
Returns the font metrics of a font. |
java.awt.peer.FontPeer |
getFontPeer(java.lang.String name,
int style)
Returns a dummy FontPeer object. |
java.awt.GraphicsConfiguration |
getGraphicsConfiguration()
Returns a GraphicsConfiguration instance required by the the method
getGraphicsConfiguration () of ComponentPeer interface. |
boolean |
prepareImage(java.awt.Image image,
int width,
int height,
java.awt.image.ImageObserver observer)
Starts the loading of an image. |
Methods inherited from class com.eteks.awt.PJAGraphicsManager |
createImage, createImage, createImage, getClosestColorIndex, getColorModel, getDefaultFont, getDefaultGraphicsManager, getFontsDirectory, getFontsPath, getImage, getImage, getScreenHeight, getScreenResolution, getScreenWidth, isClassAccessible, isFontInstantiable, loadFont, loadFonts, loadFonts, sync |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public PJAGraphicsManager2D()
Method Detail |
public java.awt.peer.FontPeer getFontPeer(java.lang.String name, int style)
FontPeer
object.
getFontPeer
in class PJAGraphicsManager
name
- The font name.style
- The font style (Font.PLAIN
, Font.ITALIC
,
Font.BOLD
or Font.BOLD | Font.ITALIC
)
FontPeer
object. If the font name
isn't available the FontPeer
of the default font name
is returned.PJAGraphicsManager.loadFonts()
public java.lang.String[] getFontList()
{"Dialog", "SansSerif", "Serif", "Monospaced", "DialogInput"}
.
The list of True Type fonts is obtained from
GraphicsEnvironment getAvailableFontFamilyNames() method.
getFontList
in class PJAGraphicsManager
public java.awt.FontMetrics getFontMetrics(java.awt.Font font)
getFontMetrics
in class PJAGraphicsManager
public boolean prepareImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)
prepareImage
in class PJAGraphicsManager
PJAToolkit.prepareImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
public int checkImage(java.awt.Image image, int width, int height, java.awt.image.ImageObserver observer)
checkImage
in class PJAGraphicsManager
PJAToolkit.checkImage(java.awt.Image, int, int, java.awt.image.ImageObserver)
public java.awt.Image createImage(java.awt.image.ImageProducer producer)
producer
. This is the method that
finally creates an instance of PJABufferedImage
.
createImage
in class PJAGraphicsManager
java.awt.Image
.PJAToolkit.createImage(ImageProducer)
public java.awt.Image createImage(int width, int height)
width x height
pixels. This method returns
an instance of com.eteks.awt.PJABufferedImage
.
createImage
in class PJAGraphicsManager
width
- Width in pixels of the new image.height
- Height in pixels of the new image.
java.awt.Image
.PJAGraphicsEnvironment
public java.awt.GraphicsConfiguration getGraphicsConfiguration()
GraphicsConfiguration
instance required by the the method
getGraphicsConfiguration ()
of ComponentPeer
interface.
getGraphicsConfiguration
in class PJAGraphicsManager
|
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |