Search in sources :

Example 1 with MergeNodeDuplicatesUI

use of org.gephi.datalab.plugin.manipulators.general.ui.MergeNodeDuplicatesUI in project gephi by gephi.

the class MergeNodeDuplicates method getUI.

@Override
public ManipulatorUI getUI() {
    Table nodeTable = Lookup.getDefault().lookup(GraphController.class).getGraphModel().getNodeTable();
    List<Column> columnsList = new ArrayList<>();
    for (Column column : nodeTable) {
        if (!column.isReadOnly()) {
            columnsList.add(column);
        }
    }
    columns = columnsList.toArray(new Column[0]);
    mergeStrategies = new AttributeRowsMergeStrategy[columns.length];
    deleteMergedNodes = NbPreferences.forModule(MergeNodeDuplicates.class).getBoolean(DELETE_MERGED_NODES_SAVED_PREFERENCES, true);
    caseSensitive = NbPreferences.forModule(MergeNodeDuplicates.class).getBoolean(CASE_SENSITIVE_SAVED_PREFERENCES, true);
    return new MergeNodeDuplicatesUI();
}
Also used : Table(org.gephi.graph.api.Table) Column(org.gephi.graph.api.Column) ArrayList(java.util.ArrayList) MergeNodeDuplicatesUI(org.gephi.datalab.plugin.manipulators.general.ui.MergeNodeDuplicatesUI)

Aggregations

ArrayList (java.util.ArrayList)1 MergeNodeDuplicatesUI (org.gephi.datalab.plugin.manipulators.general.ui.MergeNodeDuplicatesUI)1 Column (org.gephi.graph.api.Column)1 Table (org.gephi.graph.api.Table)1