|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
cdx.scorebot.util.swing.MultiSyntaxDocument
cdx.scorebot.util.swing.LogSyntaxDocument
cdx.scorebot.util.swing.LogSyntaxDocumentFIFO
public class LogSyntaxDocumentFIFO
A special DefaultStyledDocument which limits the number of lines which it displays. Only the addText(), clearText(), and setText() methods may be used to alter the text in this text area or line limiting may not function properly.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class cdx.scorebot.util.swing.MultiSyntaxDocument |
---|
MultiSyntaxDocument.ATTR_TYPE |
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument |
---|
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement |
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument |
---|
javax.swing.text.AbstractDocument.AbstractElement, javax.swing.text.AbstractDocument.AttributeContext, javax.swing.text.AbstractDocument.BranchElement, javax.swing.text.AbstractDocument.Content, javax.swing.text.AbstractDocument.DefaultDocumentEvent, javax.swing.text.AbstractDocument.ElementEdit, javax.swing.text.AbstractDocument.LeafElement |
Field Summary |
---|
Fields inherited from class cdx.scorebot.util.swing.LogSyntaxDocument |
---|
DEFAULT_BOLD, DEFAULT_ERROR, DEFAULT_EVENT, DEFAULT_TITLE |
Fields inherited from class cdx.scorebot.util.swing.MultiSyntaxDocument |
---|
DEFAULT_COMMENT, DEFAULT_FONT_FAMILY, DEFAULT_FONT_SIZE, DEFAULT_KEYWORD, DEFAULT_NORMAL, DEFAULT_STRING |
Fields inherited from class javax.swing.text.DefaultStyledDocument |
---|
buffer, BUFFER_SIZE_DEFAULT |
Fields inherited from class javax.swing.text.AbstractDocument |
---|
BAD_LOCATION, BidiElementName, ContentElementName, ElementNameAttribute, listenerList, ParagraphElementName, SectionElementName |
Fields inherited from interface javax.swing.text.Document |
---|
StreamDescriptionProperty, TitleProperty |
Constructor Summary | |
---|---|
LogSyntaxDocumentFIFO()
create a LogSyntaxDocumentFIFO which is limited to 10 lines |
|
LogSyntaxDocumentFIFO(int numLines)
create a LogSyntaxDocumentFIFO which is limited to the specified number of lines (no column length limit) |
|
LogSyntaxDocumentFIFO(int numLines,
int numColumns)
create a LogSyntaxDocumentFIFO which is limited to the specified number of lines |
Method Summary | |
---|---|
void |
addText(java.lang.String t)
sets the text in this text area to the current text plus t (minus any truncated lines) |
void |
clearText()
clears all text from this text area |
java.lang.String |
getText()
gets the text in this text area |
void |
setText(java.lang.String t)
sets the text in this text area to t (minus any truncated lines) |
Methods inherited from class cdx.scorebot.util.swing.LogSyntaxDocument |
---|
getEndDelimiter, getStartDelimiter |
Methods inherited from class cdx.scorebot.util.swing.MultiSyntaxDocument |
---|
addKeyword, addMatchingBrace, clearKeywords, getEscapeString, getFontName, getFontSize, getKeywordFormatting, getSingleLineDelimiter, insertString, isDelimiter, isQuoteDelimiter, processChangedLines, remove, removeKeyword, setAttributeColor, setAttributeColor, setAttributeFont, setAttributeFont, setAttributeStyle, setFontName, setFontSize, setTabs |
Methods inherited from class javax.swing.text.DefaultStyledDocument |
---|
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged |
Methods inherited from class javax.swing.text.AbstractDocument |
---|
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireInsertUpdate, fireRemoveUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.text.Document |
---|
addUndoableEditListener, createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, removeUndoableEditListener, render |
Constructor Detail |
---|
public LogSyntaxDocumentFIFO()
public LogSyntaxDocumentFIFO(int numLines)
numLines
- maximum number of lines the document may contain (older lines are discarded)public LogSyntaxDocumentFIFO(int numLines, int numColumns)
numLines
- maximum number of lines the document may contain (older lines are discarded)numColumns
- maximum number of columns any line may contain (longer lines are split up)Method Detail |
---|
public void addText(java.lang.String t)
addText
in interface TextFieldFIFO
t
- the text add to the text areapublic void clearText()
clearText
in interface TextFieldFIFO
public java.lang.String getText()
getText
in interface TextFieldFIFO
public void setText(java.lang.String t)
setText
in interface TextFieldFIFO
t
- the text to put in the text area
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |