ilog.views.appframe.docview.project
Class IlvProjectDocument

java.lang.Object
  extended by ilog.views.appframe.docview.IlvAbstractDocument
      extended by ilog.views.appframe.docview.IlvAbstractFileDocument
          extended by ilog.views.appframe.docview.project.IlvDataContainerDocument
              extended by ilog.views.appframe.docview.project.IlvProjectDocument
All Implemented Interfaces:
IlvDocument, IlvFileDocument, IlvStreamDocument, IlvDataContainerProvider, ActionHandler, MessageListener, IlvPropertyManager, ActionListener, EventListener
Direct Known Subclasses:
IlvWorkspaceDocument

public class IlvProjectDocument
extends IlvDataContainerDocument

Defines data container documents that are associated with IlvProjectDataContainer instances. Project documents manage a hierarchical tree of data, like references to files or folders.


Field Summary
 
Fields inherited from class ilog.views.appframe.docview.project.IlvDataContainerDocument
DATA_CONTAINER_PROPERTY, NODE_DOCUMENTS_ATTACHED_PROPERTY
 
Fields inherited from class ilog.views.appframe.docview.IlvAbstractFileDocument
PATHNAME_PROPERTY
 
Fields inherited from class ilog.views.appframe.docview.IlvAbstractDocument
REDO_CMD, UNDO_CMD
 
Fields inherited from interface ilog.views.appframe.docview.IlvFileDocument
FILE_FILTER_PROPERTY, MRU_PROPERTY
 
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
 
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
 
Constructor Summary
IlvProjectDocument()
          Constructs an empty IlvProjectDocument.
 
Method Summary
 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.
 
Methods inherited from class ilog.views.appframe.docview.project.IlvDataContainerDocument
areNodeDocumentsAttached, attachNodeDocuments, getDataContainer, getNodeTitle, getOpenDocument, initializeDocument, openDocument, readDataContainer, readDocument, readDocument, setDataContainer, setNodeTitle, writeDataContainer, writeDocument, writeDocument
 
Methods inherited from class ilog.views.appframe.docview.IlvAbstractFileDocument
activated, getFileDocumentTemplate, getPathName, readStreamDocument, setPathName, writeStreamDocument
 
Methods inherited from class ilog.views.appframe.docview.IlvAbstractDocument
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.views.appframe.docview.IlvDocument
addView, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, 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
 
Methods inherited from interface ilog.views.appframe.docview.IlvDocument
addView, clean, documentClosed, documentClosing, getApplication, getDocumentTemplate, getTitle, getView, getViewCount, 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
 

Constructor Detail

IlvProjectDocument

public IlvProjectDocument()
Constructs an empty IlvProjectDocument.

Method Detail

createDataContainer

protected IlvDataContainer createDataContainer(Object userData)
Factory method for creating a data container to associate with this document. By default, the method creates an instance of IlvProjectDataContainer. It can be overridden to create other data container types.

Overrides:
createDataContainer in class IlvDataContainerDocument
Parameters:
userData - The user data parameter of the IlvDataContainerDocument.initializeDocument(java.lang.Object) method or null.
Returns:
The newly created IlvProjectDataContainer instance.

initializeDataContainer

protected void initializeDataContainer(IlvDataContainer dataContainer,
                                       Object userData)
Initializes the specified dataContainer.
This method is called when the document is initializing from the 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.

Overrides:
initializeDataContainer in class IlvDataContainerDocument
Parameters:
dataContainer - The data container to initialize.
userData - The user data parameter of the IlvDataContainerDocument.initializeDocument(java.lang.Object) method or null.
See Also:
IlvDataContainerDocument.endInitializeDataContainer(ilog.views.appframe.docview.project.IlvDataContainer)

insertProjectReference

protected Object insertProjectReference(Object parent,
                                        int index)
Inserts a reference node to this project document. The new created node has the category IlvProjectDataContainer.PROJECT_FILE_CATEGORY and has its title updated when the pathname of this document changes.

Parameters:
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.
Returns:
The newly created project reference node.

endInitializeDataContainer

protected void endInitializeDataContainer(IlvDataContainer dataContainer)
Finishes initializing the specified 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.

Overrides:
endInitializeDataContainer in class IlvDataContainerDocument
Parameters:
dataContainer - The data container to finish initializing.
See Also:
IlvDataContainerDocument.initializeDataContainer(ilog.views.appframe.docview.project.IlvDataContainer, java.lang.Object)

createDocument

protected IlvDocument createDocument(Object node)
Factory method for creating a document to associate with the specified data container node. This method is invoked by the IlvDataContainerDocument.openDocument(java.lang.Object) method to create a new document.

Overrides:
createDocument in class IlvDataContainerDocument
Returns:
The newly created document.

canOpenDocument

public boolean canOpenDocument(Object node)
Determines whether a new document can be opened and associated with the specified data container node.
If the specified node does not correspond to the project root node, it will return true.

Overrides:
canOpenDocument in class IlvDataContainerDocument
Returns:
true if the node can be opened; false otherwise.


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