|
ReportCat 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectli.netcat.print.util.text.LineBreakStrategy
The LineBreakStrategy
is used to calculate the automatic line brakes of a text.
The default implementation breakes the lines at ' ' and '\n' and after a '-'.
You may implement your own strategy (by extending this class) and define it as the default strategy.
Constructor Summary | |
LineBreakStrategy()
|
Method Summary | |
abstract LineBreaker |
createLineBreaker(java.awt.Font font,
char[] text)
Creates a new instance of a line breaker that is able to break the given text that gets painted with the given font. |
static LineBreakStrategy |
getDefault()
Returns the default line break strategy. |
static void |
setDefault(LineBreakStrategy strategy)
Sets a new line brake strategy as the default strategy. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LineBreakStrategy()
Method Detail |
public static LineBreakStrategy getDefault()
public static void setDefault(LineBreakStrategy strategy)
strategy
- The new default strategy, not null.public abstract LineBreaker createLineBreaker(java.awt.Font font, char[] text)
font
- The font that is used to paint the text.text
- The text that should be broken in one or more lines. This parameter should not be modified.
|
ReportCat 1.1 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |