1 | public class BodyCriteriaRow extends DefaultCriteriaRow {↵ | | 1 | public class SizeCriteriaRow extends DefaultCriteriaRow {↵
|
2 | private JComboBox matchComboBox;↵ | | 2 | private JComboBox matchComboBox;↵
|
|
3 | private JTextField textField;↵ | | 3 | private JTextField textField;↵
|
|
4 | public BodyCriteriaRow(IExtensionHandler pluginHandler,↵ | | 4 | public SizeCriteriaRow(IExtensionHandler pluginHandler,↵
|
5 | CriteriaList criteriaList, FilterCriteria c) {↵ | | 5 | CriteriaList criteriaList, FilterCriteria c) {↵
|
6 | super(pluginHandler, criteriaList, c);↵ | | 6 | super(pluginHandler, criteriaList, c);↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public void updateComponents(boolean b) {↵ | | 8 | public void updateComponents(boolean b) {↵
|
9 | super.updateComponents(b);↵ | | 9 | super.updateComponents(b);↵
|
|
10 | if (b) {↵ | | 10 | if (b) {↵
|
11 | matchComboBox.setSelectedItem(criteria.getCriteriaString());↵ | | 11 | matchComboBox.setSelectedItem(criteria.getCriteriaString());↵
|
12 | textField.setText(criteria.getPatternString());↵ | | 12 | textField.setText(criteria.getPatternString());↵
|
13 | } else {↵ | | 13 | } else {↵
|
14 | criteria↵ | | 14 | criteria↵
|
15 | .setCriteriaString((String) matchComboBox.getSelectedItem());↵ | | 15 | .setCriteriaString((String) matchComboBox.getSelectedItem());↵
|
16 | criteria.setPatternString((String) textField.getText());↵ | | 16 | criteria.setPatternString((String) textField.getText());↵
|
17 | }↵ | | 17 | }↵
|
18 | }↵ | | 18 | }↵
|
|
19 | public void initComponents() {↵ | | 19 | public void initComponents() {↵
|
20 | super.initComponents();↵ | | 20 | super.initComponents();↵
|
|
21 | matchComboBox = new JComboBox();↵ | | 21 | matchComboBox = new JComboBox();↵
|
22 | matchComboBox.addItem("contains");↵ | | 22 | matchComboBox.addItem("smaller");↵
|
23 | matchComboBox.addItem("contains not");↵ | | 23 | matchComboBox.addItem("bigger");↵
|
|
24 | addComponent(matchComboBox);↵ | | 24 | addComponent(matchComboBox);↵
|
|
25 | textField = new JTextField("body text", 12);↵ | | 25 | textField = new JTextField("size", 12);↵
|
|
26 | addComponent(textField) | | 26 | addComponent(textField)
|