Changeset 8261 in josm for trunk/src/org
- Timestamp:
- 2015-04-25T14:08:07+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/BoxTextElemStyle.java
r8126 r8261 120 120 HorizontalTextAlignment hAlign = HorizontalTextAlignment.RIGHT; 121 121 Keyword hAlignKW = c.get(TEXT_ANCHOR_HORIZONTAL, Keyword.RIGHT, Keyword.class); 122 if ("left".equals(hAlignKW.val)) {123 hAlign = HorizontalTextAlignment.LEFT;124 } else if ("center".equals(hAlignKW.val)) {125 hAlign = HorizontalTextAlignment.CENTER;126 } else if ("right".equals(hAlignKW.val)) {127 hAlign = HorizontalTextAlignment.RIGHT;122 switch (hAlignKW.val) { 123 case "left": 124 hAlign = HorizontalTextAlignment.LEFT; 125 break; 126 case "center": 127 hAlign = HorizontalTextAlignment.CENTER; 128 128 } 129 129 VerticalTextAlignment vAlign = VerticalTextAlignment.BOTTOM; 130 String vAlignStr = c.get(TEXT_ANCHOR_VERTICAL, Keyword.BOTTOM, Keyword.class).val; 131 if ("above".equals(vAlignStr)) { 132 vAlign = VerticalTextAlignment.ABOVE; 133 } else if ("top".equals(vAlignStr)) { 134 vAlign = VerticalTextAlignment.TOP; 135 } else if ("center".equals(vAlignStr)) { 136 vAlign = VerticalTextAlignment.CENTER; 137 } else if ("bottom".equals(vAlignStr)) { 138 vAlign = VerticalTextAlignment.BOTTOM; 139 } else if ("below".equals(vAlignStr)) { 140 vAlign = VerticalTextAlignment.BELOW; 130 Keyword vAlignKW = c.get(TEXT_ANCHOR_VERTICAL, Keyword.BOTTOM, Keyword.class); 131 switch (vAlignKW.val) { 132 case "bottom": 133 vAlign = VerticalTextAlignment.BOTTOM; 134 break; 135 case "above": 136 vAlign = VerticalTextAlignment.ABOVE; 137 break; 138 case "top": 139 vAlign = VerticalTextAlignment.TOP; 140 break; 141 case "center": 142 vAlign = VerticalTextAlignment.CENTER; 143 break; 144 case "below": 145 vAlign = VerticalTextAlignment.BELOW; 141 146 } 142 147
Note:
See TracChangeset
for help on using the changeset viewer.