|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cdx.scorebot.util.StringFIFO
public class StringFIFO
This class contains a String which is limited to a certain number lines.
Constructor Summary | |
---|---|
StringFIFO(int maxLines)
initialize the FIFO string (will hide a trailing blank line if one exists) |
|
StringFIFO(int maxLines,
int maxCharsPerLine)
initialize the FIFO string (will hide a trailing blank line if one exists) |
|
StringFIFO(int maxLines,
int maxCharsPerLine,
boolean hideEndingBlankLines)
initialize the FIFO string |
Method Summary | |
---|---|
void |
addLine(java.lang.String s)
adds the specified string plus a newline to this object |
void |
addText(java.lang.String s)
adds the specified string to this object |
void |
clear()
Clear the text from the string |
int |
getMaxColumns()
gets the current max number of columns a line may have |
int |
getMaxLines()
gets the current max number of lines |
int |
length()
gets the length string (number of characters) |
void |
setMaxLines(int maxLines)
sets the current max number of lines |
int |
size()
gets the number of lines in this string |
java.lang.String |
text()
gets the current value of the string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public StringFIFO(int maxLines)
maxLines
- the maximum number of lines the string may contain (if
there are too many lines, those at the top of the string
are removed)public StringFIFO(int maxLines, int maxCharsPerLine)
maxLines
- the maximum number of lines the string may contain (if
there are too many lines, those at the top of the string
are removed)maxCharsPerLine
- the maximum number of columns any line may contain (if
there are too many columns, the line will be split up
into multiple lines)public StringFIFO(int maxLines, int maxCharsPerLine, boolean hideEndingBlankLines)
maxLines
- the maximum number of lines the string may contain (if
there are too many lines, those at the top of the string
are removed)maxCharsPerLine
- the maximum number of columns any line may contain (if
there are too many columns, the line will be split up
into multiple lines)hideEndingBlankLines
- whether or not a trailing, blank line should
count against the limit and be shown in the
string. If true, if there is a trailing blank
line at the end of a string being added, it
will be queued (not in the string) until text
is added to that line. Only the last blank
white line is treated in this manner; if there
are multiple blank white lines, all of them
except the last one will be part of the string.Method Detail |
---|
public void addLine(java.lang.String s)
s
- the string to addpublic void addText(java.lang.String s)
s
- the string to addpublic void clear()
public int length()
public int size()
public int getMaxColumns()
public int getMaxLines()
public void setMaxLines(int maxLines)
maxLines
- maximum number of lines to limit this string topublic java.lang.String text()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |