ilog.views.appframe.docview
Interface IlvFileDocument

All Superinterfaces:
ActionHandler, ActionListener, EventListener, IlvDocument, IlvPropertyManager, MessageListener
All Known Implementing Classes:
IlvAbstractFileDocument, IlvDataContainerDocument, IlvDOMDocument, IlvProjectDocument, IlvTextDocument, IlvWorkspaceDocument

public interface IlvFileDocument
extends IlvDocument

Defines documents that are initialized from files.


Field Summary
static String FILE_FILTER_PROPERTY
          Bound property for storing the file filter that was used when reading the file of the document.
static String MRU_PROPERTY
          Bound property name that specifies whether the pathname of the file document should be stored in the Most Recently Used file list of the application.
 
Fields inherited from interface ilog.views.appframe.docview.IlvDocument
APPLICATION_PROPERTY, ATTACHED_DOCUMENTS_PROPERTY, DOCUMENT_OWNER_PROPERTY, DOCUMENT_TEMPLATE_PROPERTY, EDITABLE_PROPERTY, MODIFIED_PROPERTY, SAVEABLE_PROPERTY, TITLE_PROPERTY
 
Method Summary
 URL getPathName()
          Returns the path of the document.
 boolean readDocument(URL url, IlvFileFilter filter)
          Initializes the document data from the specified file url.
 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.
 
Methods inherited from interface ilog.views.appframe.docview.IlvDocument
activated, addView, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, initializeDocument, isModified, removeView, removeViews, setModified, setTitle
 
Methods inherited from interface ilog.views.appframe.event.ActionHandler
isProcessingAction, updateAction
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 
Methods inherited from interface ilog.views.appframe.event.MessageListener
receiveMessage
 
Methods inherited from interface ilog.views.appframe.util.IlvPropertyManager
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
 

Field Detail

FILE_FILTER_PROPERTY

static final String FILE_FILTER_PROPERTY
Bound property for storing the file filter that was used when reading the file of the document.

See Also:
Constant Field Values

MRU_PROPERTY

static final String MRU_PROPERTY
Bound property name that specifies whether the pathname of the file document should be stored in the Most Recently Used file list of the application.

If this property is not set or its value is equal to Boolean.TRUE, the pathname of the file document is automatically stored in the MRU list of the application. Otherwise, the pathname of the file document is not stored in the MRU list of the application.

See Also:
IlvApplication.openDocumentFile(String, boolean, boolean), Constant Field Values
Method Detail

getPathName

URL getPathName()
Returns the path of the document.

Returns:
The path of the document or null if the document is not associated with a file.
See Also:
setPathName(java.net.URL)

setPathName

void setPathName(URL path)
Sets the path of the document. This method must not be invoked explicitly, it is called by the document template of the document after the document has read its data from a file or after the document has saved its data in a new specified pathname.

See Also:
getPathName()

readDocument

boolean readDocument(URL url,
                     IlvFileFilter filter)
Initializes the document data from the specified file url.

Parameters:
url - The file URL to read data from.
filter - The file filter that indicates the format to use for reading the data.
Returns:
true if the document could read its data; false otherwise.
See Also:
writeDocument(java.net.URL, ilog.views.appframe.docview.IlvFileFilter)

writeDocument

boolean writeDocument(URL url,
                      IlvFileFilter filter)
Stores the document data in the file with the specified url.

Parameters:
url - The file URL of the file to write data into.
filter - The file filter that indicates the format to use for writing the data.
Returns:
true if document data could write its data; false otherwise.
See Also:
readDocument(java.net.URL, ilog.views.appframe.docview.IlvFileFilter)


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.