Class ImageSavePanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
GeoTIFFSavePanel, GIFSavePanel, JPEGSavePanel, PDFSavePanel, PNGSavePanel

public abstract class ImageSavePanel extends SavePanel
The ImageSavePanel class is the abstract parent of all image save panels, which allow the user to save earth data to an image file format. To save a view as an image, 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

    • view

      protected EarthDataView view
      The view to save as an image.
    • info

      protected EarthDataInfo info
      The earth data information to use for legends.
    • isIndexable

      protected boolean isIndexable
      The indexable flag, true if we can limit the colors to an index model.
  • Constructor Details

  • Method Details

    • create

      public static ImageSavePanel create(EarthDataView view, EarthDataInfo info, String format)
    • write

      protected void write(boolean hasLegends, boolean hasInfoLegend, boolean isAntialiased, boolean writeWorld, String tiffComp, int colors, String format, File file) throws IOException
      Writes the image using the specified parameters.
      Parameters:
      hasLegends - the legends flag, true to draw color scale and information legends.
      hasInfoLegend - the info legend flag, true to draw information legend.
      isAntialiased - the antialias flag, true to antialias fonts and lines.
      writeWorld - the world file write flag, true to write a world file. The output file name extension is replaced with '.wld' to create the world file name.
      tiffComp - the TIFF compression algorithm: 'none', 'deflate', 'pack', 'lzw', or 'jpeg'.
      colors - the number of image colors for an indexed color image, <= 256 or 0 for no color limit.
      format - the output file format: 'png', 'gif', 'jpg', 'tif', or 'pdf'.
      file - the file to write.
      Throws:
      IOException - if an error occurred writing the data.