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();
}
}
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]);
}
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();
}
}
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]);
}
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();
}
}
Aggregations