1
2
3
4
5
6 package nl.javel.gisbeans.map;
7
8 import java.awt.Color;
9 import java.awt.Font;
10
11 /***
12 * This class defines the attribute.
13 *
14 * @author <a href="mailto:paul.jacobs@javel.nl">Paul Jacobs </a>
15 * @since JDK 1.0
16 * @version 1.0
17 */
18 public abstract class AbstractAttribute implements AttributeInterface
19 {
20 /*** the default font to use */
21 private Font font = new Font("arial", Font.TRUETYPE_FONT, 10);
22
23 /*** the font color */
24 private Color fontColor = Color.BLACK;
25
26 /*** the position of the attribute */
27 private int position = MapInterface.CC;
28
29 /*** the layer of this attribute */
30 protected LayerInterface layer = null;
31
32 /*** the minimumScale */
33 private double minScale = Double.MAX_VALUE;
34
35 /*** the maximumScale */
36 private double maxScale = 0.0;
37
38 /***
39 * constructs a new AbstractAttribute
40 *
41 * @param layer the layer of this attribute
42 */
43 public AbstractAttribute(LayerInterface layer)
44 {
45 super();
46 this.layer = layer;
47 }
48
49 /***
50 * @see nl.javel.gisbeans.map.AttributeInterface#setFont(java.awt.Font)
51 */
52 public void setFont(Font font)
53 {
54 this.font = font;
55 }
56
57 /***
58 * @see nl.javel.gisbeans.map.AttributeInterface#getFont()
59 */
60 public Font getFont()
61 {
62 return this.font;
63 }
64
65 /***
66 * @see nl.javel.gisbeans.map.AttributeInterface#getFontColor()
67 */
68 public Color getFontColor()
69 {
70 return this.fontColor;
71 }
72
73 /***
74 * @see nl.javel.gisbeans.map.AttributeInterface#setFontColor(java.awt.Color)
75 */
76 public void setFontColor(Color fontColor)
77 {
78 this.fontColor = fontColor;
79 }
80
81 /***
82 * @see nl.javel.gisbeans.map.AttributeInterface#getValue(int)
83 */
84 public abstract String getValue(int shapeIndex);
85
86
87 /***
88 * @see nl.javel.gisbeans.map.AttributeInterface#getAngle(int)
89 */
90 public abstract double getAngle(int shapeIndex);
91
92 /***
93 * @see nl.javel.gisbeans.map.AttributeInterface#getPosition()
94 */
95 public int getPosition()
96 {
97 return this.position;
98 }
99
100 /***
101 * @see nl.javel.gisbeans.map.AttributeInterface#setPosition(int)
102 */
103 public void setPosition(int position)
104 {
105 this.position = position;
106 }
107
108 /***
109 * @see nl.javel.gisbeans.map.AttributeInterface#getLayer()
110 */
111 public LayerInterface getLayer()
112 {
113 return this.layer;
114 }
115
116 /***
117 * @see nl.javel.gisbeans.map.AttributeInterface#getMaxScale()
118 */
119 public double getMaxScale()
120 {
121 return this.maxScale;
122 }
123
124 /***
125 * @see nl.javel.gisbeans.map.AttributeInterface#getMinScale()
126 */
127 public double getMinScale()
128 {
129 return this.minScale;
130 }
131
132 /***
133 * @see nl.javel.gisbeans.map.AttributeInterface#setMaxScale(int)
134 */
135 public void setMaxScale(double maxScale)
136 {
137 this.maxScale = maxScale;
138 }
139
140 /***
141 * @see nl.javel.gisbeans.map.AttributeInterface#setMinScale(int)
142 */
143 public void setMinScale(double minScale)
144 {
145 this.minScale = minScale;
146 }
147 }