SourceForge.net Logo
aXSL API 0.1

org.axsl.text.line
Interface LineBreakHandler


public interface LineBreakHandler

Defines an interface that can be used by client applications to handle the results of the line-breaking process. LineBreakHandler is where the LineBreaker implementations throw the results of their work.


Method Summary
 void handleLineBreakNonText(LineOutput lineOutput, LineNonText nonText, int sizeInline)
          Handle the results of the line-breaking by placing the specified text on the specified line.
 void handleLineBreakText(LineOutput lineOutput, LineText text, int startOffset, int sizeInChars, int sizeInline, boolean hasDiscretionaryHyphen, boolean hasFauxSmallCaps, boolean isLastItemOnLine)
          Handle the results of the line-breaking by placing the specified text on the specified line.
 

Method Detail

handleLineBreakText

public void handleLineBreakText(LineOutput lineOutput,
                                LineText text,
                                int startOffset,
                                int sizeInChars,
                                int sizeInline,
                                boolean hasDiscretionaryHyphen,
                                boolean hasFauxSmallCaps,
                                boolean isLastItemOnLine)
                         throws TextException
Handle the results of the line-breaking by placing the specified text on the specified line.

Parameters:
lineOutput - The line on which the text should be added.
text - The item containing the text to be added.
startOffset - The index to the first character in the text item that should be included on the line.
sizeInChars - The size, in characters, of the text in the text item that should be included on the line.
sizeInline - The size, in millipoints, that this result occupies on the line.
hasDiscretionaryHyphen - Indicates whether a discretionary hyphen should be added to the text being added.
hasFauxSmallCaps - Indicates whether faux small-caps should be applied to the text being added.
isLastItemOnLine - Indicates whether this text item is the last item on this line.
Throws:
TextException - For errors handling the output.

handleLineBreakNonText

public void handleLineBreakNonText(LineOutput lineOutput,
                                   LineNonText nonText,
                                   int sizeInline)
                            throws TextException
Handle the results of the line-breaking by placing the specified text on the specified line.

Parameters:
lineOutput - The line on which the text should be added.
nonText - The non-text item that should be added to the line.
sizeInline - The size, in millipoints, that this result occupies on the line.
Throws:
TextException - For errors handling the output.

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.