1 | public void updateComponents(boolean b) {↵ | | 1 | public void updateComponents(boolean b) {↵
|
2 | super.updateComponents(b);↵ | | 2 | super.updateComponents(b);↵
|
|
3 | if (b) {↵ | | 3 | if (b) {↵
|
4 | matchComboBox.setSelectedItem(criteria.getCriteriaString());↵ | | 4 | matchComboBox.setSelectedItem(criteria.getCriteriaString());↵
|
5 | textField.setText(criteria.getPatternString());↵ | | 5 | textField.setText(criteria.getPatternString());↵
|
6 | } else {↵ | | 6 | } else {↵
|
7 | criteria↵ | | 7 | criteria↵
|
8 | .setCriteriaString((String) matchComboBox.getSelectedItem());↵ | | 8 | .setCriteriaString((String) matchComboBox.getSelectedItem());↵
|
9 | criteria.setPatternString((String) textField.getText());↵ | | 9 | criteria.setPatternString((String) textField.getText());↵
|
10 | }↵ | | 10 | }↵
|
11 | }↵ | | 11 | }↵
|
|
12 | public void initComponents() {↵ | | 12 | public void initComponents() {↵
|
13 | super.initComponents();↵ | | 13 | super.initComponents();↵
|
|
14 | matchComboBox = new JComboBox();↵ | | 14 | matchComboBox = new JComboBox();↵
|
15 | matchComboBox.addItem("contains");↵ | | 15 | matchComboBox.addItem("smaller");↵
|
16 | matchComboBox.addItem("contains not");↵ | | 16 | matchComboBox.addItem("bigger");↵
|
|
17 | addComponent(matchComboBox);↵ | | 17 | addComponent(matchComboBox);↵
|
|
18 | textField = new JTextField("body text", 12);↵ | | 18 | textField = new JTextField("size", 12);↵
|
|
19 | addComponent(textField) | | 19 | addComponent(textField)
|