org.jhotdraw.app.action
Class LoadDirectoryAction

java.lang.Object
  extended by javax.swing.AbstractAction
      extended by org.jhotdraw.app.action.AbstractViewAction
          extended by org.jhotdraw.app.action.AbstractSaveBeforeAction
              extended by org.jhotdraw.app.action.LoadAction
                  extended by org.jhotdraw.app.action.LoadDirectoryAction
All Implemented Interfaces:
java.awt.event.ActionListener, java.io.Serializable, java.lang.Cloneable, java.util.EventListener, javax.swing.Action

public class LoadDirectoryAction
extends LoadAction

Presents a directory chooser to the user and then loads the directory into a View.

This action requires that the view implements the DirectoryView 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: DirectoryView, LoadDirectoryAction.


Version:
$Id: LoadDirectoryAction.java 556 2009-09-06 13:06:03Z rawcoder $
Author:
Werner Randelshofer, Staldenmattweg 2, CH-6405 Immensee
See Also:
Serialized Form

Field Summary
static java.lang.String ID
           
 
Fields inherited from class org.jhotdraw.app.action.AbstractViewAction
ENABLED_PROPERTY, VIEW_PROPERTY
 
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
 
Constructor Summary
LoadDirectoryAction(Application app)
          Creates a new instance.
LoadDirectoryAction(Application app, View view)
          Creates a new instance.
 
Method Summary
protected  javax.swing.JFileChooser getFileChooser(View view)
           
 
Methods inherited from class org.jhotdraw.app.action.LoadAction
doIt, loadFile
 
Methods inherited from class org.jhotdraw.app.action.AbstractSaveBeforeAction
actionPerformed, saveChanges, saveToFile
 
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
 

Field Detail

ID

public static final java.lang.String ID
See Also:
Constant Field Values
Constructor Detail

LoadDirectoryAction

public LoadDirectoryAction(Application app)
Creates a new instance.


LoadDirectoryAction

public LoadDirectoryAction(Application app,
                           View view)
Creates a new instance.

Method Detail

getFileChooser

protected javax.swing.JFileChooser getFileChooser(View view)
Overrides:
getFileChooser in class LoadAction