FreeHEP API
Version v1.1

org.freehep.graphicsio.exportchooser
Interface ExportFileType

All Known Subinterfaces:
ExportGraphicsFileType
All Known Implementing Classes:
ExportGraphicsFileTypeAdapter

public interface ExportFileType

Objects which implement this interface provide enough functionality to provide an output file type for the ExportDialog.

Version:
$Id: ExportFileType.java,v 1.2 2002/08/21 16:52:05 duns Exp $
Author:
Charles Loomis, Mark Donszelmann

Method Summary
 File adjustFilename(File file)
          Gives the accessory the chance to change the output filename.
 void exportToFile(File file, Component[] printTarget, Component parent)
          Writes the all given components out in the format of this file type.
 void exportToFile(File file, Component printTarget, Component parent)
          Writes the given component out in the format of this file type.
 void exportToFile(OutputStream os, Component[] printTarget, Component parent)
          Writes the all given components out in the format of this file type.
 void exportToFile(OutputStream os, Component printTarget, Component parent)
          Writes the given component out in the format of this file type.
 boolean fileHasValidExtension(File file)
          This method returns true if the given file has an extension which can be handled by this file type.
 FileFilter getFileFilter()
          Returns a file filter which selects only those files which correspond to a particular file type.
 JPanel getOptionsPanel()
          Returns a panel which allows to user to set options associated with this particular output format.
 void restoreOptions(Properties props)
          Call this method to restore options from a Properties object.
 void saveOptions(Properties props)
          Call this method to store options in a Properties object.
 void setCreator(String creator)
           
 

Method Detail

setCreator

public void setCreator(String creator)

getFileFilter

public FileFilter getFileFilter()
Returns a file filter which selects only those files which correspond to a particular file type.


getOptionsPanel

public JPanel getOptionsPanel()
Returns a panel which allows to user to set options associated with this particular output format. Should return null if no options are supported.


exportToFile

public void exportToFile(OutputStream os,
                         Component printTarget,
                         Component parent)
                  throws IOException
Writes the given component out in the format of this file type.

IOException

exportToFile

public void exportToFile(File file,
                         Component printTarget,
                         Component parent)
                  throws IOException
Writes the given component out in the format of this file type.

IOException

exportToFile

public void exportToFile(OutputStream os,
                         Component[] printTarget,
                         Component parent)
                  throws IOException
Writes the all given components out in the format of this file type.

IOException

exportToFile

public void exportToFile(File file,
                         Component[] printTarget,
                         Component parent)
                  throws IOException
Writes the all given components out in the format of this file type.

IOException

adjustFilename

public File adjustFilename(File file)
Gives the accessory the chance to change the output filename. In particular, to change the extension to match the output file format.


fileHasValidExtension

public boolean fileHasValidExtension(File file)
This method returns true if the given file has an extension which can be handled by this file type.


saveOptions

public void saveOptions(Properties props)
Call this method to store options in a Properties object. It is up to the particular implementation which options (if any) are stored. The intention is to provide a way to save users' preferences.


restoreOptions

public void restoreOptions(Properties props)
Call this method to restore options from a Properties object. It is up to the particular implementation which options (if any) are read. The intention is to provide a way to restore users' preferences.


FreeHEP API
Version v1.1

Copyright © 2000-2002 FreeHEP, All Rights Reserved.