Mercurial > dive4elements > river
comparison gwt-client/src/main/java/org/dive4elements/river/client/client/ui/StyleEditorWindow.java @ 8600:d23982357c79
(issue1753) Fix editing the point color (not Color) of SQThemes.
Theme handling was already done case insensitive for some things
but not for all. This is better as it makes the theme
documents more robust and there is no ambiguity in the
supported keywords.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Fri, 20 Mar 2015 15:04:25 +0100 |
parents | b2d750a6df9f |
children | 5b568f7f18bc |
comparison
equal
deleted
inserted
replaced
8599:8641ce84a4b3 | 8600:d23982357c79 |
---|---|
348 continue; | 348 continue; |
349 } | 349 } |
350 | 350 |
351 DynamicForm property = createPropertyUI( | 351 DynamicForm property = createPropertyUI( |
352 set.getDisplayName(), | 352 set.getDisplayName(), |
353 set.getName(), | 353 set.getName().toLowerCase(), |
354 set.getType(), | 354 set.getType().toLowerCase(), |
355 set.getDefaultValue()); | 355 set.getDefaultValue()); |
356 if (property != null) { | 356 if (property != null) { |
357 vl.addMember(property); | 357 vl.addMember(property); |
358 } | 358 } |
359 } | 359 } |
475 } | 475 } |
476 c.setLabelAsTitle(true); | 476 c.setLabelAsTitle(true); |
477 f = c; | 477 f = c; |
478 } | 478 } |
479 } | 479 } |
480 else if (type.equals("Color")) { | 480 else if (type.equals("color")) { |
481 ColorPickerItem c = new ColorPickerItem(name, MSG.getString(name)); | 481 ColorPickerItem c = new ColorPickerItem(name, MSG.getString(name)); |
482 c.setValue(rgbToHtml(value)); | 482 c.setValue(rgbToHtml(value)); |
483 f = c; | 483 f = c; |
484 } | 484 } |
485 else if (type.equals("double")) { | 485 else if (type.equals("double")) { |
502 } | 502 } |
503 } | 503 } |
504 }); | 504 }); |
505 f.setValue(value); | 505 f.setValue(value); |
506 } | 506 } |
507 else if (type.equals("Dash")) { | 507 else if (type.equals("dash")) { |
508 f = new SelectItem(name, MSG.getString(name)); | 508 f = new SelectItem(name, MSG.getString(name)); |
509 LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>(); | 509 LinkedHashMap<String, String> valueIcons = new LinkedHashMap<String, String>(); |
510 f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-dash-"); | 510 f.setImageURLPrefix(GWT.getHostPageBaseURL() + "images/linestyle-dash-"); |
511 f.setImageURLSuffix(".png"); | 511 f.setImageURLSuffix(".png"); |
512 f.setValueIconHeight(20); | 512 f.setValueIconHeight(20); |
524 valueIcons.put("20,5,15,5", "20-5-15-5"); | 524 valueIcons.put("20,5,15,5", "20-5-15-5"); |
525 f.setValueIcons(valueIcons); | 525 f.setValueIcons(valueIcons); |
526 f.setValueMap(valueMap); | 526 f.setValueMap(valueMap); |
527 f.setValue(value); | 527 f.setValue(value); |
528 } | 528 } |
529 else if (type.equals("Font")) { | 529 else if (type.equals("font")) { |
530 f = new SelectItem(name, MSG.getString(name)); | 530 f = new SelectItem(name, MSG.getString(name)); |
531 LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); | 531 LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); |
532 valueMap.put("arial", "<span style='font-family:arial'>Arial</span>"); | 532 valueMap.put("arial", "<span style='font-family:arial'>Arial</span>"); |
533 valueMap.put("courier", "<span style='font-family:courier'>Courier</span>"); | 533 valueMap.put("courier", "<span style='font-family:courier'>Courier</span>"); |
534 valueMap.put("verdana", "<span style='font-family:verdana'>Verdana</span>"); | 534 valueMap.put("verdana", "<span style='font-family:verdana'>Verdana</span>"); |
535 valueMap.put("times", "<span style='font-family:times'>Times</span>"); | 535 valueMap.put("times", "<span style='font-family:times'>Times</span>"); |
536 f.setValueMap(valueMap); | 536 f.setValueMap(valueMap); |
537 f.setValue(value); | 537 f.setValue(value); |
538 } | 538 } |
539 else if (type.equals("Style")) { | 539 else if (type.equals("style")) { |
540 f = new SelectItem(name, MSG.getString(name)); | 540 f = new SelectItem(name, MSG.getString(name)); |
541 LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); | 541 LinkedHashMap<String, String> valueMap = new LinkedHashMap<String, String>(); |
542 valueMap.put("standard", "<span style='font-style:normal'>Normal</span>"); | 542 valueMap.put("standard", "<span style='font-style:normal'>Normal</span>"); |
543 valueMap.put("bold", "<span style='font-weight:bold'>Bold</span>"); | 543 valueMap.put("bold", "<span style='font-weight:bold'>Bold</span>"); |
544 valueMap.put("italic", "<span style='font-style:italic'>Italic</span>"); | 544 valueMap.put("italic", "<span style='font-style:italic'>Italic</span>"); |
545 f.setValueMap(valueMap); | 545 f.setValueMap(valueMap); |
546 f.setValue(value); | 546 f.setValue(value); |
547 } | 547 } |
548 else if (type.equals("Symbol")) { | 548 else if (type.equals("symbol")) { |
549 //create an empty element as long as this property can not be | 549 //create an empty element as long as this property can not be |
550 //changed. | 550 //changed. |
551 f = new StaticTextItem(""); | 551 f = new StaticTextItem(""); |
552 } | 552 } |
553 else { | 553 else { |