public class HighlightedDocument
extends javax.swing.text.DefaultStyledDocument
Modifier and Type | Class and Description |
---|---|
class |
HighlightedDocument.DocumentReader |
javax.swing.text.DefaultStyledDocument.AttributeUndoableEdit, javax.swing.text.DefaultStyledDocument.ElementBuffer, javax.swing.text.DefaultStyledDocument.ElementSpec, javax.swing.text.DefaultStyledDocument.SectionElement
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
Constructor and Description |
---|
HighlightedDocument(ProofAsst proofAsst,
ProofAsstPreferences prefs) |
Modifier and Type | Method and Description |
---|---|
void |
clearChanged() |
void |
color(int position,
int adjustment)
Color a section of the document.
|
void |
colorAll()
Color or recolor the entire document
|
protected void |
fireInsertUpdate(javax.swing.event.DocumentEvent e) |
protected void |
fireRemoveUpdate(javax.swing.event.DocumentEvent e) |
HighlightedDocument.DocumentReader |
getDocumentReader() |
int |
getLastCaretPosition() |
int |
getLineCount() |
int |
getLineOfOffset(int i) |
int |
getLineStartOffset(int row) |
void |
getText(int offset,
int length,
javax.swing.text.Segment txt) |
javax.swing.JTextPane |
getTextPane() |
WorksheetTokenizer |
getTokenizer() |
void |
insertString(int offs,
java.lang.String str,
javax.swing.text.AttributeSet a)
Intercept inserts and removes to color them.
|
boolean |
isChanged() |
boolean |
isProgrammatic() |
void |
remove(int offs,
int len) |
void |
setTextProgrammatic(java.lang.String text,
java.awt.Point blockUntil,
boolean smart,
boolean reset) |
addDocumentListener, addStyle, create, createDefaultRoot, getBackground, getCharacterElement, getDefaultRootElement, getFont, getForeground, getLogicalStyle, getParagraphElement, getStyle, getStyleNames, insert, insertUpdate, removeDocumentListener, removeElement, removeStyle, removeUpdate, setCharacterAttributes, setLogicalStyle, setParagraphAttributes, styleChanged
addUndoableEditListener, createBranchElement, createLeafElement, createPosition, dump, fireChangedUpdate, fireUndoableEditUpdate, getAsynchronousLoadPriority, getAttributeContext, getBidiRootElement, getContent, getCurrentWriter, getDocumentFilter, getDocumentListeners, getDocumentProperties, getEndPosition, getLength, getListeners, getProperty, getRootElements, getStartPosition, getText, getUndoableEditListeners, postRemoveUpdate, putProperty, readLock, readUnlock, removeUndoableEditListener, render, replace, setAsynchronousLoadPriority, setDocumentFilter, setDocumentProperties, writeLock, writeUnlock
public HighlightedDocument(ProofAsst proofAsst, ProofAsstPreferences prefs)
public void colorAll()
public void color(int position, int adjustment)
position
- the starting point for the coloring.adjustment
- amount of text inserted or removed at the starting
point.public void insertString(int offs, java.lang.String str, javax.swing.text.AttributeSet a) throws javax.swing.text.BadLocationException
insertString
in interface javax.swing.text.Document
insertString
in class javax.swing.text.AbstractDocument
javax.swing.text.BadLocationException
public void remove(int offs, int len) throws javax.swing.text.BadLocationException
remove
in interface javax.swing.text.Document
remove
in class javax.swing.text.AbstractDocument
javax.swing.text.BadLocationException
public void getText(int offset, int length, javax.swing.text.Segment txt) throws javax.swing.text.BadLocationException
getText
in interface javax.swing.text.Document
getText
in class javax.swing.text.AbstractDocument
javax.swing.text.BadLocationException
protected void fireInsertUpdate(javax.swing.event.DocumentEvent e)
fireInsertUpdate
in class javax.swing.text.AbstractDocument
protected void fireRemoveUpdate(javax.swing.event.DocumentEvent e)
fireRemoveUpdate
in class javax.swing.text.AbstractDocument
public HighlightedDocument.DocumentReader getDocumentReader()
public WorksheetTokenizer getTokenizer()
public javax.swing.JTextPane getTextPane()
public int getLastCaretPosition()
public boolean isProgrammatic()
public boolean isChanged()
public void clearChanged()
public void setTextProgrammatic(java.lang.String text, java.awt.Point blockUntil, boolean smart, boolean reset)
public int getLineStartOffset(int row)
public int getLineOfOffset(int i)
public int getLineCount()