public class TextLineBreakerStringWidth extends Object
Constructor and Description |
---|
TextLineBreakerStringWidth()
Create the LineBreaker
|
Modifier and Type | Method and Description |
---|---|
String[] |
breakLines(Reader textReader,
int width)
Break a Text into separate Lines
|
String[] |
breakLines(Reader textReader,
int width,
int maxLines)
Break a Text into separate Lines
|
int |
getStringWidth(String str)
Get the Width of a String
|
void |
setMinusWidth(int minusWidth)
Set the Width of a Minus Character
|
void |
setSpaceWidth(int spaceWidth)
Set the Width of a Space Character
|
public TextLineBreakerStringWidth()
public void setSpaceWidth(int spaceWidth)
spaceWidth
- new Space-Widthpublic void setMinusWidth(int minusWidth)
minusWidth
- new Minus-Widthpublic String[] breakLines(Reader textReader, int width) throws IOException
textReader
- Text to separatewidth
- Max-Width of each LineIOException
public String[] breakLines(Reader textReader, int width, int maxLines) throws IOException
textReader
- Text to separatewidth
- Max-Width of each LinemaxLines
- Max. amount of LinesIOException
public int getStringWidth(String str)
str
- get Width of this StringTV-Browser 2.7.6, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)