tudresden.ocl.gui
Class OCLEditor.OCLEditorDocument
java.lang.Object
javax.swing.text.AbstractDocument
javax.swing.text.DefaultStyledDocument
tudresden.ocl.gui.OCLEditor.OCLEditorDocument
- All Implemented Interfaces:
- Document, Serializable, StyledDocument
- Enclosing class:
- OCLEditor
- protected static class OCLEditor.OCLEditorDocument
- extends DefaultStyledDocument
A specialized styled document that will prevent editing of portions of text
which have been specially marked "allowEdit"==FALSE.
- See Also:
- Serialized Form
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 |
m_nDoCheckUneditable
private int m_nDoCheckUneditable
- If >= 0,
checkEditLocation(int, int)
will throw a
BadLocationException
on attempts to remove or modify elements
which are marked "allowEdit"==FALSE.
OCLEditor.OCLEditorDocument
protected OCLEditor.OCLEditorDocument()
insertString
public void insertString(int offset,
String str,
AttributeSet a)
throws BadLocationException
- Throws:
BadLocationException
remove
public void remove(int offset,
int length)
throws BadLocationException
- Throws:
BadLocationException
stopChecking
public void stopChecking()
- Stop checking for uneditable elements. Must be paired with calls to
restartChecking()
.
restartChecking
public void restartChecking()
- Restart checking for uneditable elements. Must be paired with calls to
stopChecking()
.
checkEditLocation
protected void checkEditLocation(int offset,
int length)
throws BadLocationException
- Check the edit range for intersection with any elements that are marked
uneditable.
- Throws:
BadLocationException
getNeighbouringElement
protected Element getNeighbouringElement(Element e)
Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.