org.jhotdraw.app
Interface ExportableView

All Superinterfaces:
View
All Known Implementing Classes:
ODGView, SVGView

public interface ExportableView
extends View

The interface of a View which can export its document.


Design Patterns

Framework
The interfaces and classes listed below define together the contracts of a smaller framework inside of the JHotDraw framework for document oriented applications.
Contract: ExportableView, ExportAction.


Version:
$Id: ExportableView.java 527 2009-06-07 14:28:19Z rawcoder $
Author:
Werner Randelshofer

Field Summary
 
Fields inherited from interface org.jhotdraw.app.View
APPLICATION_PROPERTY, ENABLED_PROPERTY, FILE_PROPERTY, HAS_UNSAVED_CHANGES_PROPERTY, MULTIPLE_OPEN_ID_PROPERTY, SHOWING_PROPERTY, TITLE_PROPERTY
 
Method Summary
 void export(java.io.File f, javax.swing.filechooser.FileFilter filter, java.awt.Component accessory)
          Exports the view.
 javax.swing.JFileChooser getExportChooser()
          Gets the file chooser for exporting the view.
 
Methods inherited from interface org.jhotdraw.app.View
activate, addDisposable, addPropertyChangeListener, canSaveTo, clear, deactivate, dispose, execute, getAction, getApplication, getComponent, getFile, getMultipleOpenId, getOpenChooser, getSaveChooser, getTitle, hasUnsavedChanges, init, isEnabled, isShowing, markChangesAsSaved, putAction, read, removePropertyChangeListener, setApplication, setEnabled, setFile, setMultipleOpenId, setShowing, setTitle, start, stop, write
 

Method Detail

getExportChooser

javax.swing.JFileChooser getExportChooser()
Gets the file chooser for exporting the view.


export

void export(java.io.File f,
            javax.swing.filechooser.FileFilter filter,
            java.awt.Component accessory)
            throws java.io.IOException
Exports the view. By convention this method is never invoked on the AWT Event Dispatcher Thread.

Parameters:
f - The file to which export the view.
filter - The FileFilter that was used to choose the file. This can be null.
accessory - The Accessory used by the JFileChooser. This can be null.
Throws:
java.io.IOException