|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.esw.eengine.resource.AbstractResource
de.esw.eengine.resource.Font
public class Font
Implements a font resource. Fonts are stored in a font archive (JarFile with
.fnt extension) and a Manifest file for meta data. The meta data consist of a
Width and a Height attriute for the font image. The image must be in JPG, PNG
or GIF format.
An font always consists of the following characters in the following order:
!"#$%&'()*+�-./0123456789:;<=>?@[\]ˆ_
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
| Constructor Summary | |
|---|---|
Font(int id,
java.net.URL location,
FontCodec codec)
|
|
| Method Summary | |
|---|---|
void |
dispose()
Frees the memory occupied and disposes this resource. |
java.awt.image.BufferedImage |
getChar(char c)
Returns a BufferedImage for rendering with the given
Character. |
int |
getCharWidth(char c)
|
int |
getHeight()
|
int |
getStringWidth(java.lang.String str)
|
void |
load()
Loads the IResource. |
void |
save()
Saves the IResource. |
| Methods inherited from class de.esw.eengine.resource.AbstractResource |
|---|
getCodec, getId, getURL |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface de.esw.eengine.core.IResource |
|---|
getCodec, getId, getURL |
| Constructor Detail |
|---|
public Font(int id,
java.net.URL location,
FontCodec codec)
id - The resource id to attachlocation - Locator to the resourcecodec - ICodec responsible for this resource| Method Detail |
|---|
public void load()
throws EEngineException
IResourceIResource.
load in interface IResourceload in class AbstractResourceEEngineException - Thrown on loading errorsIResource.load()public java.awt.image.BufferedImage getChar(char c)
BufferedImage for rendering with the given
Character. The user should not flush the the image.
c - Character to get font data for
BufferedImage as renderable
public void save()
throws EEngineException
IResourceIResource.
save in interface IResourcesave in class AbstractResourceEEngineException - Thrown on saving errorsIResource.save()public void dispose()
IResource
dispose in interface IResourcedispose in class AbstractResourceIResource.dispose()public final int getHeight()
public final int getCharWidth(char c)
c - Character to get the width for
public final int getStringWidth(java.lang.String str)
str - String for which to calculate the width
String
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||