Renamed "BallonStyle" to "BalloonStyle" as described in Issue 11. Thanks Manuel.
Updownquark
12 years ago
0 | package org.boehn.kmlframework.kml; | |
1 | ||
2 | public class BallonStyle extends KmlObject { | |
3 | ||
4 | private String bgColor; | |
5 | private String textColor; | |
6 | private String text; | |
7 | private DisplayModeEnum displayMode; | |
8 | ||
9 | public BallonStyle() {} | |
10 | ||
11 | public BallonStyle(String bgColor, String textColor, String text, DisplayModeEnum displayMode) { | |
12 | this.bgColor = bgColor; | |
13 | this.textColor = textColor; | |
14 | this.text = text; | |
15 | this.displayMode = displayMode; | |
16 | } | |
17 | ||
18 | public String getBgColor() { | |
19 | return bgColor; | |
20 | } | |
21 | ||
22 | public void setBgColor(String bgColor) { | |
23 | this.bgColor = bgColor; | |
24 | } | |
25 | ||
26 | public String getTextColor() { | |
27 | return textColor; | |
28 | } | |
29 | ||
30 | public void setTextColor(String textColor) { | |
31 | this.textColor = textColor; | |
32 | } | |
33 | ||
34 | public String getText() { | |
35 | return text; | |
36 | } | |
37 | ||
38 | public void setText(String text) { | |
39 | this.text = text; | |
40 | } | |
41 | ||
42 | public DisplayModeEnum getDisplayMode() { | |
43 | return displayMode; | |
44 | } | |
45 | ||
46 | public void setDisplayMode(DisplayModeEnum displayMode) { | |
47 | this.displayMode = displayMode; | |
48 | } | |
49 | ||
50 | public void write(Kml kml) throws KmlException { | |
51 | kml.println("<BallonStyle" + getIdAndTargetIdFormatted(kml) + ">", 1); | |
52 | if (bgColor != null) { | |
53 | kml.println("<bgColor>" + bgColor + "</bgColor>"); | |
54 | } | |
55 | if (textColor != null) { | |
56 | kml.println("<textColor>" + textColor + "</textColor>"); | |
57 | } | |
58 | if (text != null) { | |
59 | kml.println("<text>" + text + "</text>"); | |
60 | } | |
61 | if (displayMode != null) { | |
62 | kml.println("<displayMode>" + (displayMode == DisplayModeEnum._default ? "default" : displayMode) + "</displayMode>"); | |
63 | } | |
64 | kml.println(-1, "</BallonStyle>"); | |
65 | } | |
66 | }⏎ |
0 | package org.boehn.kmlframework.kml; | |
1 | ||
2 | public class BalloonStyle extends KmlObject { | |
3 | ||
4 | private String bgColor; | |
5 | private String textColor; | |
6 | private String text; | |
7 | private DisplayModeEnum displayMode; | |
8 | ||
9 | public BalloonStyle() {} | |
10 | ||
11 | public BalloonStyle(String bgColor, String textColor, String text, DisplayModeEnum displayMode) { | |
12 | this.bgColor = bgColor; | |
13 | this.textColor = textColor; | |
14 | this.text = text; | |
15 | this.displayMode = displayMode; | |
16 | } | |
17 | ||
18 | public String getBgColor() { | |
19 | return bgColor; | |
20 | } | |
21 | ||
22 | public void setBgColor(String bgColor) { | |
23 | this.bgColor = bgColor; | |
24 | } | |
25 | ||
26 | public String getTextColor() { | |
27 | return textColor; | |
28 | } | |
29 | ||
30 | public void setTextColor(String textColor) { | |
31 | this.textColor = textColor; | |
32 | } | |
33 | ||
34 | public String getText() { | |
35 | return text; | |
36 | } | |
37 | ||
38 | public void setText(String text) { | |
39 | this.text = text; | |
40 | } | |
41 | ||
42 | public DisplayModeEnum getDisplayMode() { | |
43 | return displayMode; | |
44 | } | |
45 | ||
46 | public void setDisplayMode(DisplayModeEnum displayMode) { | |
47 | this.displayMode = displayMode; | |
48 | } | |
49 | ||
50 | public void write(Kml kml) throws KmlException { | |
51 | kml.println("<BalloonStyle" + getIdAndTargetIdFormatted(kml) + ">", 1); | |
52 | if (bgColor != null) { | |
53 | kml.println("<bgColor>" + bgColor + "</bgColor>"); | |
54 | } | |
55 | if (textColor != null) { | |
56 | kml.println("<textColor>" + textColor + "</textColor>"); | |
57 | } | |
58 | if (text != null) { | |
59 | kml.println("<text>" + text + "</text>"); | |
60 | } | |
61 | if (displayMode != null) { | |
62 | kml.println("<displayMode>" + (displayMode == DisplayModeEnum._default ? "default" : displayMode) + "</displayMode>"); | |
63 | } | |
64 | kml.println(-1, "</BalloonStyle>"); | |
65 | } | |
66 | }⏎ |
5 | 5 | private LabelStyle labelStyle; |
6 | 6 | private LineStyle lineStyle; |
7 | 7 | private PolyStyle polyStyle; |
8 | private BallonStyle ballonStyle; | |
8 | private BalloonStyle ballonStyle; | |
9 | 9 | private ListStyle listStyle; |
10 | 10 | |
11 | 11 | public Style() {} |
12 | 12 | |
13 | public Style(IconStyle iconStyle, LabelStyle labelStyle, LineStyle lineStyle, PolyStyle polyStyle, BallonStyle ballonStyle, ListStyle listStyle) { | |
13 | public Style(IconStyle iconStyle, LabelStyle labelStyle, LineStyle lineStyle, PolyStyle polyStyle, BalloonStyle ballonStyle, ListStyle listStyle) { | |
14 | 14 | this.iconStyle = iconStyle; |
15 | 15 | this.labelStyle = labelStyle; |
16 | 16 | this.lineStyle = lineStyle; |
51 | 51 | this.polyStyle = polyStyle; |
52 | 52 | } |
53 | 53 | |
54 | public BallonStyle getBallonStyle() { | |
54 | public BalloonStyle getBallonStyle() { | |
55 | 55 | return ballonStyle; |
56 | 56 | } |
57 | 57 | |
58 | public void setBallonStyle(BallonStyle ballonStyle) { | |
58 | public void setBallonStyle(BalloonStyle ballonStyle) { | |
59 | 59 | this.ballonStyle = ballonStyle; |
60 | 60 | } |
61 | 61 |