comparison artifacts/src/main/java/org/dive4elements/river/themes/TextStyle.java @ 6911:1f1acbe5f243

Artifacts: Make TextStyle Make more robust.
author Sascha L. Teichmann <teichmann@intevation.de>
date Fri, 23 Aug 2013 14:17:35 +0200
parents af13ceeba52a
children 0a5239a1e46e
comparison
equal deleted inserted replaced
6910:a58a1a520948 6911:1f1acbe5f243
35 this.showBg = showBg; 35 this.showBg = showBg;
36 this.isVertical = isVertical; 36 this.isVertical = isVertical;
37 } 37 }
38 38
39 public void apply(XYTextAnnotation ta) { 39 public void apply(XYTextAnnotation ta) {
40 ta.setPaint(textColor); 40 if (textColor != null) {
41 ta.setFont(font); 41 ta.setPaint(textColor);
42 if (this.showBg) { 42 }
43 if (font != null) {
44 ta.setFont(font);
45 }
46 if (showBg) {
43 ta.setBackgroundPaint(bgColor); 47 ta.setBackgroundPaint(bgColor);
44 } 48 }
45 if (this.isVertical) { 49 if (isVertical) {
46 ta.setRotationAngle(270f*Math.PI/180f); 50 ta.setRotationAngle(270f*Math.PI/180f);
47 } 51 }
48 else { 52 else {
49 ta.setRotationAngle(0); 53 ta.setRotationAngle(0);
50 } 54 }

http://dive4elements.wald.intevation.org