Changeset 8208 in josm
- Timestamp:
- 2015-04-18T00:46:27+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/actions/search/SearchAction.java
r8198 r8208 269 269 270 270 final JPanel right; 271 if (Main.pref.getBoolean("dialog.search.new", true)) { 272 right = new JPanel(new GridBagLayout()); 273 buildHintsNew(right, hcbSearchString); 274 } else { 275 right = new JPanel(); 276 buildHints(right); 277 } 271 right = new JPanel(new GridBagLayout()); 272 buildHints(right, hcbSearchString); 278 273 279 274 final JPanel p = new JPanel(new GridBagLayout()); … … 339 334 } 340 335 341 private static void buildHints(JPanel right) { 342 DescriptionTextBuilder descriptionText = new DescriptionTextBuilder(); 343 descriptionText.append("<html><style>li.header{font-size:110%; list-style-type:none; margin-top:5px;}</style><ul>"); 344 descriptionText.appendItem(tr("<b>Baker Street</b> - ''Baker'' and ''Street'' in any key")); 345 descriptionText.appendItem(tr("<b>\"Baker Street\"</b> - ''Baker Street'' in any key")); 346 descriptionText.appendItem(tr("<b>key:Bak</b> - ''Bak'' anywhere in the key ''key''")); 347 descriptionText.appendItem(tr("<b>-key:Bak</b> - ''Bak'' nowhere in the key ''key''")); 348 descriptionText.appendItem(tr("<b>key=value</b> - key ''key'' with value exactly ''value''")); 349 descriptionText.appendItem(tr("<b>key=*</b> - key ''key'' with any value. Try also <b>*=value</b>, <b>key=</b>, <b>*=*</b>, <b>*=</b>")); 350 descriptionText.appendItem(tr("<b>key:</b> - key ''key'' set to any value")); 351 descriptionText.appendItem(tr("<b>key?</b> - key ''key'' with the value ''yes'', ''true'', ''1'' or ''on''")); 352 if(Main.pref.getBoolean("expert", false)) 353 { 354 descriptionText.appendItemHeader(tr("Special targets")); 355 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>type:</b>... - objects with corresponding type (<b>node</b>, <b>way</b>, <b>relation</b>)")); 356 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>user:</b>... - objects changed by user")); 357 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>user:anonymous</b> - objects changed by anonymous users")); 358 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>id:</b>... - objects with given ID (0 for new objects)")); 359 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>version:</b>... - objects with given version (0 objects without an assigned version)")); 360 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>changeset:</b>... - objects with given changeset ID (0 objects without an assigned changeset)")); 361 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>nodes:</b>... - objects with given number of nodes (<b>nodes:</b>count, <b>nodes:</b>min-max, <b>nodes:</b>min- or <b>nodes:</b>-max)")); 362 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>tags:</b>... - objects with given number of tags (<b>tags:</b>count, <b>tags:</b>min-max, <b>tags:</b>min- or <b>tags:</b>-max)")); 363 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>role:</b>... - objects with given role in a relation")); 364 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>timestamp:</b>timestamp - objects with this last modification timestamp (2009-11-12T14:51:09Z, 2009-11-12 or T14:51 ...)")); 365 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>timestamp:</b>min/max - objects with last modification within range")); 366 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>areasize:</b>... - closed ways with given area in m\u00b2 (<b>areasize:</b>min-max or <b>areasize:</b>max)")); 367 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>modified</b> - all changed objects")); 368 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>selected</b> - all selected objects")); 369 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>incomplete</b> - all incomplete objects")); 370 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>untagged</b> - all untagged objects")); 371 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>closed</b> - all closed ways (a node is not considered closed)")); 372 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>child <i>expr</i></b> - all children of objects matching the expression")); 373 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>parent <i>expr</i></b> - all parents of objects matching the expression")); 374 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>(all)indownloadedarea</b> - objects (and all its way nodes / relation members) in downloaded area")); 375 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("<b>(all)inview</b> - objects (and all its way nodes / relation members) in current view")); 376 } 377 /* I18n: don't translate the bold text keyword */ descriptionText.appendItem(tr("Use <b>|</b> or <b>OR</b> to combine with logical or")); 378 descriptionText.appendItem(tr("Use <b>\"</b> to quote operators (e.g. if key contains <b>:</b>)") 379 + "<br/>" 380 + tr("Within quoted strings the <b>\"</b> and <b>\\</b> characters need to be escaped by a preceding <b>\\</b> (e.g. <b>\\\"</b> and <b>\\\\</b>).")); 381 descriptionText.appendItem(tr("Use <b>(</b> and <b>)</b> to group expressions")); 382 descriptionText.append("</ul></html>"); 383 JLabel description = new JLabel(descriptionText.toString()); 384 description.setFont(description.getFont().deriveFont(Font.PLAIN)); 385 right.add(description); 386 } 387 388 private static void buildHintsNew(JPanel right, HistoryComboBox hcbSearchString) { 336 private static void buildHints(JPanel right, HistoryComboBox hcbSearchString) { 389 337 right.add(new SearchKeywordRow(hcbSearchString) 390 338 .addTitle(tr("basic examples"))
Note:
See TracChangeset
for help on using the changeset viewer.