Search in sources :

Example 16 with AttributeColumnsController

use of org.gephi.datalab.api.AttributeColumnsController in project gephi by gephi.

the class ClearNodesData method execute.

@Override
public void execute() {
    if (columnsToClearData.length >= 0) {
        AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
        ac.clearNodesData(nodes, columnsToClearData);
        Lookup.getDefault().lookup(DataTablesController.class).refreshCurrentTable();
    }
}
Also used : AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) DataTablesController(org.gephi.datalab.api.datatables.DataTablesController)

Example 17 with AttributeColumnsController

use of org.gephi.datalab.api.AttributeColumnsController in project gephi by gephi.

the class ClearEdgesData method setup.

@Override
public void setup(Edge[] edges, Edge clickedEdge) {
    this.edges = edges;
    AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
    ArrayList<Column> columnsToClearDataList = new ArrayList<>();
    for (Column column : Lookup.getDefault().lookup(GraphController.class).getGraphModel().getEdgeTable()) {
        if (ac.canClearColumnData(column)) {
            columnsToClearDataList.add(column);
        }
    }
    columnsToClearData = columnsToClearDataList.toArray(new Column[0]);
}
Also used : Column(org.gephi.graph.api.Column) AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) ArrayList(java.util.ArrayList)

Example 18 with AttributeColumnsController

use of org.gephi.datalab.api.AttributeColumnsController in project gephi by gephi.

the class ClearEdgesData method execute.

@Override
public void execute() {
    if (columnsToClearData.length >= 0) {
        AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
        ac.clearEdgesData(edges, columnsToClearData);
        Lookup.getDefault().lookup(DataTablesController.class).refreshCurrentTable();
    }
}
Also used : AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) DataTablesController(org.gephi.datalab.api.datatables.DataTablesController)

Example 19 with AttributeColumnsController

use of org.gephi.datalab.api.AttributeColumnsController in project gephi by gephi.

the class CopyEdgeDataToOtherEdges method setup.

@Override
public void setup(Edge[] edges, Edge clickedEdge) {
    this.clickedEdge = clickedEdge;
    this.edges = edges;
    AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
    ArrayList<Column> columnsToCopyDataList = new ArrayList<>();
    for (Column column : Lookup.getDefault().lookup(GraphController.class).getGraphModel().getEdgeTable()) {
        if (ac.canChangeColumnData(column)) {
            columnsToCopyDataList.add(column);
        }
    }
    columnsToCopyData = columnsToCopyDataList.toArray(new Column[0]);
}
Also used : Column(org.gephi.graph.api.Column) AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) ArrayList(java.util.ArrayList)

Example 20 with AttributeColumnsController

use of org.gephi.datalab.api.AttributeColumnsController in project gephi by gephi.

the class CopyEdgeDataToOtherEdges method execute.

@Override
public void execute() {
    if (columnsToCopyData.length >= 0) {
        AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
        ac.copyEdgeDataToOtherEdges(clickedEdge, edges, columnsToCopyData);
        Lookup.getDefault().lookup(DataTablesController.class).refreshCurrentTable();
    }
}
Also used : AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) DataTablesController(org.gephi.datalab.api.datatables.DataTablesController)

Aggregations

AttributeColumnsController (org.gephi.datalab.api.AttributeColumnsController)31 Column (org.gephi.graph.api.Column)23 Element (org.gephi.graph.api.Element)14 BigDecimal (java.math.BigDecimal)8 ArrayList (java.util.ArrayList)7 DataTablesController (org.gephi.datalab.api.datatables.DataTablesController)5 Edge (org.gephi.graph.api.Edge)3 PropertyEditor (java.beans.PropertyEditor)2 Node (org.gephi.graph.api.Node)2 TimeFormat (org.gephi.graph.api.TimeFormat)2 IntervalSet (org.gephi.graph.api.types.IntervalSet)2 AttributeValueWrapper (org.gephi.ui.tools.plugin.edit.EditWindowUtils.AttributeValueWrapper)2 DateTimeZone (org.joda.time.DateTimeZone)2 PropertySupport (org.openide.nodes.PropertySupport)2 Sheet (org.openide.nodes.Sheet)2 CsvWriter (com.csvreader.CsvWriter)1 Dialog (java.awt.Dialog)1 File (java.io.File)1 IOException (java.io.IOException)1 Charset (java.nio.charset.Charset)1