Revision 12970 trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/Mask.java
Mask.java | ||
---|---|---|
84 | 84 |
}; |
85 | 85 |
}; |
86 | 86 |
/** |
87 |
* Constructor method |
|
87 |
* Constructor method that initializes the parameters to create a tab to modify |
|
88 |
* attributes of a mask for points such as style,size and symbol (to represent a point |
|
89 |
* in the map). |
|
88 | 90 |
* @param owner |
89 |
*/
|
|
91 |
*/
|
|
90 | 92 |
public Mask(AbstractTypeSymbolEditor owner) { |
91 | 93 |
super(); |
92 | 94 |
setName(PluginServices.getText(this, "mask")); |
... | ... | |
115 | 117 |
add(aux); |
116 | 118 |
add(aux2); |
117 | 119 |
} |
118 |
/** |
|
119 |
* To obtain the size for the text halo.This size is taken from a |
|
120 |
* JIncrementalNumberField. If this component does not exist, |
|
121 |
* a new JIncrementalNumberField is created to specify it. |
|
122 |
* @return |
|
123 |
*/ |
|
120 |
/**
|
|
121 |
* To obtain the size for the text halo.This size is taken from a
|
|
122 |
* JIncrementalNumberField. If this component does not exist,
|
|
123 |
* a new JIncrementalNumberField is created to specify it.
|
|
124 |
* @return
|
|
125 |
*/
|
|
124 | 126 |
private JIncrementalNumberField getTxtHaloSize() { |
125 | 127 |
if (txtHaloSize == null) { |
126 | 128 |
txtHaloSize = new JIncrementalNumberField(String.valueOf(0), 5, 0, Double.MAX_VALUE, 1); |
... | ... | |
129 | 131 |
return txtHaloSize; |
130 | 132 |
} |
131 | 133 |
|
132 |
/** |
|
133 |
* Creates the button that allows the user to select the symbol that will substitute |
|
134 |
* a point in the map. |
|
135 |
* @return |
|
136 |
*/ |
|
134 |
/**
|
|
135 |
* Creates the button that allows the user to select the symbol that will substitute
|
|
136 |
* a point in the map.
|
|
137 |
* @return
|
|
138 |
*/
|
|
137 | 139 |
private JButton getBtnHaloSymbol() { |
138 | 140 |
if (btnHaloSymbol == null) { |
139 | 141 |
btnHaloSymbol = new JButton(PluginServices.getText(this, "symbol")); |
... | ... | |
149 | 151 |
return btnHaloSymbol; |
150 | 152 |
} |
151 | 153 |
|
152 |
/** |
|
153 |
* To determine if the halo style is selected.If the Radio button |
|
154 |
* that determines this information does not exist, a new radio button |
|
155 |
* is created for this purpose. |
|
156 |
* @return |
|
157 |
*/ |
|
154 |
/**
|
|
155 |
* To determine if the halo style is selected.If the Radio button
|
|
156 |
* that determines this information does not exist, a new radio button
|
|
157 |
* is created for this purpose.
|
|
158 |
* @return
|
|
159 |
*/
|
|
158 | 160 |
private JRadioButton getRdHalo() { |
159 | 161 |
if (rdBtnHalo == null) { |
160 | 162 |
rdBtnHalo = new JRadioButton(PluginServices.getText(this, "halo")); |
... | ... | |
163 | 165 |
return rdBtnHalo; |
164 | 166 |
} |
165 | 167 |
|
166 |
/**
|
|
167 |
* To determine if there will be no defined style for a point (without halo). |
|
168 |
* If the Radio button that determines this information does not exist, |
|
169 |
* a new radio button is created for this purpose. |
|
170 |
* @return |
|
171 |
*/ |
|
168 |
/**
|
|
169 |
* To determine if there will be no defined style for a point (without halo).
|
|
170 |
* If the Radio button that determines this information does not exist,
|
|
171 |
* a new radio button is created for this purpose.
|
|
172 |
* @return
|
|
173 |
*/
|
|
172 | 174 |
private JRadioButton getRdNone() { |
173 | 175 |
if (rdBtnNone == null) { |
174 | 176 |
rdBtnNone = new JRadioButton(PluginServices.getText(this, "none")); |
... | ... | |
177 | 179 |
|
178 | 180 |
return rdBtnNone; |
179 | 181 |
} |
180 |
/** |
|
181 |
* To determine if a mask will be added or not in the map
|
|
182 |
* @param mask |
|
183 |
*/ |
|
182 |
/**
|
|
183 |
* Sets the graphical component that shows the properties of the model.
|
|
184 |
* @param mask
|
|
185 |
*/
|
|
184 | 186 |
public void setModel(IMask mask) { |
185 | 187 |
if (mask != null) { |
186 | 188 |
getTxtHaloSize().setDouble(mask.getSize()); |
... | ... | |
188 | 190 |
} |
189 | 191 |
getRdHalo().setSelected(mask != null); |
190 | 192 |
} |
191 |
/** |
|
192 |
* This method returns an IMask or null depending on the option |
|
193 |
* that the user had decided (if he wants a mask or not)in the tab "mask" inside |
|
194 |
* the panel to edit the properities of a symbol (SymbolEditor). |
|
195 |
* If the user |
|
196 |
* wants it, a new IMask is created. |
|
197 |
* @return |
|
198 |
*/ |
|
193 |
/**
|
|
194 |
* This method returns an IMask or null depending on the option
|
|
195 |
* that the user had decided (if he wants a mask or not)in the tab "mask" inside
|
|
196 |
* the panel to edit the properities of a symbol (SymbolEditor).
|
|
197 |
* If the user
|
|
198 |
* wants it, a new IMask is created.
|
|
199 |
* @return
|
|
200 |
*/
|
|
199 | 201 |
public IMask getMask() { |
200 | 202 |
if (!getRdHalo().isSelected()) return null; |
201 | 203 |
|
Also available in: Unified diff