|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.BitMapFontViewer
public class BitMapFontViewer
Is used for a performant showing of String with a bitmap font.
Copyright Enough Software 2004 - 2008
history
09-Nov-2004 - rob creation
| Field Summary | |
|---|---|
static int |
ABSOLUTE_LINE_BREAK
|
static int |
ARTIFICAL_LINE_BREAK
|
| Constructor Summary | |
|---|---|
BitMapFontViewer(javax.microedition.lcdui.Image image,
int[] indeces,
short[] xPositions,
byte[] characterWidths,
int fontHeight,
int spaceIndex,
int verticalPadding)
Views a specific input string with a specific bitmap font. |
|
| Method Summary | |
|---|---|
int |
getFontHeight()
Returns the height of used font. |
int |
getHeight()
Retrieves the height needed for this viewer. |
int |
getNumberOfLines()
Retrieves the number of lines which are used to display the embedded text. |
byte[] |
getUsedCharactersWidths()
Returns the used character widths. |
int |
getWidth()
Retrieves the width needed for this viewer. |
void |
layout(int firstLineWidth,
int lineWidth,
int paddingVertical,
int orientationSetting)
Layouts this text-viewer. |
void |
paint(int x,
int y,
javax.microedition.lcdui.Graphics g)
Paints this viewer on the screen. |
void |
setHorizontalOrientation(int orientation)
Sets the orientation of the text |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int ABSOLUTE_LINE_BREAK
public static final int ARTIFICAL_LINE_BREAK
| Constructor Detail |
|---|
public BitMapFontViewer(javax.microedition.lcdui.Image image,
int[] indeces,
short[] xPositions,
byte[] characterWidths,
int fontHeight,
int spaceIndex,
int verticalPadding)
image - the basic font-imageindeces - array of the x-positions of the to-be-displayed charactersxPositions - array of the x-positions of the to-be-displayed characterscharacterWidths - array of the widths of the to-be-displayed charactersfontHeight - the height of the fontspaceIndex - the index of the space characterverticalPadding - the padding between two lines| Method Detail |
|---|
public void paint(int x,
int y,
javax.microedition.lcdui.Graphics g)
x - the x-position for the text.
When the orientation is LEFT, x defines the left-border;
when the orientation is RIGHT, x defines the rigth border;
when the orientation is HCENTER, x defines the middle between left and right border.y - the top y-position of the first line.g - the graphics objectpublic int getWidth()
public int getHeight()
public void layout(int firstLineWidth,
int lineWidth,
int paddingVertical,
int orientationSetting)
firstLineWidth - the available width for the first linelineWidth - the available width for the following linespaddingVertical - the space between linesorientationSetting - the orientation of this viewer, either Grapics.LEFT, Graphics.RIGHT or Graphics.HCENTERgetHeight(),
getWidth()public void setHorizontalOrientation(int orientation)
orientation - the horizontal text orientation like Graphics.LEFT, Graphics.RIGHT or Graphics.HCENTERpublic int getFontHeight()
public int getNumberOfLines()
public byte[] getUsedCharactersWidths()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||