Package uk.ac.starlink.table.gui
Class FilestoreTableSaveDialog
java.lang.Object
uk.ac.starlink.table.gui.FilestoreTableSaveDialog
- All Implemented Interfaces:
TableSaveDialog
Save dialogue which uses a
FilestoreChooser.- Since:
- 25 Feb 2005
- Author:
- Mark Taylor (Starlink)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanconfirmOverwrite(Component parent, String loc) Requests confirmation from the user that an existing file can be overwritten.uk.ac.starlink.connect.FilestoreChooserReturns the chooser component used by this dialogue.Returns this dialogue's description (may be used as an Action's SHORT_DESCRIPTION property).getIcon()Returns an icon for use in identifying this dialogue.getName()Returns this dialogue's name (may be used as an Action's NAME property).booleanIndicates whether there is a reasonable chance of this dialogue working.booleanshowSaveDialog(Component parent, StarTableOutput sto, ComboBoxModel<String> formatModel, StarTable[] tables) Pops up a modal dialogue which allows the user to save the given tables to a single destination.
-
Constructor Details
-
FilestoreTableSaveDialog
public FilestoreTableSaveDialog()Constructor.
-
-
Method Details
-
getName
Description copied from interface:TableSaveDialogReturns this dialogue's name (may be used as an Action's NAME property).- Specified by:
getNamein interfaceTableSaveDialog- Returns:
- name
-
getDescription
Description copied from interface:TableSaveDialogReturns this dialogue's description (may be used as an Action's SHORT_DESCRIPTION property).- Specified by:
getDescriptionin interfaceTableSaveDialog- Returns:
- description
-
getIcon
Description copied from interface:TableSaveDialogReturns an icon for use in identifying this dialogue.- Specified by:
getIconin interfaceTableSaveDialog- Returns:
- icon
-
isAvailable
public boolean isAvailable()Description copied from interface:TableSaveDialogIndicates whether there is a reasonable chance of this dialogue working.- Specified by:
isAvailablein interfaceTableSaveDialog- Returns:
- false iff there's no point offering use of this dialogue
-
showSaveDialog
public boolean showSaveDialog(Component parent, StarTableOutput sto, ComboBoxModel<String> formatModel, StarTable[] tables) Description copied from interface:TableSaveDialogPops up a modal dialogue which allows the user to save the given tables to a single destination. The dialogue should allow the user to select an output destination and return only when he has done so or indicated that he does not wish to. Having selected a destination the tables should be saved to it. If the save fails the user should be notified with a popup.- Specified by:
showSaveDialogin interfaceTableSaveDialog- Parameters:
parent- parent componentsto- object determining how tables are savedformatModel- combo box model containing names of table save formats which can be selectedtables- the tables to save- Returns:
- true iff the save completed successfully
-
getChooser
public uk.ac.starlink.connect.FilestoreChooser getChooser()Returns the chooser component used by this dialogue.- Returns:
- chooser
-
confirmOverwrite
Requests confirmation from the user that an existing file can be overwritten.- Parameters:
parent- the parent component, used for positioning dialog boxesloc- location of the file to overwrite- Returns:
trueif the user agrees it's OK to overwrite
-