Search in sources :

Example 21 with CheckBox

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

the class RefusedBequestInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(annotations, null);
    final JCheckBox checkBox1 = new CheckBox("Only report when super method is annotated by:", this, "onlyReportWhenAnnotated");
    final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("refused.bequest.ignore.empty.super.methods.option"), this, "ignoreEmptySuperMethods");
    panel.add(checkBox1, BorderLayout.NORTH);
    panel.add(annotationsListControl, BorderLayout.CENTER);
    panel.add(checkBox2, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox)

Example 22 with CheckBox

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

the class PublicFieldInspection method createOptionsPanel.

@Override
@Nullable
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
    panel.add(annotationsListControl, BorderLayout.CENTER);
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("public.field.ignore.enum.type.fields.option"), this, "ignoreEnums");
    panel.add(checkBox, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) Nullable(org.jetbrains.annotations.Nullable)

Example 23 with CheckBox

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

the class BooleanMethodNameMustStartWithQuestionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new GridBagLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(questionList, InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.column.name")));
    final JPanel tablePanel = UiUtils.createAddRemovePanel(table);
    final GridBagConstraints constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 0;
    constraints.weightx = 1.0;
    constraints.weighty = 1.0;
    constraints.fill = GridBagConstraints.BOTH;
    panel.add(tablePanel, constraints);
    final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.with.boolean.return.type.option"), this, "ignoreBooleanMethods");
    constraints.gridy = 1;
    constraints.weighty = 0.0;
    panel.add(checkBox1, constraints);
    final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("ignore.boolean.methods.in.an.interface.option"), this, "ignoreInAnnotationInterface");
    constraints.gridy = 2;
    panel.add(checkBox2, constraints);
    final CheckBox checkBox3 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.overriding.super.method"), this, "onlyWarnOnBaseMethods");
    constraints.gridy = 3;
    panel.add(checkBox3, constraints);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 24 with CheckBox

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

the class NonBooleanMethodNameMayNotStartWithQuestionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(questionList, InspectionGadgetsBundle.message("boolean.method.name.must.start.with.question.table.column.name")));
    final JPanel tablePanel = UiUtils.createAddRemovePanel(table);
    final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.with.boolean.return.type.option"), this, "ignoreBooleanMethods");
    final CheckBox checkBox2 = new CheckBox(InspectionGadgetsBundle.message("ignore.methods.overriding.super.method"), this, "onlyWarnOnBaseMethods");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(FormBuilder.createFormBuilder().addComponent(checkBox1).addComponent(checkBox2).getPanel(), BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 25 with CheckBox

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

the class ConstructorCountInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JLabel label = new JLabel(getConfigurationLabel());
    final JFormattedTextField valueField = prepareNumberEditor("m_limit");
    final CheckBox includeCheckBox = new CheckBox(InspectionGadgetsBundle.message("too.many.constructors.ignore.deprecated.option"), this, "ignoreDeprecatedConstructors");
    final GridBag bag = new GridBag();
    bag.setDefaultInsets(0, 0, 0, UIUtil.DEFAULT_HGAP);
    bag.setDefaultAnchor(GridBagConstraints.WEST);
    final JPanel panel = new JPanel(new GridBagLayout());
    panel.add(label, bag.nextLine().next());
    panel.add(valueField, bag.next().weightx(1.0));
    panel.add(includeCheckBox, bag.nextLine().next().coverLine().weighty(1.0).anchor(GridBagConstraints.NORTHWEST));
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) GridBag(com.intellij.util.ui.GridBag)

Aggregations

CheckBox (com.intellij.util.ui.CheckBox)28 ListTable (com.intellij.codeInspection.ui.ListTable)9 ListWrappingTableModel (com.intellij.codeInspection.ui.ListWrappingTableModel)9 Nullable (org.jetbrains.annotations.Nullable)5 DocumentAdapter (com.intellij.ui.DocumentAdapter)2 NumberFormat (java.text.NumberFormat)2 DocumentEvent (javax.swing.event.DocumentEvent)2 Document (javax.swing.text.Document)2 NotNull (org.jetbrains.annotations.NotNull)2 ListEditForm (com.intellij.codeInspection.ui.ListEditForm)1 RegExFormatter (com.intellij.codeInspection.ui.RegExFormatter)1 RegExInputVerifier (com.intellij.codeInspection.ui.RegExInputVerifier)1 OnePixelSplitter (com.intellij.ui.OnePixelSplitter)1 VerticalLayout (com.intellij.ui.components.panels.VerticalLayout)1 GridBag (com.intellij.util.ui.GridBag)1 TextField (com.siyeh.ig.ui.TextField)1 ParseException (java.text.ParseException)1 Pattern (java.util.regex.Pattern)1 PatternSyntaxException (java.util.regex.PatternSyntaxException)1