Changeset 15904 in josm for trunk/src/com/kitfox/svg/SVGElement.java
- Timestamp:
- 2020-02-22T19:40:29+01:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/SVGElement.java
r15901 r15904 89 89 * Styles defined for this elemnt via the <b>style</b> attribute. 90 90 */ 91 protected final HashMap<String, St yleAttribute> inlineStyles = new HashMap<>();91 protected final HashMap<String, String> inlineStyles = new HashMap<>(); 92 92 /** 93 93 * Presentation attributes set for this element. Ie, any attribute other 94 94 * than the <b>style</b> attribute. 95 95 */ 96 protected final HashMap<String, St yleAttribute> presAttribs = new HashMap<>();96 protected final HashMap<String, String> presAttributes = new HashMap<>(); 97 97 /** 98 98 * A list of presentation attributes to not include in the presentation … … 273 273 if (style != null) 274 274 { 275 HashMap<?, ?> map =XMLParseUtil.parseStyle(style, inlineStyles);275 XMLParseUtil.parseStyle(style, inlineStyles); 276 276 } 277 277 … … 299 299 String value = attrs.getValue(i); 300 300 301 presAttrib s.put(name, new StyleAttribute(name, value == null ? null : value.intern()));301 presAttributes.put(name, value == null ? null : value.intern()); 302 302 } 303 303 } … … 316 316 public Set<String> getPresentationAttributes() 317 317 { 318 return presAttrib s.keySet();318 return presAttributes.keySet(); 319 319 } 320 320 … … 486 486 487 487 //Check for local inline styles 488 St yleAttributestyAttr = inlineStyles.get(styName);489 490 attrib.setStringValue(styAttr == null ? "" : styAttr .getStringValue());488 String styAttr = inlineStyles.get(styName); 489 490 attrib.setStringValue(styAttr == null ? "" : styAttr); 491 491 492 492 //Return if we've found a non animated style … … 498 498 499 499 //Check for presentation attribute 500 St yleAttribute presAttr = presAttribs.get(styName);501 502 attrib.setStringValue(presAttr == null ? "" : presAttr .getStringValue());500 String presAttr = presAttributes.get(styName); 501 502 attrib.setStringValue(presAttr == null ? "" : presAttr); 503 503 504 504 //Return if we've found a presentation attribute instead … … 546 546 { 547 547 //Check for local inline styles 548 return inlineStyles.get(styName); 548 final String value = inlineStyles.get(styName); 549 return value != null ? new StyleAttribute(styName, value) : null; 549 550 } 550 551 … … 561 562 562 563 //Make sure we have a coresponding presentation attribute 563 St yleAttribute presAttr = presAttribs.get(presName);564 String presAttr = presAttributes.get(presName); 564 565 565 566 //Copy presentation value directly 566 attrib.setStringValue(presAttr == null ? "" : presAttr .getStringValue());567 attrib.setStringValue(presAttr == null ? "" : presAttr); 567 568 568 569 //Return if we found presentation attribute 569 if (presAttr != null) 570 { 571 return true; 572 } 573 574 return false; 570 return presAttr != null; 575 571 } 576 572 … … 584 580 { 585 581 //Check for local inline styles 586 return presAttribs.get(styName); 582 final String value = presAttributes.get(styName); 583 return value != null ? new StyleAttribute(styName, value) : null; 587 584 } 588 585
Note:
See TracChangeset
for help on using the changeset viewer.