Class SaveTableQueryWindow

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible, RootPaneContainer, WindowConstants

public class SaveTableQueryWindow extends QueryWindow
QueryWindow which allows the user to save a normal table (not a TopcatModel) to disk.
Since:
23 May 2007
Author:
Mark Taylor
See Also:
  • Constructor Details

    • SaveTableQueryWindow

      public SaveTableQueryWindow(String title, Component parent, uk.ac.starlink.table.StarTableOutput sto, boolean progress)
      Constructor.
      Parameters:
      title - window title
      parent - parent window
      sto - table output handler
      progress - true iff you want a save progress bar
  • Method Details

    • setTableSource

      public void setTableSource(uk.ac.starlink.table.TableSource tsrc)
      Sets the source of tables to be written. Should be called with a non-null value before the user is invited to save.
      Parameters:
      tsrc - supplier of the table to be saved (invoked when the window save operation is activated)
    • getTableSource

      public uk.ac.starlink.table.TableSource getTableSource()
      Returns the currently configured table source.
      Returns:
      supplier of the table to be saved (invoked when the window save operation is activated)
    • setDefaultFormat

      public void setDefaultFormat(String fmt)
      Sets the default format string with which tables will be saved.
      Parameters:
      fmt - format string
    • perform

      public boolean perform()
      Description copied from class: QueryWindow
      This method will be invoked when the OK button is pushed or the user otherwise indicates that he has filled in the form.
      Specified by:
      perform in class QueryWindow
      Returns:
      true if the action is complete in some sense. The window will be disposed if true is returned, otherwise it will remain posted.