Package uk.ac.starlink.table.gui
Class SystemTableSaveDialog
- java.lang.Object
-
- uk.ac.starlink.table.gui.SystemTableSaveDialog
-
- All Implemented Interfaces:
TableSaveDialog
public class SystemTableSaveDialog extends java.lang.Object implements TableSaveDialog
Table save dialogue based on the native system file dialogue. This is a wrapper aroundFileDialog
, which is in turn a thin wrapper around whatever the native platform uses for its default file browser. Looks ugly on my fvwm-based Linux desktop, but for Mac and MS users it may be much preferable to the java-coded alternatives.- Since:
- 29 Jun 2010
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description SystemTableSaveDialog()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDescription()
Returns this dialogue's description (may be used as an Action's SHORT_DESCRIPTION property).javax.swing.Icon
getIcon()
Returns an icon for use in identifying this dialogue.java.lang.String
getName()
Returns this dialogue's name (may be used as an Action's NAME property).boolean
isAvailable()
Indicates whether there is a reasonable chance of this dialogue working.boolean
showSaveDialog(java.awt.Component parent, StarTableOutput sto, javax.swing.ComboBoxModel formatModel, StarTable[] tables)
Pops up a modal dialogue which allows the user to save the given tables to a single destination.
-
-
-
Method Detail
-
getName
public java.lang.String getName()
Description copied from interface:TableSaveDialog
Returns this dialogue's name (may be used as an Action's NAME property).- Specified by:
getName
in interfaceTableSaveDialog
- Returns:
- name
-
getDescription
public java.lang.String getDescription()
Description copied from interface:TableSaveDialog
Returns this dialogue's description (may be used as an Action's SHORT_DESCRIPTION property).- Specified by:
getDescription
in interfaceTableSaveDialog
- Returns:
- description
-
getIcon
public javax.swing.Icon getIcon()
Description copied from interface:TableSaveDialog
Returns an icon for use in identifying this dialogue.- Specified by:
getIcon
in interfaceTableSaveDialog
- Returns:
- icon
-
isAvailable
public boolean isAvailable()
Description copied from interface:TableSaveDialog
Indicates whether there is a reasonable chance of this dialogue working.- Specified by:
isAvailable
in interfaceTableSaveDialog
- Returns:
- false iff there's no point offering use of this dialogue
-
showSaveDialog
public boolean showSaveDialog(java.awt.Component parent, StarTableOutput sto, javax.swing.ComboBoxModel formatModel, StarTable[] tables)
Description copied from interface:TableSaveDialog
Pops 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:
showSaveDialog
in 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
-
-