diva.gui
Interface DocumentFactory

All Known Implementing Classes:
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:
$Id: DocumentFactory.java,v 1.6 2004/04/13 18:48:01 cxh Exp $
Author:
John Reekie

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

Method Detail

createDocument

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


createDocument

public Document createDocument(Application app,
                               java.net.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

public Document createDocument(Application app,
                               java.io.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.