|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
proyecto.undo.SyntaxDocument
public class SyntaxDocument
Class SyntaxDocument.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.text.DefaultStyledDocument |
---|
DefaultStyledDocument.AttributeUndoableEdit, DefaultStyledDocument.ElementBuffer, DefaultStyledDocument.ElementSpec, DefaultStyledDocument.SectionElement |
Nested classes/interfaces inherited from class javax.swing.text.AbstractDocument |
---|
AbstractDocument.AbstractElement, AbstractDocument.AttributeContext, AbstractDocument.BranchElement, AbstractDocument.Content, AbstractDocument.DefaultDocumentEvent, AbstractDocument.ElementEdit, AbstractDocument.LeafElement |
Field Summary |
---|
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 | |
---|---|
SyntaxDocument()
Constructor syntax document. |
Method Summary | |
---|---|
protected String |
addMatchingBrace(int offset)
Aņade matching brace. |
protected String |
getEndDelimiter()
Obtener el end delimiter. |
protected String |
getEscapeString(String quoteDelimiter)
Obtener el escape string. |
protected String |
getSingleLineDelimiter()
Obtener el single line delimiter. |
protected String |
getStartDelimiter()
Obtener el start delimiter. |
void |
insertString(int offset,
String str,
AttributeSet a)
|
protected boolean |
isDelimiter(String character)
Verificamos si es delimiter. |
protected boolean |
isKeyword(String token)
Verificamos si es keyword. |
protected boolean |
isQuoteDelimiter(String character)
Verificamos si es quote delimiter. |
static void |
main(String[] a)
MÊtodo main. |
void |
processChangedLines(int offset,
int length)
Process changed lines. |
void |
remove(int offset,
int length)
|
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 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 SyntaxDocument()
Method Detail |
---|
public void insertString(int offset, String str, AttributeSet a) throws BadLocationException
insertString
in interface Document
insertString
in class AbstractDocument
BadLocationException
public void remove(int offset, int length) throws BadLocationException
remove
in interface Document
remove
in class AbstractDocument
BadLocationException
public void processChangedLines(int offset, int length) throws BadLocationException
offset
- offsetlength
- length
BadLocationException
- bad location exceptionprotected boolean isDelimiter(String character)
character
- the character
protected boolean isQuoteDelimiter(String character)
character
- the character
protected boolean isKeyword(String token)
token
- the token
protected String getStartDelimiter()
protected String getEndDelimiter()
protected String getSingleLineDelimiter()
protected String getEscapeString(String quoteDelimiter)
quoteDelimiter
- the quote delimiter
protected String addMatchingBrace(int offset) throws BadLocationException
offset
- the offset
BadLocationException
- the bad location exceptionpublic static void main(String[] a)
a
- the arguments
Creado : Parras, 07-oct-2009
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |