public abstract class MultipageDocument extends AbstractDocument
Modifier and Type | Field and Description |
---|---|
(package private) ModelParser |
_modelParser
This parser is used by the document parser to read in each
model in a page.
|
(package private) ModelWriter |
_modelWriter
This writer is used by the document writer to write out each
model in a page.
|
(package private) MultipageParser |
_parser
The parser that reads in a document and parses it into a
Document structure.
|
(package private) java.lang.String |
_title
The title associated with this document.
|
(package private) MultipageWriter |
_writer
The writer that can write this document to a stream during a
save operation.
|
Constructor and Description |
---|
MultipageDocument(java.lang.String title,
Application a,
ModelParser parser,
ModelWriter writer)
Construct a multipage document that is owned by the given application
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the document.
|
MultipageModel |
getMultipageModel()
Return the model associated with this document.
|
java.lang.String |
getTitle()
Return the title of this document.
|
void |
open()
Open the document from its current file.
|
void |
save()
Save the document to the current file.
|
void |
saveAs(java.io.File file)
Save the document to the given file.
|
void |
saveAs(java.net.URL url)
Throw an exception, as save to URLs is not supported.
|
addPropertyChangeListener, getApplication, getEditSupport, getFile, getShortTitle, getUndoManager, getURL, isDirty, isEditable, isWritable, removePropertyChangeListener, setDirty, setEditable, setFile, setURL, setWritable
MultipageWriter _writer
MultipageParser _parser
ModelWriter _modelWriter
ModelParser _modelParser
java.lang.String _title
public MultipageDocument(java.lang.String title, Application a, ModelParser parser, ModelWriter writer)
public void close() throws java.lang.Exception
close
in interface Document
close
in class AbstractDocument
java.lang.Exception
- If the close operation fails.public java.lang.String getTitle()
getTitle
in interface Document
getTitle
in class AbstractDocument
public MultipageModel getMultipageModel()
public void open() throws java.lang.Exception
open
in interface Document
open
in class AbstractDocument
java.lang.Exception
- If there is no file, or if the I/O operation failed.public void save() throws java.lang.Exception
save
in interface Document
save
in class AbstractDocument
java.lang.Exception
- If there is no file, or if the I/O operation failed.public void saveAs(java.io.File file) throws java.lang.Exception
saveAs
in interface Document
saveAs
in class AbstractDocument
java.lang.Exception
- If the I/O operation failed.AbstractDocument.save()
public void saveAs(java.net.URL url)
saveAs
in interface Document
saveAs
in class AbstractDocument
java.lang.UnsupportedOperationException
- Always thrown.AbstractDocument.save()