diva.whiteboard
Class SketchDocument.Factory

java.lang.Object
  extended by diva.whiteboard.SketchDocument.Factory
All Implemented Interfaces:
DocumentFactory
Enclosing class:
SketchDocument

public static class SketchDocument.Factory
extends Object
implements DocumentFactory

SketchDocument.Factory is a factory for sketch documents. We put this in an inner class of SketchDocument because this factory can only produce one kind of document.


Constructor Summary
SketchDocument.Factory()
           
 
Method Summary
 Document createDocument(Application app)
          Create an empty sketch document
 Document createDocument(Application app, File file)
          Create a new sketch that contains the given file path.
 Document createDocument(Application app, URL url)
          Throw an exception, as URLs are not supported.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SketchDocument.Factory

public SketchDocument.Factory()
Method Detail

createDocument

public Document createDocument(Application app)
Create an empty sketch document

Specified by:
createDocument in interface DocumentFactory

createDocument

public Document createDocument(Application app,
                               URL url)
Throw an exception, as URLs are not supported.

Specified by:
createDocument in interface DocumentFactory

createDocument

public Document createDocument(Application app,
                               File file)
Create a new sketch that contains the given file path.

Specified by:
createDocument in interface DocumentFactory


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