public class IlvAbstractFileDocument extends IlvAbstractDocument implements IlvFileDocument, IlvStreamDocument
Modifier and Type | Field and Description |
---|---|
static String |
PATHNAME_PROPERTY
Bound property name for storing the pathname of a document.
|
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 |
---|
IlvAbstractFileDocument()
Constructs a new
IlvAbstractFileDocument . |
Modifier and Type | Method and Description |
---|---|
void |
activated(boolean active)
Invoked when a view of the document has been activated or deactivated,
depending on the value of the
active parameter. |
protected IlvFileDocumentTemplate |
getFileDocumentTemplate()
Returns the template that has created this file document.
|
URL |
getPathName()
Returns the path of the document.
|
protected boolean |
readDocument(Reader reader,
IlvFileFilter filter)
Reads document data from the specified
reader . |
boolean |
readDocument(URL url,
IlvFileFilter filter)
Initializes the document data from the specified file
url . |
boolean |
readStreamDocument(Reader reader,
IlvFileFilter filter)
Initializes the document data from the specified
reader . |
void |
setPathName(URL path)
Sets the path of the document.
|
boolean |
writeDocument(URL url,
IlvFileFilter filter)
Stores the document data in the file with the specified
url . |
boolean |
writeDocument(Writer writer,
IlvFileFilter filter)
Writes the document data to the the specified
writer . |
boolean |
writeStreamDocument(Writer writer,
IlvFileFilter filter)
Stores the document data with the specified
writer . |
actionPerformed, addActionHandler, addEdit, addPropertyChangeListener, addView, attachDocument, canRedo, canUndo, clean, documentClosed, documentClosing, getActiveView, getApplication, getDocumentTemplate, getProperty, getTitle, getUndoManager, getView, getViewCount, getViews, initializeDocument, 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, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, initializeDocument, isModified, removeView, removeViews, setModified, setTitle
isProcessingAction, updateAction
actionPerformed
receiveMessage
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
public static final String PATHNAME_PROPERTY
public IlvAbstractFileDocument()
IlvAbstractFileDocument
.public URL getPathName()
getPathName
in interface IlvFileDocument
null
if the
document is not associated with a file.setPathName(java.net.URL)
public void setPathName(URL path)
setPathName
in interface IlvFileDocument
getPathName()
public boolean readDocument(URL url, IlvFileFilter filter)
url
.
By default, a reader is created from the specified URL and is given
as the parameter to the readDocument(Reader, IlvFileFilter)
method.readDocument
in interface IlvFileDocument
url
- The URL of the file from which the data must be read.filter
- The file filter that indicates the format to use for
reading the data.true
if the document could read its data;
false
otherwise.writeDocument(java.io.Writer, ilog.views.appframe.docview.IlvFileFilter)
public boolean readStreamDocument(Reader reader, IlvFileFilter filter)
reader
.
By default, the readDocument(Reader, IlvFileFilter)
method is invoked with the reader
as the parameter.readStreamDocument
in interface IlvStreamDocument
reader
- The reader to use for reading the document data.filter
- The file filter that indicates the format to use for
reading the data.true
if the document could read its data;
false
otherwise.writeStreamDocument(java.io.Writer, ilog.views.appframe.docview.IlvFileFilter)
protected boolean readDocument(Reader reader, IlvFileFilter filter)
reader
.
This method is invoked either by the
readDocument(java.net.URL, IlvFileFilter)
or by the readStreamDocument(Reader, IlvFileFilter)
method. By default, the implementation of this method is empty.reader
- The reader from which the document data is read.filter
- The file filter that indicates the format to use for
reading the data.true
if the document could read its data;
false
otherwise.readDocument(java.net.URL, IlvFileFilter)
public boolean writeDocument(Writer writer, IlvFileFilter filter)
writer
.
This method is invoked either by the
writeDocument(java.net.URL, IlvFileFilter)
or by the
writeStreamDocument(Writer, IlvFileFilter)
method. By default, the implementation of this method is empty.writer
- The writer to which the data of the document is written.filter
- The file filter that indicates the format to use for
writing the data.true
if the document could write its data;
false
otherwise.writeDocument(java.net.URL, IlvFileFilter)
public boolean writeDocument(URL url, IlvFileFilter filter)
url
.
By default, a writer is created from the specified URL and given
as the parameter to the writeDocument(Writer, IlvFileFilter)
method.writeDocument
in interface IlvFileDocument
url
- The URL of the file to which the data is written.filter
- The file filter that indicates the format to use for
writing the data.true
if the document could write its data;
false
otherwise.writeDocument(Writer, IlvFileFilter)
public boolean writeStreamDocument(Writer writer, IlvFileFilter filter)
writer
.
By default, the writeDocument(Writer, IlvFileFilter)
method is invoked with the writer
as the parameter.writeStreamDocument
in interface IlvStreamDocument
writer
- The writer to use for writing the document data.filter
- The file filter that indicates the format to use for
writing the data.true
if the document could write its data;
false
otherwise.writeDocument(Writer, IlvFileFilter)
public void activated(boolean active)
active
parameter.activated
in interface IlvDocument
activated
in class IlvAbstractDocument
active
- If true
, the document has been activated;
otherwise, the document has been deactivated.protected IlvFileDocumentTemplate getFileDocumentTemplate()
IlvDocument.getDocumentTemplate()
.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.