com.infoengine.modeler.UI
Class EditorTextComponent.IEStyledDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
com.infoengine.modeler.UI.EditorTextComponent.IEStyledDocument
- All Implemented Interfaces:
- Document, EventListener, KeyListener, Serializable, StyledDocument
- Enclosing class:
- EditorTextComponent
- class EditorTextComponent.IEStyledDocument
- extends DefaultStyledDocument
- implements KeyListener
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, setLogicalStyle, setParagraphAttributes, styleChanged |
Methods inherited from class javax.swing.text.AbstractDocument |
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, remove, 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 |
createPosition, getEndPosition, getLength, getProperty, getRootElements, getStartPosition, getText, getText, putProperty, remove, render |
STYLE_REGULAR
private Style STYLE_REGULAR
STYLE_COMMENT
private Style STYLE_COMMENT
STYLE_XMLATTR
private Style STYLE_XMLATTR
STYLE_XMLATTRVAL
private Style STYLE_XMLATTRVAL
STYLE_XMLELEMENTNAME
private Style STYLE_XMLELEMENTNAME
STYLE_XMLEQUALS
private Style STYLE_XMLEQUALS
STYLE_SCRIPTLET
private Style STYLE_SCRIPTLET
jtp
private JTextPane jtp
undoListeners
private Vector undoListeners
tagOpened
private boolean tagOpened
embeddedTag
private boolean embeddedTag
testEmbedded
private boolean testEmbedded
styleStack
private Stack styleStack
tagStyleStack
private Stack tagStyleStack
startStack
private Stack startStack
charStack
private EditorTextComponent.ShortCharStack charStack
previousStyle
private Style previousStyle
testQuote
private boolean testQuote
unquotedAttrVal
private boolean unquotedAttrVal
OPEN_QUOTE
private char OPEN_QUOTE
timer
Timer timer
EditorTextComponent.IEStyledDocument
EditorTextComponent.IEStyledDocument(JTextPane jtp)
setStyles
void setStyles()
initStyles
void initStyles()
regetStyles
void regetStyles()
restyle
void restyle()
restyle
void restyle(String s,
int start)
addUndoableEditListener
public void addUndoableEditListener(UndoableEditListener listener)
- Specified by:
addUndoableEditListener
in interface Document
removeUndoableEditListener
public void removeUndoableEditListener(UndoableEditListener listener)
- Specified by:
removeUndoableEditListener
in interface Document
setCharacterAttributes
public void setCharacterAttributes(int offset,
int length,
AttributeSet set,
boolean replace)
- Specified by:
setCharacterAttributes
in interface StyledDocument
insertString
public void insertString(int offset,
String string,
AttributeSet attributes)
throws BadLocationException
- Specified by:
insertString
in interface Document
- Throws:
BadLocationException
reset
private void reset()
whatStyle
private String whatStyle(Style s)
applyStyle
private boolean applyStyle(Style s,
int start,
int end)
processChar
private boolean processChar(char c,
int loc)
reparse
private void reparse()
doReparse
void doReparse()
keyPressed
public void keyPressed(KeyEvent e)
- Specified by:
keyPressed
in interface KeyListener
keyReleased
public void keyReleased(KeyEvent e)
- Specified by:
keyReleased
in interface KeyListener
keyTyped
public void keyTyped(KeyEvent e)
- Specified by:
keyTyped
in interface KeyListener