diva.gui
Interface DocumentFactory

All Known Implementing Classes:
GraphDocument.Factory, SketchDocument.Factory, TextDocument.Factory

public interface DocumentFactory

DocumentFactory is an factory interface that creates Document objects. It is used by the Open action to create a new document in response to user selection of a file or URL.

Version:
$Revision: 1.5 $
Author:
John Reekie (johnr@eecs.berkeley.edu)

Method Summary
 Document createDocument(Application app)
          Create a new empty document.
 Document createDocument(Application app, File file)
          Create a new document based on the given file path.
 Document createDocument(Application app, URL url)
          Create a new document based on the given URL.
 

Method Detail

createDocument

Document createDocument(Application app)
Create a new empty document.


createDocument

Document createDocument(Application app,
                        URL url)
Create a new document based on the given URL. Typically, this method will parse the contents of the URL and create a Document object containing the parsed form of those contents.


createDocument

Document createDocument(Application app,
                        File file)
Create a new document based on the given file path. Typically, this method will parse the contents of the file and create a Document object containing the parsed form of those contents.



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.