public class IlvTextDocument extends IlvAbstractFileDocument
javax.swing.text.Document
objects.PATHNAME_PROPERTYREDO_CMD, UNDO_CMDFILE_FILTER_PROPERTY, MRU_PROPERTYAPPLICATION_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, writeStreamDocumentactionPerformed, 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, updateModificationStateclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddView, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, isModified, removeView, removeViews, setModified, setTitleisProcessingAction, updateActionactionPerformedreceiveMessageaddPropertyChangeListener, getProperty, removePropertyChangeListener, setPropertypublic boolean initializeDocument(Object userData)
javax.swing.text.Document instance associated with this text
document will be set to this string.initializeDocument in interface IlvDocumentinitializeDocument in class IlvAbstractDocumentuserData - 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 IlvDocumentclean in class IlvAbstractDocumentprotected 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 IlvAbstractFileDocumentreader - 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 IlvAbstractFileDocumentwriter - 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.