Search in sources :

Example 1 with CopyDataToOtherColumn

use of org.gephi.datalab.plugin.manipulators.columns.CopyDataToOtherColumn in project gephi by gephi.

the class CopyDataToOtherColumnUI method setup.

@Override
public void setup(AttributeColumnsManipulator m, GraphModel graphModel, Table table, Column column, DialogControls dialogControls) {
    this.manipulator = (CopyDataToOtherColumn) m;
    sourceColumnLabel.setText(NbBundle.getMessage(CopyDataToOtherColumnUI.class, "CopyDataToOtherColumnUI.sourceColumnLabel.text", column.getTitle()));
    AttributeColumnsController ac = Lookup.getDefault().lookup(AttributeColumnsController.class);
    ArrayList<Column> availableColumns = new ArrayList<>();
    for (Column c : table) {
        if (ac.canChangeColumnData(c) && c != column) {
            availableColumns.add(c);
            columnsComboBox.addItem(c.getTitle());
        }
    }
    columns = availableColumns.toArray(new Column[0]);
}
Also used : CopyDataToOtherColumn(org.gephi.datalab.plugin.manipulators.columns.CopyDataToOtherColumn) Column(org.gephi.graph.api.Column) AttributeColumnsController(org.gephi.datalab.api.AttributeColumnsController) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 AttributeColumnsController (org.gephi.datalab.api.AttributeColumnsController)1 CopyDataToOtherColumn (org.gephi.datalab.plugin.manipulators.columns.CopyDataToOtherColumn)1 Column (org.gephi.graph.api.Column)1