|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpalmed.edit.MonospacedFont
public final class MonospacedFont
This class implements a custom monospaced bitmap font.
The only image format supported is png.
Constructor Summary | |
---|---|
MonospacedFont(java.lang.String name)
Create a monospaced font. |
Method Summary | |
---|---|
void |
draw(javax.microedition.lcdui.Graphics g,
java.lang.String text,
int start,
int end,
int y)
Draw the given characters. |
void |
drawEmptySelection(javax.microedition.lcdui.Graphics g,
int start,
int end,
int y)
Draw the given number of spaces as selection. |
void |
drawSelection(javax.microedition.lcdui.Graphics g,
java.lang.String text,
int start,
int end,
int y)
Draw the given characters as selection. |
int |
getHeight()
Retrieve the height of a character. |
int |
getWidth()
Retrieve the width of a character. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MonospacedFont(java.lang.String name)
name
- the font bitmap filenameMethod Detail |
---|
public int getWidth()
getWidth
in interface IFont
public int getHeight()
getHeight
in interface IFont
public void draw(javax.microedition.lcdui.Graphics g, java.lang.String text, int start, int end, int y)
The character at the end position should not be drawn.
draw
in interface IFont
g
- the graphics to usetext
- the text to draw a subpart ofstart
- the start position in the textend
- the end position in the texty
- the line number to draw the text atpublic void drawSelection(javax.microedition.lcdui.Graphics g, java.lang.String text, int start, int end, int y)
The character at the end position should not be drawn.
drawSelection
in interface IFont
g
- the graphics to usetext
- the text to draw a subpart ofstart
- the start position in the textend
- the end position in the texty
- the line number to draw the text atpublic void drawEmptySelection(javax.microedition.lcdui.Graphics g, int start, int end, int y)
The character at the end position should not be drawn.
drawEmptySelection
in interface IFont
g
- the graphics to usestart
- the start position in the textend
- the end position in the texty
- the line number to draw the text at
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |