public class IlvProjectDocument extends IlvDataContainerDocument
IlvProjectDataContainer
instances.
Project documents manage a hierarchical tree of data, like references
to files or folders.DATA_CONTAINER_PROPERTY, NODE_DOCUMENTS_ATTACHED_PROPERTY
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 |
---|
IlvProjectDocument()
Constructs an empty
IlvProjectDocument . |
Modifier and Type | Method and Description |
---|---|
boolean |
canOpenDocument(Object node)
Determines whether a new document can be opened and associated with
the specified data container
node . |
protected IlvDataContainer |
createDataContainer(Object userData)
Factory method for creating a data container to associate with this
document.
|
protected IlvDocument |
createDocument(Object node)
Factory method for creating a document to associate with the specified
data container
node . |
protected void |
endInitializeDataContainer(IlvDataContainer dataContainer)
Finishes initializing the specified
dataContainer . |
protected void |
initializeDataContainer(IlvDataContainer dataContainer,
Object userData)
Initializes the specified
dataContainer . |
protected Object |
insertProjectReference(Object parent,
int index)
Inserts a reference node to this project document.
|
areNodeDocumentsAttached, attachNodeDocuments, getDataContainer, getNodeTitle, getOpenDocument, initializeDocument, openDocument, readDataContainer, readDocument, readDocument, setDataContainer, setNodeTitle, writeDataContainer, writeDocument, writeDocument
activated, getFileDocumentTemplate, getPathName, readStreamDocument, setPathName, writeStreamDocument
actionPerformed, addActionHandler, addEdit, addPropertyChangeListener, addView, attachDocument, canRedo, canUndo, clean, 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, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, isModified, removeView, removeViews, setModified, setTitle
isProcessingAction, updateAction
actionPerformed
receiveMessage
addPropertyChangeListener, getProperty, removePropertyChangeListener, setProperty
public IlvProjectDocument()
IlvProjectDocument
.protected IlvDataContainer createDataContainer(Object userData)
IlvProjectDataContainer
. It can be overridden to create
other data container types.createDataContainer
in class IlvDataContainerDocument
userData
- The user data parameter of the IlvDataContainerDocument.initializeDocument(java.lang.Object)
method or null
.IlvProjectDataContainer
instance.protected void initializeDataContainer(IlvDataContainer dataContainer, Object userData)
dataContainer
.
initializeDocument
method and after the method
createDataContainer(java.lang.Object)
has been called. By default, it creates
a project node that corresponds to this project document. The title of the
node is linked to the title of this document. When the title of the document
changes, the title of the node has its title updated accordingly.initializeDataContainer
in class IlvDataContainerDocument
dataContainer
- The data container to initialize.userData
- The user data parameter of the IlvDataContainerDocument.initializeDocument(java.lang.Object)
method or null
.IlvDataContainerDocument.endInitializeDataContainer(ilog.views.appframe.docview.project.IlvDataContainer)
protected Object insertProjectReference(Object parent, int index)
IlvProjectDataContainer.PROJECT_FILE_CATEGORY
and has
its title updated when the pathname of this document changes.parent
- The parent node of the newly created project node.index
- The insertion index of the newly created folder node
in the child array of the parent
node. If equal to
-1
, the folder will be added at the end of the
child array of the parent
node.protected void endInitializeDataContainer(IlvDataContainer dataContainer)
dataContainer
.
This method is called after the document and its associated
data container have been initialized, whether
by the IlvDataContainerDocument.initializeDocument(java.lang.Object)
or IlvDataContainerDocument.readDocument(Reader, IlvFileFilter)
method. By default, it adds listeners to the root project node of the
data container.endInitializeDataContainer
in class IlvDataContainerDocument
dataContainer
- The data container to finish initializing.IlvDataContainerDocument.initializeDataContainer(ilog.views.appframe.docview.project.IlvDataContainer, java.lang.Object)
protected IlvDocument createDocument(Object node)
node
.
This method is invoked by the IlvDataContainerDocument.openDocument(java.lang.Object)
method to create
a new document.createDocument
in class IlvDataContainerDocument
public boolean canOpenDocument(Object node)
node
.
node
does not correspond to the project root node, it will return true
.canOpenDocument
in class IlvDataContainerDocument
true
if the node
can be opened;
false
otherwise.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.