SearchDialog.java
=================
old
|
new
|
|
52 | 52 | private final SearchSetting searchSettings; |
53 | 53 | |
54 | 54 | private final HistoryComboBox hcbSearchString = new HistoryComboBox(); |
55 | | private final JCheckBox addOnToolbar = new JCheckBox(tr("add toolbar button"), false); |
| 55 | private final JCheckBox addOnToolbar; |
56 | 56 | |
57 | 57 | private JCheckBox caseSensitive; |
58 | 58 | private JCheckBox allElements; |
… |
… |
|
75 | 75 | public SearchDialog(SearchSetting initialValues, List<String> searchExpressionHistory, boolean expertMode) { |
76 | 76 | super(MainApplication.getMainFrame(), |
77 | 77 | initialValues instanceof Filter ? tr("Filter") : tr("Search"), |
78 | | initialValues instanceof Filter ? tr("Submit filter") : tr("Start Search"), |
| 78 | initialValues instanceof Filter ? tr("Submit filter") : tr("Search"), |
79 | 79 | tr("Cancel")); |
80 | 80 | this.searchSettings = new SearchSetting(initialValues); |
81 | 81 | setButtonIcons("dialogs/search", "cancel"); |
… |
… |
|
98 | 98 | hcbSearchString.setPreferredSize(new Dimension(40, hcbSearchString.getPreferredSize().height)); |
99 | 99 | label.setLabelFor(hcbSearchString); |
100 | 100 | |
101 | | replace = new JRadioButton(tr("replace selection"), searchSettings.mode == SearchMode.replace); |
| 101 | replace = new JRadioButton(tr("select"), searchSettings.mode == SearchMode.replace); |
102 | 102 | add = new JRadioButton(tr("add to selection"), searchSettings.mode == SearchMode.add); |
103 | 103 | remove = new JRadioButton(tr("remove from selection"), searchSettings.mode == SearchMode.remove); |
104 | 104 | inSelection = new JRadioButton(tr("find in selection"), searchSettings.mode == SearchMode.in_selection); |
… |
… |
|
111 | 111 | caseSensitive = new JCheckBox(tr("case sensitive"), searchSettings.caseSensitive); |
112 | 112 | allElements = new JCheckBox(tr("all objects"), searchSettings.allElements); |
113 | 113 | allElements.setToolTipText(tr("Also include incomplete and deleted objects in search.")); |
| 114 | addOnToolbar = new JCheckBox(tr("add toolbar button"), false); |
| 115 | addOnToolbar.setToolTipText(tr("Add a button with this search expression to the toolbar.")); |
114 | 116 | |
115 | 117 | standardSearch = new JRadioButton(tr("standard"), !searchSettings.regexSearch && !searchSettings.mapCSSSearch); |
116 | 118 | regexSearch = new JRadioButton(tr("regular expression"), searchSettings.regexSearch); |
… |
… |
|
121 | 123 | bg2.add(mapCSSSearch); |
122 | 124 | |
123 | 125 | JPanel selectionSettings = new JPanel(new GridBagLayout()); |
124 | | selectionSettings.setBorder(BorderFactory.createTitledBorder(tr("Selection settings"))); |
| 126 | selectionSettings.setBorder(BorderFactory.createTitledBorder(tr("Results"))); |
125 | 127 | selectionSettings.add(replace, GBC.eol().anchor(GBC.WEST).fill(GBC.HORIZONTAL)); |
126 | 128 | selectionSettings.add(add, GBC.eol()); |
127 | 129 | selectionSettings.add(remove, GBC.eol()); |
128 | 130 | selectionSettings.add(inSelection, GBC.eop()); |
129 | 131 | |
130 | 132 | JPanel additionalSettings = new JPanel(new GridBagLayout()); |
131 | | additionalSettings.setBorder(BorderFactory.createTitledBorder(tr("Additional settings"))); |
| 133 | additionalSettings.setBorder(BorderFactory.createTitledBorder(tr("Options"))); |
132 | 134 | additionalSettings.add(caseSensitive, GBC.eol().anchor(GBC.WEST).fill(GBC.HORIZONTAL)); |
133 | 135 | |
134 | 136 | JPanel left = new JPanel(new GridBagLayout()); |
… |
… |
|
266 | 268 | |
267 | 269 | private static JPanel buildHintsSection(HistoryComboBox hcbSearchString, boolean expertMode) { |
268 | 270 | JPanel hintPanel = new JPanel(new GridBagLayout()); |
269 | | hintPanel.setBorder(BorderFactory.createTitledBorder(tr("Search hints"))); |
| 271 | hintPanel.setBorder(BorderFactory.createTitledBorder(tr("Hints"))); |
270 | 272 | |
271 | 273 | hintPanel.add(new SearchKeywordRow(hcbSearchString) |
272 | 274 | .addTitle(tr("basics")) |
273 | 275 | .addKeyword(tr("Baker Street"), null, tr("''Baker'' and ''Street'' in any key")) |
274 | 276 | .addKeyword(tr("\"Baker Street\""), "\"\"", tr("''Baker Street'' in any key")) |
275 | 277 | .addKeyword("<i>key</i>:<i>valuefragment</i>", null, |
276 | | tr("''valuefragment'' anywhere in ''key''"), "name:str matches name=Bakerstreet") |
| 278 | tr("''valuefragment'' anywhere in ''key''"), tr("name:str matches name=Bakerstreet")) |
277 | 279 | .addKeyword("-<i>key</i>:<i>valuefragment</i>", null, tr("''valuefragment'' nowhere in ''key''")), |
278 | 280 | GBC.eol()); |
279 | 281 | hintPanel.add(new SearchKeywordRow(hcbSearchString) |
… |
… |
|
286 | 288 | .addKeyword("\"key\"=\"value\"", "\"\"=\"\"", |
287 | 289 | tr("to quote operators.<br>Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped " + |
288 | 290 | "by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>)."), |
| 291 | tr("\"Baker Street\""), |
289 | 292 | "\"addr:street\""), |
290 | 293 | GBC.eol().anchor(GBC.CENTER)); |
291 | 294 | hintPanel.add(new SearchKeywordRow(hcbSearchString) |
292 | 295 | .addTitle(tr("combinators")) |
293 | | .addKeyword("<i>expr</i> <i>expr</i>", null, tr("logical and (both expressions have to be satisfied)")) |
| 296 | .addKeyword("<i>expr</i> <i>expr</i>", null, tr("logical and (both expressions have to be satisfied)"), |
| 297 | tr("Baker Street")) |
294 | 298 | .addKeyword("<i>expr</i> | <i>expr</i>", "| ", tr("logical or (at least one expression has to be satisfied)")) |
295 | 299 | .addKeyword("<i>expr</i> OR <i>expr</i>", "OR ", tr("logical or (at least one expression has to be satisfied)")) |
296 | 300 | .addKeyword("-<i>expr</i>", null, tr("logical not")) |
… |
… |
|
314 | 318 | GBC.eol().anchor(GBC.CENTER)); |
315 | 319 | hintPanel.add(new SearchKeywordRow(hcbSearchString) |
316 | 320 | .addTitle(tr("metadata")) |
317 | | .addKeyword("user:", "user:", tr("objects changed by user", "user:anonymous")) |
318 | | .addKeyword("id:", "id:", tr("objects with given ID"), "id:0 (new objects)") |
319 | | .addKeyword("version:", "version:", tr("objects with given version"), "version:0 (objects without an assigned version)") |
| 321 | .addKeyword("user:", "user:", tr("objects changed by user"), tr("user:anonymous")) |
| 322 | .addKeyword("id:", "id:", tr("objects with given ID"), tr("id:0 (new objects)")) |
| 323 | .addKeyword("version:", "version:", tr("objects with given version"), tr("version:0 (objects without an assigned version)")) |
320 | 324 | .addKeyword("changeset:", "changeset:", tr("objects with given changeset ID"), |
321 | | "changeset:0 (objects without an assigned changeset)") |
| 325 | tr("changeset:0 (objects without an assigned changeset)")) |
322 | 326 | .addKeyword("timestamp:", "timestamp:", tr("objects with last modification timestamp within range"), "timestamp:2012/", |
323 | 327 | "timestamp:2008/2011-02-04T12"), |
324 | 328 | GBC.eol()); |