Changeset 11525 in josm for trunk/src/com/kitfox/svg/Text.java
- Timestamp:
- 2017-02-02T00:08:08+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/com/kitfox/svg/Text.java
r10787 r11525 44 44 import java.awt.geom.Point2D; 45 45 import java.awt.geom.Rectangle2D; 46 import java. util.Iterator;46 import java.io.Serializable; 47 47 import java.util.LinkedList; 48 import java.util.List; 48 49 import java.util.regex.Matcher; 49 50 import java.util.regex.Pattern; … … 63 64 float fontSize; 64 65 //List of strings and tspans containing the content of this node 65 LinkedList content = new LinkedList();66 LinkedList<Serializable> content = new LinkedList<>(); 66 67 Shape textShape; 67 68 public static final int TXAN_START = 0; … … 98 99 } 99 100 101 @Override 100 102 public String getTagName() 101 103 { … … 122 124 } 123 125 124 public java.util.ListgetContent()126 public List<Serializable> getContent() 125 127 { 126 128 return content; … … 131 133 * each child tag that has been processed 132 134 */ 135 @Override 133 136 public void loaderAddChild(SVGLoaderHelper helper, SVGElement child) throws SVGElementException 134 137 { … … 141 144 * Called during load process to add text scanned within a tag 142 145 */ 146 @Override 143 147 public void loaderAddText(SVGLoaderHelper helper, String text) 144 148 { … … 150 154 } 151 155 156 @Override 152 157 public void build() throws SVGException 153 158 { … … 273 278 } 274 279 } 275 280 276 281 if (font == null) 277 282 { … … 286 291 AffineTransform xform = new AffineTransform(); 287 292 288 for (Iterator it = content.iterator(); it.hasNext();) 289 { 290 Object obj = it.next(); 291 293 for (Serializable obj : content) { 292 294 if (obj instanceof String) 293 295 { … … 451 453 // } 452 454 455 @Override 453 456 public void render(Graphics2D g) throws SVGException 454 457 { … … 458 461 } 459 462 463 @Override 460 464 public Shape getShape() 461 465 { … … 463 467 } 464 468 469 @Override 465 470 public Rectangle2D getBoundingBox() throws SVGException 466 471 { … … 475 480 * update 476 481 */ 482 @Override 477 483 public boolean updateTime(double curTime) throws SVGException 478 484 {
Note:
See TracChangeset
for help on using the changeset viewer.