Revision 10626 trunk/extensions/extGeoprocessingExtensions/src/com/iver/cit/gvsig/geoprocess/impl/xyshift/gui/GeoprocessingXYShiftPanel.java
GeoprocessingXYShiftPanel.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.4 2006-08-11 17:17:55 azabala |
|
48 |
* Revision 1.5 2007-03-06 16:48:14 caballero |
|
49 |
* Exceptions |
|
50 |
* |
|
51 |
* Revision 1.4 2006/08/11 17:17:55 azabala |
|
49 | 52 |
* *** empty log message *** |
50 | 53 |
* |
51 | 54 |
* Revision 1.3 2006/07/03 20:29:08 azabala |
... | ... | |
63 | 66 |
|
64 | 67 |
import java.awt.event.ItemEvent; |
65 | 68 |
|
66 |
import com.iver.cit.gvsig.fmap.DriverException;
|
|
69 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException;
|
|
67 | 70 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
68 | 71 |
import com.iver.cit.gvsig.fmap.layers.FLayers; |
69 | 72 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
... | ... | |
84 | 87 |
import javax.swing.BorderFactory; |
85 | 88 |
import javax.swing.border.EtchedBorder; |
86 | 89 |
|
87 |
public class GeoprocessingXYShiftPanel
|
|
90 |
public class GeoprocessingXYShiftPanel |
|
88 | 91 |
extends AbstractGeoprocessPanel { |
89 | 92 |
|
90 | 93 |
private static final long serialVersionUID = 1L; |
... | ... | |
101 | 104 |
private JLabel offsetLabel = null; |
102 | 105 |
|
103 | 106 |
/** |
104 |
* This method initializes
|
|
105 |
*
|
|
107 |
* This method initializes |
|
108 |
* |
|
106 | 109 |
*/ |
107 | 110 |
public GeoprocessingXYShiftPanel(FLayers layers) { |
108 | 111 |
super(); |
109 | 112 |
this.layers = layers; |
110 | 113 |
initialize(); |
111 | 114 |
} |
112 |
|
|
115 |
|
|
113 | 116 |
public double getXOffset() throws GeoprocessException{ |
114 | 117 |
try { |
115 | 118 |
String strDist = xoffsetTextField.getText(); |
... | ... | |
119 | 122 |
"Offset en x introducido no numerico"); |
120 | 123 |
} |
121 | 124 |
} |
122 |
|
|
125 |
|
|
123 | 126 |
public double getYOffset() throws GeoprocessException{ |
124 | 127 |
try { |
125 | 128 |
String strDist = yoffsetTextField.getText(); |
... | ... | |
129 | 132 |
"Distancia de buffer introducida no numerica"); |
130 | 133 |
} |
131 | 134 |
} |
132 |
|
|
135 |
|
|
133 | 136 |
/** |
134 | 137 |
* Tells if apply geoprocess only to selected features of the input |
135 | 138 |
* layer or to all features |
... | ... | |
141 | 144 |
|
142 | 145 |
/** |
143 | 146 |
* This method initializes this |
144 |
*
|
|
147 |
* |
|
145 | 148 |
*/ |
146 | 149 |
private void initialize() { |
147 | 150 |
offsetLabel = new JLabel(); |
... | ... | |
170 | 173 |
this.add(jLabel3, null); |
171 | 174 |
this.add(getYoffsetjTextField1(), null); |
172 | 175 |
this.add(offsetLabel, null); |
173 |
this.add(getLayersComboBox(), null);
|
|
176 |
this.add(getLayersComboBox(), null); |
|
174 | 177 |
} |
175 | 178 |
|
176 | 179 |
/** |
177 |
* This method initializes selectedOnlyCheckBox
|
|
178 |
*
|
|
179 |
* @return javax.swing.JCheckBox
|
|
180 |
* This method initializes selectedOnlyCheckBox |
|
181 |
* |
|
182 |
* @return javax.swing.JCheckBox |
|
180 | 183 |
*/ |
181 | 184 |
private JCheckBox getSelectedOnlyCheckBox() { |
182 | 185 |
if (selectedOnlyCheckBox == null) { |
... | ... | |
186 | 189 |
} |
187 | 190 |
return selectedOnlyCheckBox; |
188 | 191 |
} |
189 |
|
|
192 |
|
|
190 | 193 |
private JComboBox getLayersComboBox() { |
191 | 194 |
if (layersComboBox == null) { |
192 | 195 |
layersComboBox = new JComboBox(); |
... | ... | |
205 | 208 |
} |
206 | 209 |
return layersComboBox; |
207 | 210 |
} |
208 |
|
|
211 |
|
|
209 | 212 |
private void initSelectedItemsJCheckBox() { |
210 | 213 |
String selectedLayer = (String) layersComboBox.getSelectedItem(); |
211 | 214 |
FLyrVect inputLayer = (FLyrVect) layers.getLayer(selectedLayer); |
212 | 215 |
FBitSet fBitSet = null; |
213 | 216 |
try { |
214 | 217 |
fBitSet = inputLayer.getRecordset().getSelection(); |
215 |
} catch (DriverException e) { |
|
218 |
} catch (ReadDriverException e) {
|
|
216 | 219 |
// TODO Auto-generated catch block |
217 | 220 |
e.printStackTrace(); |
218 | 221 |
} |
... | ... | |
225 | 228 |
} |
226 | 229 |
|
227 | 230 |
/** |
228 |
* This method initializes resultSelectionPanel
|
|
229 |
*
|
|
230 |
* @return javax.swing.JPanel
|
|
231 |
* This method initializes resultSelectionPanel |
|
232 |
* |
|
233 |
* @return javax.swing.JPanel |
|
231 | 234 |
*/ |
232 | 235 |
private JPanel getResultPanel() { |
233 | 236 |
if (resultSelectionPanel == null) { |
... | ... | |
246 | 249 |
} |
247 | 250 |
|
248 | 251 |
/** |
249 |
* This method initializes openResultButton
|
|
250 |
*
|
|
251 |
* @return javax.swing.JButton
|
|
252 |
* This method initializes openResultButton |
|
253 |
* |
|
254 |
* @return javax.swing.JButton |
|
252 | 255 |
*/ |
253 | 256 |
private JButton getOpenResultButton() { |
254 | 257 |
if (openResultButton == null) { |
... | ... | |
265 | 268 |
} |
266 | 269 |
|
267 | 270 |
/** |
268 |
* This method initializes jTextField
|
|
269 |
*
|
|
270 |
* @return javax.swing.JTextField
|
|
271 |
* This method initializes jTextField |
|
272 |
* |
|
273 |
* @return javax.swing.JTextField |
|
271 | 274 |
*/ |
272 | 275 |
public JTextField getFileNameResultTextField() { |
273 | 276 |
if (fileNameResultTextField == null) { |
274 | 277 |
super.getFileNameResultTextField(). |
275 |
setBounds(new Rectangle(135, 11,
|
|
278 |
setBounds(new Rectangle(135, 11, |
|
276 | 279 |
169, 21)); |
277 | 280 |
} |
278 | 281 |
return fileNameResultTextField; |
279 | 282 |
} |
280 | 283 |
|
281 | 284 |
/** |
282 |
* This method initializes xoffsetTextField
|
|
283 |
*
|
|
284 |
* @return javax.swing.JTextField
|
|
285 |
* This method initializes xoffsetTextField |
|
286 |
* |
|
287 |
* @return javax.swing.JTextField |
|
285 | 288 |
*/ |
286 | 289 |
private JTextField getXoffsetTextField() { |
287 | 290 |
if (xoffsetTextField == null) { |
... | ... | |
292 | 295 |
} |
293 | 296 |
|
294 | 297 |
/** |
295 |
* This method initializes yoffsetjTextField1
|
|
296 |
*
|
|
297 |
* @return javax.swing.JTextField
|
|
298 |
* This method initializes yoffsetjTextField1 |
|
299 |
* |
|
300 |
* @return javax.swing.JTextField |
|
298 | 301 |
*/ |
299 | 302 |
private JTextField getYoffsetjTextField1() { |
300 | 303 |
if (yoffsetTextField == null) { |
Also available in: Unified diff