org.jhotdraw.app.action
Class ExportAction
java.lang.Object
javax.swing.AbstractAction
org.jhotdraw.app.action.AbstractViewAction
org.jhotdraw.app.action.ExportAction
- All Implemented Interfaces:
- java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action
public class ExportAction
- extends AbstractViewAction
Presents a file chooser to the user and then exports the
View to the chosen file.
This action requires that the view implements the
ExportableView interface.
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: ExportAction.java 558 2009-09-08 12:14:37Z rawcoder $
- Author:
- Werner Randelshofer
- See Also:
- Serialized Form
|
Field Summary |
static java.lang.String |
ID
|
| Fields inherited from class javax.swing.AbstractAction |
changeSupport, enabled |
| Fields inherited from interface javax.swing.Action |
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICON |
|
Method Summary |
void |
actionPerformed(java.awt.event.ActionEvent evt)
|
protected void |
exportToFile(ExportableView view,
java.io.File file,
javax.swing.filechooser.FileFilter filter,
java.awt.Component accessory)
|
| Methods inherited from class org.jhotdraw.app.action.AbstractViewAction |
getActiveView, getApplication, getPropertyName, installViewListeners, isEnabled, setEnabled, setPropertyName, uninstallViewListeners, updateEnabled, updateView, updateView |
| Methods inherited from class javax.swing.AbstractAction |
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, putValue, removePropertyChangeListener |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ID
public static final java.lang.String ID
- See Also:
- Constant Field Values
ExportAction
public ExportAction(Application app)
- Creates a new instance.
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent evt)
exportToFile
protected void exportToFile(ExportableView view,
java.io.File file,
javax.swing.filechooser.FileFilter filter,
java.awt.Component accessory)