Search in sources :

Example 11 with CheckBox

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

the class EmptyClassInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new GridBagLayout());
    final JPanel annotationsListControl = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
    final GridBagConstraints constraints = new GridBagConstraints();
    constraints.gridx = 0;
    constraints.gridy = 0;
    constraints.weightx = 1.0;
    constraints.weighty = 1.0;
    constraints.anchor = GridBagConstraints.WEST;
    constraints.fill = GridBagConstraints.BOTH;
    panel.add(annotationsListControl, constraints);
    constraints.gridy++;
    constraints.weighty = 0.0;
    constraints.fill = GridBagConstraints.HORIZONTAL;
    final CheckBox checkBox1 = new CheckBox(InspectionGadgetsBundle.message("empty.class.ignore.parameterization.option"), this, "ignoreClassWithParameterization");
    panel.add(checkBox1, constraints);
    constraints.gridy++;
    final CheckBox checkBox2 = new CheckBox("Ignore subclasses of java.lang.Throwable", this, "ignoreThrowables");
    panel.add(checkBox2, constraints);
    constraints.gridy++;
    final CheckBox checkBox3 = new CheckBox(InspectionGadgetsBundle.message("empty.catch.block.comments.option"), this, "commentsAreContent");
    panel.add(checkBox3, constraints);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox)

Example 12 with CheckBox

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

the class UtilityClassWithoutPrivateConstructorInspection method createOptionsPanel.

@Override
@Nullable
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JPanel annotationsPanel = SpecialAnnotationsUtil.createSpecialAnnotationsListControl(ignorableAnnotations, InspectionGadgetsBundle.message("ignore.if.annotated.by"));
    panel.add(annotationsPanel, BorderLayout.CENTER);
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("utility.class.without.private.constructor.option"), this, "ignoreClassesWithOnlyMain");
    panel.add(checkBox, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) Nullable(org.jetbrains.annotations.Nullable)

Example 13 with CheckBox

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

the class BadExceptionDeclaredInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JComponent panel = new JPanel(new GridBagLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(exceptions, InspectionGadgetsBundle.message("exception.class.column.name")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.exception.class"), "java.lang.Throwable");
    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 checkBox2 = new CheckBox(InspectionGadgetsBundle.message("ignore.exceptions.declared.on.library.override.option"), this, "ignoreLibraryOverrides");
    constraints.weighty = 0.0;
    constraints.gridy = 1;
    panel.add(checkBox2, constraints);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Example 14 with CheckBox

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

the class TestMethodWithoutAssertionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(Arrays.asList(methodMatcher.getClassNames(), methodMatcher.getMethodNamePatterns()), "Assertion class name", InspectionGadgetsBundle.message("method.name.regex")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, "Choose assertion class");
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("assert.keyword.is.considered.an.assertion"), this, "assertKeywordIsAssertion");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(checkBox, 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 15 with CheckBox

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

the class ClassWithoutLoggerInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JComponent panel = new JPanel(new BorderLayout());
    final ListTable table = new ListTable(new ListWrappingTableModel(loggerNames, InspectionGadgetsBundle.message("logger.class.name")));
    final JPanel tablePanel = UiUtils.createAddRemoveTreeClassChooserPanel(table, InspectionGadgetsBundle.message("choose.logger.class"));
    final CheckBox checkBox = new CheckBox(InspectionGadgetsBundle.message("super.class.logger.option"), this, "ignoreSuperLoggers");
    panel.add(tablePanel, BorderLayout.CENTER);
    panel.add(checkBox, BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

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