use of net.miginfocom.swing.MigLayout in project intellij-community by JetBrains.
the class CleanUnshelvedFilterDialog method createCenterPanel.
@Nullable
@Override
protected JComponent createCenterPanel() {
JPanel panel = new JPanel(new BorderLayout());
JLabel questLabel = new JLabel("Delete already unshelved changelists: \n");
String panelConstraints = "flowx, ins 0";
final MigLayout migLayout = new MigLayout(panelConstraints);
JPanel buttonsPanel = new JPanel(migLayout);
ButtonGroup gr = new ButtonGroup();
gr.add(mySystemUnshelvedButton);
gr.add(myUnshelvedWithFilterButton);
gr.add(myAllUnshelvedButton);
mySystemUnshelvedButton.setBorder(BorderFactory.createEmptyBorder());
myUnshelvedWithFilterButton.setBorder(BorderFactory.createEmptyBorder());
myAllUnshelvedButton.setBorder(BorderFactory.createEmptyBorder());
buttonsPanel.add(mySystemUnshelvedButton, "wrap");
JPanel filterPanel = new JPanel(new MigLayout(panelConstraints));
filterPanel.add(myUnshelvedWithFilterButton);
filterPanel.add(myTimePeriodComboBox);
buttonsPanel.add(filterPanel, "wrap");
buttonsPanel.add(myAllUnshelvedButton);
panel.add(questLabel, BorderLayout.NORTH);
panel.add(buttonsPanel, BorderLayout.CENTER);
return panel;
}
use of net.miginfocom.swing.MigLayout in project intellij-community by JetBrains.
the class MainFrame method createActionsToolbar.
private JComponent createActionsToolbar() {
DefaultActionGroup toolbarGroup = new DefaultActionGroup();
toolbarGroup.add(ActionManager.getInstance().getAction(VcsLogActionPlaces.TOOLBAR_ACTION_GROUP));
DefaultActionGroup mainGroup = new DefaultActionGroup();
mainGroup.add(ActionManager.getInstance().getAction(VcsLogActionPlaces.VCS_LOG_TEXT_FILTER_SETTINGS_ACTION));
mainGroup.add(new Separator());
mainGroup.add(myFilterUi.createActionGroup());
mainGroup.addSeparator();
if (BekUtil.isBekEnabled()) {
if (BekUtil.isLinearBekEnabled()) {
mainGroup.add(new IntelliSortChooserPopupAction());
// can not register both of the actions in xml file, choosing to register an action for the "outer world"
// I can of course if linear bek is enabled replace the action on start but why bother
} else {
mainGroup.add(ActionManager.getInstance().getAction(VcsLogActionPlaces.VCS_LOG_INTELLI_SORT_ACTION));
}
}
mainGroup.add(toolbarGroup);
ActionToolbar toolbar = createActionsToolbar(mainGroup);
Wrapper textFilter = new Wrapper(myTextFilter);
textFilter.setVerticalSizeReferent(toolbar.getComponent());
textFilter.setBorder(JBUI.Borders.emptyLeft(5));
ActionToolbar settings = createActionsToolbar(new DefaultActionGroup(ActionManager.getInstance().getAction(VcsLogActionPlaces.VCS_LOG_QUICK_SETTINGS_ACTION)));
settings.setReservePlaceAutoPopupIcon(false);
settings.setLayoutPolicy(ActionToolbar.NOWRAP_LAYOUT_POLICY);
JPanel panel = new JPanel(new MigLayout("ins 0, fill", "[left]0[left, fill]push[right]", "center"));
panel.add(textFilter);
panel.add(toolbar.getComponent());
panel.add(settings.getComponent());
return panel;
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class AvailableColumnsPanel method refreshColumns.
private void refreshColumns() {
columnsCheckBoxes = new JCheckBox[columns.length];
contentPanel.removeAll();
contentPanel.setLayout(new MigLayout("", "[pref!]"));
for (int i = 0; i < columns.length; i++) {
columnsCheckBoxes[i] = new JCheckBox(columns[i].getTitle(), availableColumnsModel.isColumnAvailable(columns[i]));
columnsCheckBoxes[i].addActionListener(new ColumnCheckBoxListener(i));
contentPanel.add(columnsCheckBoxes[i], "wrap");
}
contentPanel.revalidate();
contentPanel.repaint();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class CSVExportUI method refreshColumns.
private void refreshColumns() {
columnsPanel.removeAll();
columnsPanel.setLayout(new MigLayout("", "[pref!]"));
ArrayList<ColumnCheckboxWrapper> columnCheckboxesList = new ArrayList<>();
//In case of edges table, we need to include fake source, target and type columns:
if (edgesTable) {
columnCheckboxesList.add(new ColumnCheckboxWrapper(AttributeTableCSVExporter.FAKE_COLUMN_EDGE_SOURCE, "Source", true));
columnCheckboxesList.add(new ColumnCheckboxWrapper(AttributeTableCSVExporter.FAKE_COLUMN_EDGE_TARGET, "Target", true));
columnCheckboxesList.add(new ColumnCheckboxWrapper(AttributeTableCSVExporter.FAKE_COLUMN_EDGE_TYPE, "Type", true));
}
//Show rest of columns:
for (Column column : columns) {
columnCheckboxesList.add(new ColumnCheckboxWrapper(column.getIndex(), column.getTitle(), true));
}
columnsCheckBoxes = columnCheckboxesList.toArray(new ColumnCheckboxWrapper[0]);
for (ColumnCheckboxWrapper columnCheckboxWrapper : columnsCheckBoxes) {
columnsPanel.add(columnCheckboxWrapper, "wrap");
}
columnsPanel.revalidate();
columnsPanel.repaint();
}
use of net.miginfocom.swing.MigLayout in project gephi by gephi.
the class MergeNodesUI method loadSettings.
public void loadSettings() {
JPanel settingsPanel = new JPanel();
settingsPanel.setLayout(new MigLayout("fillx"));
loadDescription(settingsPanel);
loadDeleteMergedNodesCheckBox(settingsPanel);
loadSelectedRow(settingsPanel);
loadColumnsStrategies(settingsPanel);
scroll.setViewportView(settingsPanel);
}
Aggregations