Changeset 3967 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
- Timestamp:
- 2011-03-09T16:01:54+01:00 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/NodeElemStyle.java
r3903 r3967 121 121 122 122 } 123 123 124 124 public static final NodeElemStyle SIMPLE_NODE_ELEMSTYLE; 125 125 static { … … 171 171 if (te != null) { 172 172 HorizontalTextAlignment hAlign = HorizontalTextAlignment.RIGHT; 173 String hAlignStr = c.get("text-anchor-horizontal", null, String.class);174 if (equal(hAlign Str, "left")) {173 Keyword hAlignKW = c.get("text-anchor-horizontal", Keyword.RIGHT, Keyword.class); 174 if (equal(hAlignKW.val, "left")) { 175 175 hAlign = HorizontalTextAlignment.LEFT; 176 } else if (equal(hAlign Str, "center")) {176 } else if (equal(hAlignKW.val, "center")) { 177 177 hAlign = HorizontalTextAlignment.CENTER; 178 } else if (equal(hAlign Str, "right")) {178 } else if (equal(hAlignKW.val, "right")) { 179 179 hAlign = HorizontalTextAlignment.RIGHT; 180 180 } 181 181 VerticalTextAlignment vAlign = VerticalTextAlignment.BOTTOM; 182 String vAlignStr = c.get("text-anchor-vertical", null, String.class);182 String vAlignStr = c.get("text-anchor-vertical", Keyword.BOTTOM, Keyword.class).val; 183 183 if (equal(vAlignStr, "above")) { 184 184 vAlign = VerticalTextAlignment.ABOVE; … … 203 203 204 204 SymbolShape shape; 205 String shapeStr = c.get("symbol-shape", null, String.class); 206 if (equal(shapeStr, "square")) { 205 Keyword shapeKW = c.get("symbol-shape", null, Keyword.class); 206 if (shapeKW == null) 207 return null; 208 if (equal(shapeKW, "square")) { 207 209 shape = SymbolShape.SQUARE; 208 } else if (equal(shape Str, "circle")) {210 } else if (equal(shapeKW, "circle")) { 209 211 shape = SymbolShape.CIRCLE; 210 212 } else
Note:
See TracChangeset
for help on using the changeset viewer.