Class FilestoreTableSaveDialog

  • All Implemented Interfaces:
    TableSaveDialog

    public class FilestoreTableSaveDialog
    extends java.lang.Object
    implements TableSaveDialog
    Save dialogue which uses a FilestoreChooser.
    Since:
    25 Feb 2005
    Author:
    Mark Taylor (Starlink)
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean confirmOverwrite​(java.awt.Component parent, java.lang.String loc)
      Requests confirmation from the user that an existing file can be overwritten.
      uk.ac.starlink.connect.FilestoreChooser getChooser()
      Returns the chooser component used by this dialogue.
      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<java.lang.String> formatModel, StarTable[] tables)
      Pops up a modal dialogue which allows the user to save the given tables to a single destination.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FilestoreTableSaveDialog

        public FilestoreTableSaveDialog()
        Constructor.
    • 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 interface TableSaveDialog
        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 interface TableSaveDialog
        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 interface TableSaveDialog
        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 interface TableSaveDialog
        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<java.lang.String> 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 interface TableSaveDialog
        Parameters:
        parent - parent component
        sto - object determining how tables are saved
        formatModel - combo box model containing names of table save formats which can be selected
        tables - 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

        public static boolean confirmOverwrite​(java.awt.Component parent,
                                               java.lang.String loc)
        Requests confirmation from the user that an existing file can be overwritten.
        Parameters:
        parent - the parent component, used for positioning dialog boxes
        loc - location of the file to overwrite
        Returns:
        true if the user agrees it's OK to overwrite