palmed.edit
Class LineDrawer

java.lang.Object
  extended by palmed.edit.LineDrawer
All Implemented Interfaces:
ILineVisitor

public final class LineDrawer
extends java.lang.Object
implements ILineVisitor

This class handles the mechanics of drawing a given line of text.

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

Constructor Summary
LineDrawer(IFont font, int width)
          Create a line drawer.
 
Method Summary
 void configure(javax.microedition.lcdui.Graphics graphics, int y)
          Configure the drawer context.
 void visit(java.lang.String text, int start, int end, boolean continues)
          Handle a line of text.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LineDrawer

public LineDrawer(IFont font,
                  int width)
Create a line drawer.

Parameters:
font - the font
width - the number of characters to draw on each line
Method Detail

configure

public void configure(javax.microedition.lcdui.Graphics graphics,
                      int y)
Configure the drawer context.

Parameters:
graphics - the graphics context
y - the line number

visit

public void visit(java.lang.String text,
                  int start,
                  int end,
                  boolean continues)
Handle a line of text.

Specified by:
visit in interface ILineVisitor
Parameters:
text - the content
start - the selection start position
end - the selection end position
continues - whether the selection continues on the next line or not


Copyright © 2004-2006 PalmEd. All Rights Reserved.