Search in sources :

Example 11 with MigLayout

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;
}
Also used : MigLayout(net.miginfocom.swing.MigLayout) Nullable(org.jetbrains.annotations.Nullable)

Example 12 with MigLayout

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;
}
Also used : Wrapper(com.intellij.ui.components.panels.Wrapper) MigLayout(net.miginfocom.swing.MigLayout) IntelliSortChooserPopupAction(com.intellij.vcs.log.ui.actions.IntelliSortChooserPopupAction)

Example 13 with MigLayout

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();
}
Also used : JCheckBox(javax.swing.JCheckBox) MigLayout(net.miginfocom.swing.MigLayout)

Example 14 with MigLayout

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();
}
Also used : Column(org.gephi.graph.api.Column) MigLayout(net.miginfocom.swing.MigLayout) ArrayList(java.util.ArrayList)

Example 15 with MigLayout

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);
}
Also used : JPanel(javax.swing.JPanel) MigLayout(net.miginfocom.swing.MigLayout)

Aggregations

MigLayout (net.miginfocom.swing.MigLayout)29 JPanel (javax.swing.JPanel)7 ArrayList (java.util.ArrayList)5 CLabel (org.compiere.swing.CLabel)5 Column (org.gephi.graph.api.Column)5 CPanel (org.compiere.swing.CPanel)4 Comparator (java.util.Comparator)3 TitledBorder (javax.swing.border.TitledBorder)3 POSTextField (org.adempiere.pos.POSTextField)3 Dimension (java.awt.Dimension)2 JCheckBox (javax.swing.JCheckBox)2 ActionButton (com.intellij.openapi.actionSystem.impl.ActionButton)1 ValidationInfo (com.intellij.openapi.ui.ValidationInfo)1 ListPopup (com.intellij.openapi.ui.popup.ListPopup)1 VirtualFile (com.intellij.openapi.vfs.VirtualFile)1 RelativePoint (com.intellij.ui.awt.RelativePoint)1 JBCheckBox (com.intellij.ui.components.JBCheckBox)1 JBLabel (com.intellij.ui.components.JBLabel)1 JBScrollPane (com.intellij.ui.components.JBScrollPane)1 Wrapper (com.intellij.ui.components.panels.Wrapper)1