use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class GeneralChooseColumnsAndRowUI method refreshColumns.
private void refreshColumns() {
Column[] columns = columnsAndRowChooser.getColumns();
columnsCheckBoxes = new ColumnCheckBox[columns.length];
contentPanel.removeAll();
contentPanel.setLayout(new MigLayout("", "[pref!]"));
for (int i = 0; i < columns.length; i++) {
columnsCheckBoxes[i] = new ColumnCheckBox(columns[i], true);
contentPanel.add(columnsCheckBoxes[i].getCheckBox(), "wrap");
}
contentPanel.revalidate();
contentPanel.repaint();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class GeneralChooseColumnsUI method refreshColumns.
private void refreshColumns() {
Column[] columns = columnsChooser.getColumns();
columnsCheckBoxes = new ColumnCheckBox[columns.length];
contentPanel.removeAll();
contentPanel.setLayout(new MigLayout("", "[pref!]"));
for (int i = 0; i < columns.length; i++) {
columnsCheckBoxes[i] = new ColumnCheckBox(columns[i], true);
contentPanel.add(columnsCheckBoxes[i].getCheckBox(), "wrap");
}
contentPanel.revalidate();
contentPanel.repaint();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class ImportCSVUIVisualPanel2 method reloadSettings.
public void reloadSettings() {
if (separator != null && file != null && file.exists() && mode != null && charset != null) {
JPanel settingsPanel = new JPanel();
settingsPanel.setLayout(new MigLayout());
loadDescription(settingsPanel);
graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
switch(mode) {
case NODES_TABLE:
table = graphModel.getNodeTable();
loadColumns(settingsPanel);
loadNodesTableSettings(settingsPanel);
break;
case EDGES_TABLE:
table = graphModel.getEdgeTable();
loadColumns(settingsPanel);
loadEdgesTableSettings(settingsPanel);
break;
}
scroll.setViewportView(settingsPanel);
}
//Enable/disable finish button
wizard2.fireChangeEvent();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class MergeNodeDuplicatesUI method loadSettings.
public void loadSettings() {
JPanel settingsPanel = new JPanel();
settingsPanel.setLayout(new MigLayout("fillx"));
loadDescription(settingsPanel);
loadBaseColumn(settingsPanel);
loadDeleteMergedNodesCheckBox(settingsPanel);
scroll.setViewportView(settingsPanel);
refreshDuplicatesAndStrategies();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class LabelAttributesPanel method refresh.
private void refresh() {
GraphController graphController = Lookup.getDefault().lookup(GraphController.class);
List<Column> availableColumns = new ArrayList<>();
List<Column> selectedColumns = new ArrayList<>();
AttributesCheckBox[] target;
if (elementButtonGroup.getSelection() == nodesToggleButton.getModel()) {
for (Column c : graphController.getGraphModel().getNodeTable()) {
if (!c.isProperty()) {
availableColumns.add(c);
} else if (showProperties && c.isProperty() && !c.getId().equals("timeset")) {
availableColumns.add(c);
}
}
if (textModel.getNodeTextColumns() != null) {
selectedColumns = Arrays.asList(textModel.getNodeTextColumns());
}
nodeCheckBoxs = new AttributesCheckBox[availableColumns.size()];
target = nodeCheckBoxs;
} else {
for (Column c : graphController.getGraphModel().getEdgeTable()) {
if (!c.isProperty()) {
availableColumns.add(c);
} else if (showProperties) {
if (showProperties && c.isProperty() && !c.getId().equals("timeset")) {
availableColumns.add(c);
}
}
}
if (textModel.getEdgeTextColumns() != null) {
selectedColumns = Arrays.asList(textModel.getEdgeTextColumns());
}
edgeCheckBoxs = new AttributesCheckBox[availableColumns.size()];
target = edgeCheckBoxs;
}
contentPanel.removeAll();
contentPanel.setLayout(new MigLayout("", "[pref!]"));
for (int i = 0; i < availableColumns.size(); i++) {
Column column = availableColumns.get(i);
AttributesCheckBox c = new AttributesCheckBox(column, selectedColumns.contains(column));
target[i] = c;
contentPanel.add(c.getCheckBox(), "wrap");
}
contentPanel.revalidate();
contentPanel.repaint();
}
Aggregations