Class DataSavePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
ArcSavePanel, BinarySavePanel, CFNC4SavePanel, CFNCSavePanel, CWHDFSavePanel, TextSavePanel

public abstract class DataSavePanel extends SavePanel
The DataSavePanel class is the abstract parent of all data save panels, which allow the user to export earth data to various file formats. To export data, create a new panel with the create() method, then call the write() method. Generally, the save panel is enclosed in a dialog with OK and Cancel options.
Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Field Details

    • reader

      protected EarthDataReader reader
      The earth data reader to use for data.
    • variableList

      protected List variableList
      The list of variables for export.
    • view

      protected EarthDataView view
      The current earth view.
    • subsetPanel

      protected SubsetOptionPanel subsetPanel
      The subset panel used for creating data subsets.
    • variablePanel

      protected VariableOptionPanel variablePanel
      The variable option panel.
  • Constructor Details

  • Method Details

    • setVariables

      public void setVariables(List nameList)
      Sets the list of selected variable names.
    • isSingleVariable

      protected boolean isSingleVariable()
      Returns true if this class requires single variable selection in the variable list. By default this method returns false unless overridden in the child class.
    • create

      public static DataSavePanel create(EarthDataReader reader, List variableList, EarthDataView view, String format)
    • check

      public void check()
      Checks the panel contents.
      Overrides:
      check in class SavePanel
    • getPanelSubset

      protected void getPanelSubset(int[] upperLeft, int[] dimensions)
      Gets the subset information specified by the subset option panel.
      Parameters:
      upperLeft - the upper-left data coordinate as [row, column] (modified).
      dimensions - the data dimensions as [rows, columns] (modified).
    • createInfo

      protected EarthDataInfo createInfo()
      Creates an information object based on the reader, taking into account any subset specified.
      Returns:
      the new information object.
    • write

      protected void write(EarthDataWriter writer) throws IOException
      Writes the list of variables from the variable option panel to the writer. The subset option panel is used to subset the variable data if needed. The writer is closed after the final variable data is written.
      Parameters:
      writer - the writer used to export data.
      Throws:
      IOException - if an error occurred writing the data.