public abstract class ImportAction extends BaseAction
changeSupport, enabled
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 and Description |
---|
ImportAction(String name) |
ImportAction(String name,
ImageIcon icon,
String tooltip,
KeyStroke accelerator) |
ImportAction(String name,
String tooltip) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent arg0) |
protected abstract void |
doImport(String filename)
Main import function: will be called after the target file was selected
|
protected abstract FileFormatDescription |
getFileFilter()
Get the file filter to be used for this import.
|
String |
getID() |
void |
selectFile()
The action was launched, select a file and if all
went fine, call the import service gui
|
getIcon, getWeight, setWeight
addPropertyChangeListener, clone, firePropertyChange, getKeys, getPropertyChangeListeners, getValue, isEnabled, putValue, removePropertyChangeListener, setEnabled
public ImportAction(String name)
public ImportAction(String name, String tooltip)
name
- Entry to insert in the menutooltip
- Long description of the actionpublic String getID()
public void selectFile()
config
- GsException
public void actionPerformed(ActionEvent arg0)
protected abstract FileFormatDescription getFileFilter()
protected abstract void doImport(String filename) throws GsException, IOException
GsException
IOException
Copyright © 2005–2020. All rights reserved.