public class IlvTextDocument extends IlvAbstractFileDocument
javax.swing.text.Document
objects.PATHNAME_PROPERTY
REDO_CMD, UNDO_CMD
FILE_FILTER_PROPERTY, MRU_PROPERTY
APPLICATION_PROPERTY, ATTACHED_DOCUMENTS_PROPERTY, DOCUMENT_OWNER_PROPERTY, DOCUMENT_TEMPLATE_PROPERTY, EDITABLE_PROPERTY, MODIFIED_PROPERTY, SAVEABLE_PROPERTY, TITLE_PROPERTY
Constructor and Description |
---|
IlvTextDocument()
Constructs a new empty
IlvTextDocument . |
Modifier and Type | Method and Description |
---|---|
void |
clean()
Cleans up the document.
|
protected Document |
createTextDocument()
Factory method for creating a
javax.swing.text.Document instance
to associate with the text document. |
Document |
getTextDocument()
Returns the
Document instance associated with
this document. |
boolean |
initializeDocument(Object userData)
Initializes a new text document.
|
protected void |
initializeTextDocument(Document document)
Initializes a new created text document.
|
protected boolean |
readDocument(Reader reader,
IlvFileFilter filter)
Reads the text of the document data from the specified
reader . |
boolean |
writeDocument(Writer writer,
IlvFileFilter filter)
Writes the document text to the specified
writer . |
activated, getFileDocumentTemplate, getPathName, readDocument, readStreamDocument, setPathName, writeDocument, writeStreamDocument
actionPerformed, addActionHandler, addEdit, addPropertyChangeListener, addView, attachDocument, canRedo, canUndo, documentClosed, documentClosing, getActiveView, getApplication, getDocumentTemplate, getProperty, getTitle, getUndoManager, getView, getViewCount, getViews, isModified, isProcessingAction, notifyViews, receiveMessage, redo, registerMappings, removeActionHandler, removePropertyChangeListener, removeView, removeViews, setApplication, setModified, setProperty, setTitle, undo, updateAction, updateModificationState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addView, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, isModified, removeView, removeViews, setModified, setTitle
isProcessingAction, updateAction
actionPerformed
receiveMessage
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
public boolean initializeDocument(Object userData)
javax.swing.text.Document
instance associated with this text
document will be set to this string.initializeDocument
in interface IlvDocument
initializeDocument
in class IlvAbstractDocument
userData
- The user data to initialize the document with; can be
null
.true
: an overridden method returns true
if the document was successfully initialized, false
otherwise.createTextDocument()
,
IlvApplication.newDocument(java.lang.Object, boolean)
,
IlvApplication.newDocument()
,
IlvApplication.newDocument(IlvDocumentTemplate, boolean, Object)
public void clean()
Called before the document closes or before the document is initialized
with new data if the document template of the document is not MDI. (See
IlvDocumentTemplate.isMDI()
).
clean
in interface IlvDocument
clean
in class IlvAbstractDocument
protected boolean readDocument(Reader reader, IlvFileFilter filter)
reader
.
If a javax.swing.text.Document
instance has not been
initialized for the document, it is created with the method
createTextDocument()
and initialized with the method
initializeTextDocument(javax.swing.text.Document)
.
reader
is then set to
this javax.swing.text.Document
instance.readDocument
in class IlvAbstractFileDocument
reader
- The reader to read document text from.filter
- Parameter not used by default.true
if the document could read its data;
false
otherwise.createTextDocument()
public boolean writeDocument(Writer writer, IlvFileFilter filter)
writer
.writeDocument
in class IlvAbstractFileDocument
writer
- The writer to write the data of the document to.filter
- Parameter not used by default.true
if the document could write its data;
false
otherwise.IlvAbstractFileDocument.writeDocument(java.net.URL, IlvFileFilter)
public Document getTextDocument()
Document
instance associated with
this document.protected Document createTextDocument()
javax.swing.text.Document
instance
to associate with the text document.protected void initializeTextDocument(Document document)
document
- The new text document to initialize.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.