Class SavePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
DataSavePanel, ImageSavePanel

public abstract class SavePanel extends JPanel
The SavePanel class is the abstract parent of all save panels. The panel has a write() method so that it may be used to save data. Generally, a save panel is supposed to be used as a mechanism for setting various options before saving.
Since:
3.1.7
Author:
Peter Hollemans
See Also:
  • Constructor Details

    • SavePanel

      public SavePanel()
  • Method Details

    • write

      public abstract void write(File file) throws IOException
      Saves data to a file.
      Parameters:
      file - the file to write.
      Throws:
      IOException - if an error occurred writing to the file.
    • check

      public void check() throws Exception
      Checks the panel entries. This method performs no operation unless overridden in the child class. Child classes should make an effort to throw an exception here if a subsequent call to the write() method would fail, and the problem can be detected before writing the file.
      Throws:
      Exception - if the panel contents have an error.