palmed.edit
Interface IFont

All Known Implementing Classes:
MonospacedFont

public interface IFont

This class defines a custom monospaced font.

Version:
$Revision: 395 $ $Date: 2005-12-31 13:05:41 +0900 (sam., 31 déc. 2005) $
Author:
Mathieu Champlon

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.
 

Method Detail

getWidth

int getWidth()
Retrieve the width of a character.

Returns:
character width in pixels

getHeight

int getHeight()
Retrieve the height of a character.

Returns:
character height in pixels

draw

void draw(javax.microedition.lcdui.Graphics g,
          java.lang.String text,
          int start,
          int end,
          int y)
Draw the given characters.

The character at the end position should not be drawn.

Parameters:
g - the graphics to use
text - the text to draw a subpart of
start - the start position in the text
end - the end position in the text
y - the line number to draw the text at

drawSelection

void drawSelection(javax.microedition.lcdui.Graphics g,
                   java.lang.String text,
                   int start,
                   int end,
                   int y)
Draw the given characters as selection.

The character at the end position should not be drawn.

Parameters:
g - the graphics to use
text - the text to draw a subpart of
start - the start position in the text
end - the end position in the text
y - the line number to draw the text at

drawEmptySelection

void drawEmptySelection(javax.microedition.lcdui.Graphics g,
                        int start,
                        int end,
                        int y)
Draw the given number of spaces as selection.

The character at the end position should not be drawn.

Parameters:
g - the graphics to use
start - the start position in the text
end - the end position in the text
y - the line number to draw the text at


Copyright © 2004-2006 PalmEd. All Rights Reserved.