edu.princeton.swing.text
public class DefaultHighlightedDocument extends HighlightedDocument
HighlightedDocument.Position, HighlightedDocument.PositionTriplet, HighlightedDocument.UndoableEdit
Modifier and Type | Field and Description |
---|---|
static byte |
STYLE_PLAIN
The only style in a DefaultHighlightedDocument.
|
CHARACTER_ALLOWED, charCount, chars, charStyles, lineCount, lineOffsets, MAX_ALLOWED_CHARACTER, maxLineLength
Constructor and Description |
---|
DefaultHighlightedDocument()
Constructs a DefaultHighlightedDocument.
|
DefaultHighlightedDocument(java.lang.String text)
Constructs a DefaultHighlightedDocument.
|
Modifier and Type | Method and Description |
---|---|
protected void |
assignStyles()
Updates the charStyles array based on chars, charCount, lineOffsets, and lineCount.
|
int |
getStyleCount()
Returns the number of distinct styles used by this type of document.
|
int |
getTabSize()
Returns the number of spaces to replace all tabs with.
|
addTextListener, addUndoableEditListener, allowRender, coordinateToOffset, coordinateToOffset, createPosition, createPositionTriplet, filterString, freePosition, freePositionTriplet, getLength, getLineCount, getMaxLineLength, getPositionOffsets, getText, getText, getWordBounds, insertString, offsetToCoordinate, readLock, readUnlock, remove, removeTextListener, removeUndoableEditListener, replace, replace, setText, utilReplace, writeLock, writeUnlock
public static final byte STYLE_PLAIN
public DefaultHighlightedDocument()
public DefaultHighlightedDocument(java.lang.String text)
public int getStyleCount()
getStyleCount
in class HighlightedDocument
public int getTabSize()
getTabSize
in class HighlightedDocument
protected void assignStyles()
assignStyles
in class HighlightedDocument