Search in sources :

Example 1 with GraphFileExporterBuilderDecorator

use of org.gephi.desktop.datalab.utils.GraphFileExporterBuilderDecorator in project gephi by gephi.

the class DataTableTopComponent method exportCurrentTable.

@Override
public void exportCurrentTable() {
    ExporterSpreadsheet.ExportTable currentTable = isEdgeTableMode() ? ExporterSpreadsheet.ExportTable.EDGES : ExporterSpreadsheet.ExportTable.NODES;
    GraphFileExporterUI fileExporterUI = new GraphFileExporterUI();
    List<GraphFileExporterBuilder> builders = new ArrayList<>();
    for (GraphFileExporterBuilder builder : Lookup.getDefault().lookupAll(GraphFileExporterBuilder.class)) {
        if (builder.getName().toLowerCase().startsWith("spreadsheet")) {
            builders.add(new GraphFileExporterBuilderDecorator(builder, currentTable));
        }
    }
    fileExporterUI.action(builders.toArray(new GraphFileExporterBuilder[0]));
}
Also used : GraphFileExporterBuilder(org.gephi.io.exporter.spi.GraphFileExporterBuilder) ExporterSpreadsheet(org.gephi.io.exporter.plugin.ExporterSpreadsheet) GraphFileExporterUI(org.gephi.desktop.io.export.api.GraphFileExporterUI) ArrayList(java.util.ArrayList) GraphFileExporterBuilderDecorator(org.gephi.desktop.datalab.utils.GraphFileExporterBuilderDecorator)

Aggregations

ArrayList (java.util.ArrayList)1 GraphFileExporterBuilderDecorator (org.gephi.desktop.datalab.utils.GraphFileExporterBuilderDecorator)1 GraphFileExporterUI (org.gephi.desktop.io.export.api.GraphFileExporterUI)1 ExporterSpreadsheet (org.gephi.io.exporter.plugin.ExporterSpreadsheet)1 GraphFileExporterBuilder (org.gephi.io.exporter.spi.GraphFileExporterBuilder)1