|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.foray.text.line.LineBreaker
org.foray.text.line.EagerLineBreaker
public abstract class EagerLineBreaker
Abstract superclass for LineBreakers that act in an "eager" manner. Much of the usefulness of this class comes from its ability to adapt an eager line-breaking system to be used by patient clients.
Constructor Summary | |
---|---|
EagerLineBreaker(TextServer4a server,
org.axsl.text.line.LineBreakControl control,
org.axsl.text.line.LineBreakHandler handler,
org.axsl.font.FontConsumer fontConsumer)
Constructor. |
Method Summary | |
---|---|
int |
addLineContent(org.axsl.text.line.LineContent content,
int start,
int end,
org.axsl.text.line.LineOutput output)
Add new line-content for processing. |
org.axsl.text.line.LineOutput |
getCurrentLine()
Returns the current line-output item. |
org.axsl.text.line.LineContent |
getLineContent()
Returns the current line content. |
protected org.axsl.text.line.LineOutput |
lineReceivingContent()
Return the current line-output. |
protected void |
overflowMessage()
Writes a standard overflow message to the logger. |
protected int |
processInput(org.axsl.text.line.LineContent lineContent,
int start,
int end)
Run a piece of content through the line-breaking system. |
int |
processLineContent(org.axsl.text.line.LineContent contentItem,
int start,
int end,
org.axsl.text.line.LineOutput output)
|
protected int |
processLineNonText(org.axsl.text.line.LineNonText nonTextItem)
Standard processing of non-text items for eager line breaking systems. |
protected abstract int |
processLineText(org.axsl.text.line.LineText lineText,
int start,
int end)
Processes a line-text item. |
void |
setCurrentLine(org.axsl.text.line.LineOutput line)
Sets the current line-output item. |
Methods inherited from class org.foray.text.line.LineBreaker |
---|
allowsLineBreak, canBreakMidWord, charWidth, forcesLineBreak, getCharWidth, getFontConsumer, getHandler, getHyphenWidth, getLineBreakControl, getLogger, getTextServer, getWordWidth, isInLowerCase, isLowerCase, isNonBreakingSpace, isSpace, isUpperCase, isWhitespace, isZeroWidthSpace, setInLowerCase |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EagerLineBreaker(TextServer4a server, org.axsl.text.line.LineBreakControl control, org.axsl.text.line.LineBreakHandler handler, org.axsl.font.FontConsumer fontConsumer)
server
- The "parent" TextServer.control
- The client object that provides process-time information,
specifically by providing line length information.handler
- The client object that is responsible for taking the
results of the line-breaking work and doing something with it.fontConsumer
- Provides the line-breaking system with the
FontConsumer instance that should be used for interfacing with the Font
subsystem.Method Detail |
---|
protected int processInput(org.axsl.text.line.LineContent lineContent, int start, int end) throws org.axsl.text.TextException
lineContent
- The line content to be processed.start
- The staring index in the line content to be processed.end
- The ending index in the line content to be processed.
org.axsl.text.TextException
- For errors during line-breaking.protected int processLineNonText(org.axsl.text.line.LineNonText nonTextItem) throws org.axsl.text.TextException
nonTextItem
- The non-text item that should be added to the current
line.
org.axsl.text.TextException
- For errors during processing.protected abstract int processLineText(org.axsl.text.line.LineText lineText, int start, int end) throws org.axsl.text.TextException
lineText
- The line-text item to be processed.start
- The index to the first character in the line-text item that
should be processed.end
- The index to the last character in the line-text item that
should be processed.
org.axsl.text.TextException
- For errors during line-breaking.public int addLineContent(org.axsl.text.line.LineContent content, int start, int end, org.axsl.text.line.LineOutput output) throws org.axsl.text.TextException
content
- The line-content to be processed.start
- The index to the first element in the line-content to be
processed.end
- The index to the last element in the line-content to be
processed.output
- The line-output onto which the text should be placed.
org.axsl.text.TextException
- For errors during text processing.protected org.axsl.text.line.LineOutput lineReceivingContent()
public int processLineContent(org.axsl.text.line.LineContent contentItem, int start, int end, org.axsl.text.line.LineOutput output) throws org.axsl.text.TextException
processLineContent
in interface org.axsl.text.line.EagerLineBreaker
org.axsl.text.TextException
public void setCurrentLine(org.axsl.text.line.LineOutput line)
line
- The new line-output item.public org.axsl.text.line.LineOutput getCurrentLine()
public org.axsl.text.line.LineContent getLineContent()
protected void overflowMessage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |