nl.lxtreme.ols.api.data.export
Interface Exporter


public interface Exporter

Provides an exporter for exporting data to an external entity, such as a file.


Method Summary
 void export(DataSet aDataSet, JComponent aComponent, OutputStream aStream)
          Exports the given data container to the given writer.
 String[] getFilenameExtentions()
          Returns the file extensions supported by this exporter.
 String getName()
          Returns the name of this exporter.
 

Method Detail

export

void export(DataSet aDataSet,
            JComponent aComponent,
            OutputStream aStream)
            throws IOException
Exports the given data container to the given writer.

Parameters:
aDataSet - the current project with all data to export, can never be null;
aComponent - the Swing UI component that is being exported, this is for example the scroll pane in which the diagram is shown, cannot be null;
aStream - the output stream to write the export to, can never be null.
Throws:
IOException - in case of I/O problems.

getFilenameExtentions

String[] getFilenameExtentions()
Returns the file extensions supported by this exporter.

For example, when exporting to an image, this method can yield {"gif", "png"} to denote that it supports GIF and PNG files. This knowledge can be used to let the user specify a file name with the correct extension.

Returns:
the supported file extensions, never null, but may be empty.

getName

String getName()
Returns the name of this exporter.

Returns:
a name, never null or empty.


Copyright © 2012 L'Xtreme IT consultancy. All Rights Reserved.