|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.freehep.util.export.ExportFileType
Objects which extend this class provide enough functionality to provide an output file type for the ExportDialog.
Constructor Summary | |
ExportFileType()
|
Method Summary | |
static File |
adjustExtension(File file,
String preferredExtension,
String[] acceptableExtensions)
Deprecated. use adjustExtension(File, String, String[], String) |
static File |
adjustExtension(File file,
String preferredExtension,
String[] acceptableExtensions,
String extension)
Change the extension of a file if it is not of the appropriate type. |
File |
adjustFilename(File file,
Properties properties)
Gives the accessory the chance to change the output filename. |
File |
adjustFilename(File file,
String extension,
Properties properties)
Gives the accessory the chance to change the output filename. |
boolean |
applyChangedOptions(JPanel optionPanel,
Properties options)
Sets any changed options from the optionPanel to the properties object. |
static boolean |
checkExtension(File file,
String[] acceptableExtensions)
A utility function that checks a file's extension. |
int |
compareTo(Object o)
Compares to other exportfiletype in alphabetical order on the description string. |
JPanel |
createOptionPanel(Properties options)
Returns a panel which allows to user to set options associated with this particular output format. |
abstract void |
exportToFile(File file,
Component[] target,
Component parent,
Properties properties,
String creator)
Writes the all given components out in the format of this file type. |
void |
exportToFile(File file,
Component target,
Component parent,
Properties properties,
String creator)
Writes the given component out in the format of this file type. |
abstract void |
exportToFile(OutputStream os,
Component[] target,
Component parent,
Properties properties,
String creator)
Writes the all given components out in the format of this file type. |
void |
exportToFile(OutputStream os,
Component target,
Component parent,
Properties properties,
String creator)
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. |
abstract String |
getDescription()
Returns a short description of the format |
static List |
getExportFileTypes()
Return all registered ExportFileTypes |
static List |
getExportFileTypes(String format)
Return all registered ExportFileTypes for a certain format. |
static String |
getExtension(File file,
String[] acceptableExtensions)
Returns the file's (longest) valid extension (ps, eps, heprep.zip), or "". |
abstract String[] |
getExtensions()
Returns an array of possible extensions for the format, the first of which is the preferred extension |
String |
getFileExtension(File file)
Returns the longest valid extension on this filename, or "". |
FileFilter |
getFileFilter()
Returns a file filter which selects only those files which correspond to a particular file type. |
abstract String[] |
getMIMETypes()
Return the MIME-type(s) for this format, the first of which is the preferred MIME type. |
boolean |
hasOptionPanel()
Returns true if this format has extra options. |
boolean |
isMultipageCapable()
Returns true if this ExportFileType can handle multipage output. |
static void |
setClassLoader(ClassLoader loader)
Sets the classloader to be used for loading ExportFileTypes |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExportFileType()
Method Detail |
public abstract String getDescription()
public abstract String[] getExtensions()
public abstract String[] getMIMETypes()
public void exportToFile(OutputStream os, Component target, Component parent, Properties properties, String creator) throws IOException
IOException
public void exportToFile(File file, Component target, Component parent, Properties properties, String creator) throws IOException
IOException
public abstract void exportToFile(OutputStream os, Component[] target, Component parent, Properties properties, String creator) throws IOException
IOException
public abstract void exportToFile(File file, Component[] target, Component parent, Properties properties, String creator) throws IOException
IOException
public int compareTo(Object o)
compareTo
in interface Comparable
public boolean hasOptionPanel()
public JPanel createOptionPanel(Properties options)
public boolean applyChangedOptions(JPanel optionPanel, Properties options)
public FileFilter getFileFilter()
public File adjustFilename(File file, Properties properties)
public File adjustFilename(File file, String extension, Properties properties)
public String getFileExtension(File file)
public boolean fileHasValidExtension(File file)
public boolean isMultipageCapable()
public static void setClassLoader(ClassLoader loader)
public static List getExportFileTypes()
public static List getExportFileTypes(String format)
public static String getExtension(File file, String[] acceptableExtensions)
public static boolean checkExtension(File file, String[] acceptableExtensions)
public static File adjustExtension(File file, String preferredExtension, String[] acceptableExtensions)
public static File adjustExtension(File file, String preferredExtension, String[] acceptableExtensions, String extension)
extension
- ext to be removed.
|
FreeHEP API Version current |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |