1
2
3
4
5
6 package nl.javel.gisbeans.map;
7
8 import java.awt.Color;
9 import java.awt.Dimension;
10 import java.awt.Font;
11
12 /***
13 * This class implements the LegendInterface
14 *
15 * @author <a href="mailto:paul.jacobs@javel.nl">Paul Jacobs </a>
16 * @since JDK 1.0
17 * @version 1.0
18 */
19 public class Legend implements LegendInterface
20 {
21 private Color backgroundColor = new Color(255, 255, 255, 255);
22
23 private boolean embed = false;
24
25 private Color outlineColor = new Color(0, 0, 0, 255);
26
27 private Color fontColor = new Color(0, 0, 0, 255);
28
29 private int position = MapInterface.UC;
30
31 private Dimension size = new Dimension(200, 100);
32
33 private boolean status = false;
34
35 private Font font = new Font("arial", Font.TRUETYPE_FONT, 10);
36
37 /***
38 * @see LegendInterface#getBackgroundColor()
39 */
40 public Color getBackgroundColor()
41 {
42 return this.backgroundColor;
43 }
44
45 /***
46 * @see LegendInterface#setBackgroundColor(Color)
47 */
48 public void setBackgroundColor(Color backgroundColor)
49 {
50 this.backgroundColor = backgroundColor;
51 }
52
53 /***
54 * @see LegendInterface#getOutlineColor()
55 */
56 public Color getOutlineColor()
57 {
58 return this.outlineColor;
59 }
60
61 /***
62 * @see LegendInterface#setOutlineColor(Color)
63 */
64 public void setOutlineColor(Color outlineColor)
65 {
66 this.outlineColor = outlineColor;
67 }
68
69 /***
70 * @see LegendInterface#getFontColor()
71 */
72 public Color getFontColor()
73 {
74 return this.fontColor;
75 }
76
77 /***
78 * @see LegendInterface#setFontColor(Color fontColor)
79 */
80 public void setFontColor(Color fontColor)
81 {
82 this.fontColor = fontColor;
83 }
84
85 /***
86 * @see LegendInterface#setFont(Font font)
87 */
88 public void setFont(Font font)
89 {
90 this.font = font;
91 }
92
93 /***
94 * @see LegendInterface#getFont()
95 */
96 public Font getFont()
97 {
98 return this.font;
99 }
100
101 /***
102 * @see LegendInterface#isEmbed()
103 */
104 public boolean isEmbed()
105 {
106 return this.embed;
107 }
108
109 /***
110 * @see LegendInterface#setEmbed(boolean)
111 */
112 public void setEmbed(boolean embed)
113 {
114 this.embed = embed;
115 }
116
117 /***
118 * @see LegendInterface#getPosition()
119 */
120 public int getPosition()
121 {
122 return this.position;
123 }
124
125 /***
126 * @see LegendInterface#setPosition(int)
127 */
128 public void setPosition(int position)
129 {
130 this.position = position;
131 }
132
133 /***
134 * @see LegendInterface#getSize()
135 */
136 public Dimension getSize()
137 {
138 return this.size;
139 }
140
141 /***
142 * @see LegendInterface#setSize(Dimension)
143 */
144 public void setSize(Dimension size)
145 {
146 this.size = size;
147 }
148
149 /***
150 * @see LegendInterface#isStatus()
151 */
152 public boolean isStatus()
153 {
154 return this.status;
155 }
156
157 /***
158 * @see LegendInterface#setStatus(boolean)
159 */
160 public void setStatus(boolean status)
161 {
162 this.status = status;
163 }
164 }