Package com.gargoylesoftware.base.util
Class DocumentUtil.PassthroughDocument
java.lang.Object
com.gargoylesoftware.base.util.DocumentUtil.PassthroughDocument
- All Implemented Interfaces:
Document
- Direct Known Subclasses:
DocumentUtil.LengthLimitedDocument
- Enclosing class:
DocumentUtil
A document that merely passes all requests through to another document.
This is used as the base class for the custom documents provided here.
-
Field Summary
FieldsFields inherited from interface javax.swing.text.Document
StreamDescriptionProperty, TitleProperty
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDocumentListener
(DocumentListener listener) void
addUndoableEditListener
(UndoableEditListener listener) createPosition
(int offs) int
getProperty
(Object key) Element[]
getText
(int offset, int length) void
void
insertString
(int offset, String str, AttributeSet a) void
putProperty
(Object key, Object value) void
remove
(int offs, int len) void
removeDocumentListener
(DocumentListener listener) void
void
-
Field Details
-
delegate_
-
-
Constructor Details
-
PassthroughDocument
Create an instance- Parameters:
delegate
- The document to wrap.
-
-
Method Details
-
getLength
public int getLength() -
addDocumentListener
- Specified by:
addDocumentListener
in interfaceDocument
-
removeDocumentListener
- Specified by:
removeDocumentListener
in interfaceDocument
-
addUndoableEditListener
- Specified by:
addUndoableEditListener
in interfaceDocument
-
removeUndoableEditListener
- Specified by:
removeUndoableEditListener
in interfaceDocument
-
getProperty
- Specified by:
getProperty
in interfaceDocument
-
putProperty
- Specified by:
putProperty
in interfaceDocument
-
remove
- Specified by:
remove
in interfaceDocument
- Throws:
BadLocationException
-
insertString
- Specified by:
insertString
in interfaceDocument
- Throws:
BadLocationException
-
getText
- Specified by:
getText
in interfaceDocument
- Throws:
BadLocationException
-
getText
- Specified by:
getText
in interfaceDocument
- Throws:
BadLocationException
-
getStartPosition
- Specified by:
getStartPosition
in interfaceDocument
-
getEndPosition
- Specified by:
getEndPosition
in interfaceDocument
-
createPosition
- Specified by:
createPosition
in interfaceDocument
- Throws:
BadLocationException
-
getRootElements
- Specified by:
getRootElements
in interfaceDocument
-
getDefaultRootElement
- Specified by:
getDefaultRootElement
in interfaceDocument
-
render
-