Search in sources :

Example 6 with StateRestoringCheckBox

use of com.intellij.ui.StateRestoringCheckBox in project intellij-community by JetBrains.

the class IntroduceParameterSettingsUI method createLocalVariablePanel.

protected void createLocalVariablePanel(GridBagConstraints gbConstraints, JPanel panel, JavaRefactoringSettings settings) {
    if (myIsLocalVariable && !myIsInvokedOnDeclaration) {
        myCbDeleteLocalVariable = new StateRestoringCheckBox();
        myCbDeleteLocalVariable.setText(RefactoringBundle.message("delete.variable.declaration"));
        myCbDeleteLocalVariable.setFocusable(false);
        gbConstraints.gridy++;
        panel.add(myCbDeleteLocalVariable, gbConstraints);
        myCbDeleteLocalVariable.setSelected(settings.INTRODUCE_PARAMETER_DELETE_LOCAL_VARIABLE);
        gbConstraints.insets = JBUI.insets(0, 0, 4, 8);
        if (myHasInitializer) {
            myCbUseInitializer = new StateRestoringCheckBox();
            myCbUseInitializer.setText(RefactoringBundle.message("use.variable.initializer.to.initialize.parameter"));
            myCbUseInitializer.setSelected(settings.INTRODUCE_PARAMETER_USE_INITIALIZER);
            myCbUseInitializer.setFocusable(false);
            gbConstraints.gridy++;
            panel.add(myCbUseInitializer, gbConstraints);
        }
    }
}
Also used : StateRestoringCheckBox(com.intellij.ui.StateRestoringCheckBox)

Example 7 with StateRestoringCheckBox

use of com.intellij.ui.StateRestoringCheckBox in project intellij-community by JetBrains.

the class AbstractFindUsagesDialog method addCheckboxToPanel.

protected StateRestoringCheckBox addCheckboxToPanel(String name, boolean toSelect, JPanel panel, boolean toUpdate) {
    StateRestoringCheckBox cb = new StateRestoringCheckBox(name);
    cb.setSelected(toSelect);
    panel.add(cb);
    if (toUpdate) {
        cb.addActionListener(___ -> update());
    }
    return cb;
}
Also used : StateRestoringCheckBox(com.intellij.ui.StateRestoringCheckBox)

Example 8 with StateRestoringCheckBox

use of com.intellij.ui.StateRestoringCheckBox in project android by JetBrains.

the class UnusedResourcesDialog method createNorthPanel.

@Override
protected JComponent createNorthPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    myCbIncludeIds = new StateRestoringCheckBox();
    myCbIncludeIds.setText("Delete unused @id declarations too");
    panel.add(myCbIncludeIds, BorderLayout.CENTER);
    return panel;
}
Also used : StateRestoringCheckBox(com.intellij.ui.StateRestoringCheckBox)

Aggregations

StateRestoringCheckBox (com.intellij.ui.StateRestoringCheckBox)8 ItemEvent (java.awt.event.ItemEvent)3 ItemListener (java.awt.event.ItemListener)3 RefactoringSettings (com.intellij.refactoring.RefactoringSettings)1 NonFocusableCheckBox (com.intellij.ui.NonFocusableCheckBox)1 ClassFilterEditor (com.intellij.ui.classFilter.ClassFilterEditor)1 VerticalBox (com.intellij.ui.components.panels.VerticalBox)1 GridBagConstraints (java.awt.GridBagConstraints)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 ChangeEvent (javax.swing.event.ChangeEvent)1 ChangeListener (javax.swing.event.ChangeListener)1 NotNull (org.jetbrains.annotations.NotNull)1