Class FileExporter

    • Constructor Detail

    • Method Detail

      • acceptFile

        public boolean acceptFile​(File pathname,
                                  Layer layer)
        Check if this exporter can export a certain layer to a certain file. Most exporters support just a single layer type.
        Parameters:
        pathname - the target file name (check file extension using the filter
        layer - the layer requested for export
        Returns:
        true, if the exporter can handle the layer and filename is okay
      • exportData

        public void exportData​(File file,
                               Layer layer)
                        throws IOException
        Execute the data export. (To be overridden by subclasses.)
        Parameters:
        file - target file
        layer - the layer to export
        Throws:
        IOException - in case of an IO error
      • exportDataQuiet

        public void exportDataQuiet​(File file,
                                    Layer layer)
                             throws IOException
        Execute the data export without prompting the user. (To be overridden by subclasses.)
        Parameters:
        file - target file
        layer - the layer to export
        Throws:
        IOException - in case of an IO error
        Since:
        15496
      • isEnabled

        public final boolean isEnabled()
        Returns the enabled state of this FileExporter. When enabled, it is listed and usable in "File->Save" dialogs.
        Returns:
        true if this FileExporter is enabled
        Since:
        5459
      • setEnabled

        public final void setEnabled​(boolean enabled)
        Sets the enabled state of the FileExporter. When enabled, it is listed and usable in "File->Save" dialogs.
        Parameters:
        enabled - true to enable this FileExporter, false to disable it
        Since:
        5459
      • isCanceled

        public final boolean isCanceled()
        Determines if this exporter has been canceled during export.
        Returns:
        true if this FileExporter has been canceled
        Since:
        6815
      • setCanceled

        public final void setCanceled​(boolean canceled)
        Marks this exporter as canceled.
        Parameters:
        canceled - true to mark this exporter as canceled, false otherwise
        Since:
        6815