|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.enough.polish.util.WrappedText
public class WrappedText
Contains wrapped text and additional meta information about it.
Copyright Enough Software 2010
| Constructor Summary | |
|---|---|
WrappedText()
Creates a new wrapped text object |
|
WrappedText(WrappedText original)
Creates a new wrapped text object by copying values from the given one |
|
| Method Summary | |
|---|---|
void |
addAll(WrappedText original)
Adds all content from the given wrapped text |
void |
addLine(String line,
int width)
Adds a wrapped line |
void |
clear()
Clears this list. |
String |
getLine(int index)
Retrieves the line at the specified index |
String[] |
getLines()
Retrieves the lines of this wrapped text |
Object[] |
getLinesInternalArray()
Retrieves the lines of this wrapped text |
int |
getLineWidth(int index)
Retrieves the line width at the specified index |
int[] |
getLineWidths()
Retrieves the widths of the lines of this wrapped text |
int[] |
getLineWidthsInternalArray()
Retrieves the widths of lines of this wrapped text. |
int |
getMaxLineWidth()
Retrieves the maximum line width |
void |
read(DataInputStream in)
Restores the internal instance fields from the given input stream. |
void |
removeLine(int index)
Removes the specified line |
void |
setLine(int index,
String line)
Sets a line without changing it's width |
void |
setLine(int index,
String line,
int width)
Sets a line |
void |
setMaxLineWidth(int width)
Sets a the width of the widest line within this wrapped text. |
int |
size()
Retrieves the number of text lines in this wrapped text |
void |
write(DataOutputStream out)
Stores the internal instance fields to the output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public WrappedText()
public WrappedText(WrappedText original)
original - the wrapped text that should be copied| Method Detail |
|---|
public void addAll(WrappedText original)
original - the wrapped text that should be copied into this one
public void addLine(String line,
int width)
line - the linewidth - the width of the line
public void setLine(int index,
String line)
index - index of the lineline - the line
public void setLine(int index,
String line,
int width)
index - index of the lineline - the linewidth - the width of the linepublic void clear()
public String[] getLines()
public Object[] getLinesInternalArray()
size()public int[] getLineWidths()
public int[] getLineWidthsInternalArray()
size()public int size()
public String getLine(int index)
index - the index, [0..size()[
public int getLineWidth(int index)
index - the index, [0..size()[
public int getMaxLineWidth()
public void setMaxLineWidth(int width)
width - the widthpublic void removeLine(int index)
index - the index of the line
public void write(DataOutputStream out)
throws IOException
Externalizable
write in interface Externalizableout - the output stream to which instance fields should be written
IOException - when writing fails
public void read(DataInputStream in)
throws IOException
Externalizable
read in interface Externalizablein - the input stream from which the data is loaded
IOException - when reading fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||