Search in sources :

Example 6 with FileType

use of org.gephi.io.exporter.api.FileType in project gephi by gephi.

the class GraphFileExporterUI method getExporter.

private GraphFileExporterBuilder getExporter(DialogFileFilter fileFilter) {
    //Find fileFilter
    for (GraphFileExporterBuilder graphFileExporter : Lookup.getDefault().lookupAll(GraphFileExporterBuilder.class)) {
        for (FileType fileType : graphFileExporter.getFileTypes()) {
            DialogFileFilter tempFilter = new DialogFileFilter(fileType.getName());
            tempFilter.addExtensions(fileType.getExtensions());
            if (tempFilter.equals(fileFilter)) {
                return graphFileExporter;
            }
        }
    }
    return null;
}
Also used : GraphFileExporterBuilder(org.gephi.io.exporter.spi.GraphFileExporterBuilder) FileType(org.gephi.io.exporter.api.FileType) DialogFileFilter(org.gephi.ui.utils.DialogFileFilter)

Aggregations

FileType (org.gephi.io.exporter.api.FileType)6 DialogFileFilter (org.gephi.ui.utils.DialogFileFilter)6 GraphFileExporterBuilder (org.gephi.io.exporter.spi.GraphFileExporterBuilder)4 BorderLayout (java.awt.BorderLayout)3 Component (java.awt.Component)3 FlowLayout (java.awt.FlowLayout)3 Insets (java.awt.Insets)3 ActionEvent (java.awt.event.ActionEvent)3 ActionListener (java.awt.event.ActionListener)3 PropertyChangeEvent (java.beans.PropertyChangeEvent)3 PropertyChangeListener (java.beans.PropertyChangeListener)3 File (java.io.File)3 JButton (javax.swing.JButton)3 JComponent (javax.swing.JComponent)3 JFileChooser (javax.swing.JFileChooser)3 JPanel (javax.swing.JPanel)3 ExportControllerUI (org.gephi.desktop.io.export.ExportControllerUI)3 ExporterUI (org.gephi.io.exporter.spi.ExporterUI)3 DialogDescriptor (org.openide.DialogDescriptor)3 FileObject (org.openide.filesystems.FileObject)3