Search in sources :

Example 1 with TextField

use of com.siyeh.ig.ui.TextField in project intellij-community by JetBrains.

the class LogStatementGuardedByLogConditionInspection method createOptionsPanel.

@Override
public JComponent createOptionsPanel() {
    final JPanel panel = new JPanel(new BorderLayout());
    final JLabel classNameLabel = new JLabel(InspectionGadgetsBundle.message("logger.name.option"));
    classNameLabel.setHorizontalAlignment(SwingConstants.TRAILING);
    final TextField loggerClassNameField = new TextField(this, "loggerClassName");
    final ListTable table = new ListTable(new ListWrappingTableModel(Arrays.asList(logMethodNameList, logConditionMethodNameList), InspectionGadgetsBundle.message("log.method.name"), InspectionGadgetsBundle.message("log.condition.text")));
    panel.add(UiUtils.createAddRemovePanel(table), BorderLayout.CENTER);
    panel.add(FormBuilder.createFormBuilder().addLabeledComponent(classNameLabel, loggerClassNameField).getPanel(), BorderLayout.NORTH);
    panel.add(new CheckBox(InspectionGadgetsBundle.message("log.statement.guarded.by.log.condition.flag.all.unguarded.option"), this, "flagAllUnguarded"), BorderLayout.SOUTH);
    return panel;
}
Also used : CheckBox(com.intellij.util.ui.CheckBox) ListTable(com.intellij.codeInspection.ui.ListTable) TextField(com.siyeh.ig.ui.TextField) ListWrappingTableModel(com.intellij.codeInspection.ui.ListWrappingTableModel)

Aggregations

ListTable (com.intellij.codeInspection.ui.ListTable)1 ListWrappingTableModel (com.intellij.codeInspection.ui.ListWrappingTableModel)1 CheckBox (com.intellij.util.ui.CheckBox)1 TextField (com.siyeh.ig.ui.TextField)1