SourceForge.net Logo
aXSL API 0.1

org.axsl.text.line
Interface EagerLineBreaker

All Superinterfaces:
LineBreaker

public interface EagerLineBreaker
extends LineBreaker

EagerLineBreaker implementations provide line-breaking logic to clients. "Eager" line-breaking systems find the best line-break for the current line and never look back at past lines or ahead at future lines. They must have immediate feedback about whether the content fit into the output or not. Eager line-breaking systems clients push one LineOutput to the LineBreaker at a time.


Method Summary
 int processLineContent(LineContent contentItem, int start, int end, LineOutput output)
          Push up to one line's worth of content through the line-breaking logic.
 

Method Detail

processLineContent

public int processLineContent(LineContent contentItem,
                              int start,
                              int end,
                              LineOutput output)
                       throws TextException
Push up to one line's worth of content through the line-breaking logic.

Parameters:
contentItem - The LineContent implementation that should be laid out.
start - The index to the first character in contentItem that should be considered part of the content.
end - The index to the last character in contentItem that should be considered part of the content.
output - The LineOutput item onto which the system should attempt to lay out contentItem.
Returns:
For non-text items, returns 1 for success or 0 if the item did not fit onto the current line. For text items, returns the index into its text (char []) to the first character that was not successfully added to the line.
Throws:
TextException - For errors in line-breaking.

SourceForge.net Logo
aXSL API 0.1

This documentation was created September 6 2006 by The aXSL Group and may be freely copied. See license for details.