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);
}
}
}
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;
}
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;
}
Aggregations