cz.cmc.tcgui.actions
Class AbstractFileAction

java.lang.Object
  extended byjavax.swing.AbstractAction
      extended bycz.cmc.tcgui.actions.TCAction
          extended bycz.cmc.tcgui.actions.AbstractFileAction
All Implemented Interfaces:
Action, ActionListener, Cloneable, EventListener, Serializable
Direct Known Subclasses:
Open, Save, SchemaExportTC

public abstract class AbstractFileAction
extends TCAction

Title: class AbstractFileAction

Description: Implementation of the basic file choosing functionality

Copyright: Copyright (c) 2003

Company: CMC Computers

See Also:
Serialized Form

Nested Class Summary
protected  class AbstractFileAction.TCFileFilter
          Filter for the jgraphpad file format (*.pad or *.lib)
 
Field Summary
 
Fields inherited from class cz.cmc.tcgui.actions.TCAction
tcGui
 
Fields inherited from class javax.swing.AbstractAction
enabled, changeSupport
 
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SHORT_DESCRIPTION, SMALL_ICON
 
Constructor Summary
AbstractFileAction(TCGui tcGui)
           
AbstractFileAction(TCGui tcGui, String name)
           
AbstractFileAction(TCGui tcGui, String name, Icon icon)
           
 
Method Summary
protected  String dialog(boolean open, String message, String extension, String desc)
          Opens a dialog and return the filename.
 String openFile(String message, String extension, String desc)
          Shows file open dialog and returns the file name.
 String saveFile(String message, String extension, String desc)
          Shows file open dialog and returns the file name.
 
Methods inherited from class javax.swing.AbstractAction
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
 

Constructor Detail

AbstractFileAction

public AbstractFileAction(TCGui tcGui)

AbstractFileAction

public AbstractFileAction(TCGui tcGui,
                          String name)

AbstractFileAction

public AbstractFileAction(TCGui tcGui,
                          String name,
                          Icon icon)
Method Detail

openFile

public String openFile(String message,
                       String extension,
                       String desc)
Shows file open dialog and returns the file name.


saveFile

public String saveFile(String message,
                       String extension,
                       String desc)
Shows file open dialog and returns the file name.


dialog

protected String dialog(boolean open,
                        String message,
                        String extension,
                        String desc)
Opens a dialog and return the filename. Returns null if cancelled.