use of com.intellij.util.ui.CheckBox in project intellij-community by JetBrains.
the class OverlyComplexBooleanExpressionInspectionBase method createOptionsPanel.
@Override
public JComponent createOptionsPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
final CheckBox ignoreConjunctionsDisjunctionsCheckBox = new CheckBox(InspectionGadgetsBundle.message("overly.complex.boolean.expression.ignore.option"), this, "m_ignorePureConjunctionsDisjunctions");
final NumberFormat formatter = NumberFormat.getIntegerInstance();
formatter.setParseIntegerOnly(true);
final JFormattedTextField termLimitTextField = prepareNumberEditor("m_limit");
final GridBagConstraints constraints = new GridBagConstraints();
final JLabel label = new JLabel(InspectionGadgetsBundle.message("overly.complex.boolean.expression.max.terms.option"));
constraints.anchor = GridBagConstraints.BASELINE_LEADING;
constraints.fill = GridBagConstraints.HORIZONTAL;
panel.add(label, constraints);
constraints.fill = GridBagConstraints.NONE;
constraints.gridx = 1;
panel.add(termLimitTextField, constraints);
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
constraints.weightx = 1.0;
constraints.weighty = 1.0;
panel.add(ignoreConjunctionsDisjunctionsCheckBox, constraints);
return panel;
}
use of com.intellij.util.ui.CheckBox in project intellij-community by JetBrains.
the class MethodCouplingInspection method createOptionsPanel.
@Override
public JComponent createOptionsPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
final String configurationLabel = getConfigurationLabel();
final JLabel label = new JLabel(configurationLabel);
final JFormattedTextField valueField = prepareNumberEditor("m_limit");
final GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = 0;
constraints.weightx = 0.0;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE;
panel.add(label, constraints);
constraints.gridx = 1;
constraints.gridy = 0;
constraints.weightx = 1.0;
constraints.anchor = GridBagConstraints.NORTHWEST;
constraints.fill = GridBagConstraints.NONE;
panel.add(valueField, constraints);
final CheckBox arrayCheckBox = new CheckBox(InspectionGadgetsBundle.message("include.java.system.classes.option"), this, "m_includeJavaClasses");
final CheckBox objectCheckBox = new CheckBox(InspectionGadgetsBundle.message("include.library.classes.option"), this, "m_includeLibraryClasses");
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
constraints.fill = GridBagConstraints.HORIZONTAL;
panel.add(arrayCheckBox, constraints);
constraints.gridx = 0;
constraints.gridy = 2;
constraints.gridwidth = 2;
constraints.weighty = 1.0;
panel.add(objectCheckBox, constraints);
return panel;
}
use of com.intellij.util.ui.CheckBox in project intellij-community by JetBrains.
the class ClassCouplingInspection method createOptionsPanel.
@Override
public JComponent createOptionsPanel() {
final String configurationLabel = getConfigurationLabel();
final JLabel label = new JLabel(configurationLabel);
final JFormattedTextField valueField = prepareNumberEditor("m_limit");
final GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = 0;
constraints.weightx = 0.0;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE;
constraints.insets.right = UIUtil.DEFAULT_HGAP;
final JPanel panel = new JPanel(new GridBagLayout());
panel.add(label, constraints);
constraints.gridx = 1;
constraints.gridy = 0;
constraints.weightx = 1.0;
constraints.insets.right = 0;
constraints.anchor = GridBagConstraints.NORTHWEST;
constraints.fill = GridBagConstraints.NONE;
panel.add(valueField, constraints);
final CheckBox arrayCheckBox = new CheckBox(InspectionGadgetsBundle.message("include.java.system.classes.option"), this, "m_includeJavaClasses");
final CheckBox objectCheckBox = new CheckBox(InspectionGadgetsBundle.message("include.library.classes.option"), this, "m_includeLibraryClasses");
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
constraints.fill = GridBagConstraints.HORIZONTAL;
panel.add(arrayCheckBox, constraints);
constraints.gridx = 0;
constraints.gridy = 2;
constraints.weighty = 1;
constraints.gridwidth = 2;
panel.add(objectCheckBox, constraints);
return panel;
}
use of com.intellij.util.ui.CheckBox in project intellij-community by JetBrains.
the class FieldCountInspection method createOptionsPanel.
@Override
public JComponent createOptionsPanel() {
final String configurationLabel = getConfigurationLabel();
final JLabel label = new JLabel(configurationLabel);
final JFormattedTextField valueField = prepareNumberEditor("m_limit");
final CheckBox includeCheckBox = new CheckBox(InspectionGadgetsBundle.message("field.count.inspection.include.constant.fields.in.count.checkbox"), this, "m_countConstantFields");
final CheckBox considerCheckBox = new CheckBox(InspectionGadgetsBundle.message("field.count.inspection.static.final.fields.count.as.constant.checkbox"), this, "m_considerStaticFinalFieldsConstant");
final CheckBox enumConstantCheckBox = new CheckBox(InspectionGadgetsBundle.message("field.count.inspection.include.enum.constants.in.count"), this, "myCountEnumConstants");
final GridBagConstraints constraints = new GridBagConstraints();
constraints.gridx = 0;
constraints.gridy = 0;
constraints.weightx = 0.0;
constraints.weighty = 0.0;
constraints.insets.right = UIUtil.DEFAULT_HGAP;
constraints.anchor = GridBagConstraints.WEST;
constraints.fill = GridBagConstraints.NONE;
final JPanel panel = new JPanel(new GridBagLayout());
panel.add(label, constraints);
constraints.gridx = 1;
constraints.gridy = 0;
constraints.gridwidth = 1;
constraints.weightx = 1.0;
constraints.insets.right = 0;
constraints.anchor = GridBagConstraints.NORTHWEST;
panel.add(valueField, constraints);
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
panel.add(includeCheckBox, constraints);
constraints.gridy = 2;
panel.add(considerCheckBox, constraints);
constraints.gridy = 3;
constraints.weighty = 1;
panel.add(enumConstantCheckBox, constraints);
return panel;
}
use of com.intellij.util.ui.CheckBox in project intellij-community by JetBrains.
the class MultipleReturnPointsPerMethodInspection method createOptionsPanel.
@Override
public JComponent createOptionsPanel() {
final JPanel panel = new JPanel(new GridBagLayout());
final JLabel label = new JLabel(InspectionGadgetsBundle.message("return.point.limit.option"));
final JFormattedTextField termLimitTextField = prepareNumberEditor("m_limit");
final CheckBox ignoreGuardClausesCheckBox = new CheckBox(InspectionGadgetsBundle.message("ignore.guard.clauses.option"), this, "ignoreGuardClauses");
final CheckBox ignoreEqualsMethodCheckBox = new CheckBox(InspectionGadgetsBundle.message("ignore.for.equals.methods.option"), this, "ignoreEqualsMethod");
final GridBagConstraints constraints = new GridBagConstraints();
constraints.anchor = GridBagConstraints.BASELINE_LEADING;
constraints.fill = GridBagConstraints.HORIZONTAL;
constraints.gridx = 0;
constraints.gridy = 0;
panel.add(label, constraints);
constraints.fill = GridBagConstraints.NONE;
constraints.gridx = 1;
panel.add(termLimitTextField, constraints);
constraints.gridx = 0;
constraints.gridy = 1;
constraints.gridwidth = 2;
constraints.weightx = 1.0;
panel.add(ignoreGuardClausesCheckBox, constraints);
constraints.gridy = 2;
constraints.weighty = 1.0;
panel.add(ignoreEqualsMethodCheckBox, constraints);
return panel;
}
Aggregations