Revision 17593 trunk/extensions/extWFS2/src/com/iver/cit/gvsig/gui/panels/WFSAreaPanel.java
WFSAreaPanel.java | ||
---|---|---|
31 | 31 |
import javax.swing.JToggleButton; |
32 | 32 |
import javax.swing.SwingConstants; |
33 | 33 |
|
34 |
import org.gvsig.gui.beans.panelGroup.panels.AbstractPanel; |
|
34 | 35 |
import org.gvsig.gui.beans.swing.jComboBoxWithImageIconItems.ImageIconItemInfo; |
35 | 36 |
import org.gvsig.gui.beans.swing.jComboBoxWithImageIconItems.JComboBoxWithImageIconItems; |
36 | 37 |
import org.gvsig.gui.beans.swing.jTextFieldWithSpecificCaretPosition.JTextFieldWithSpecificCaretPosition; |
... | ... | |
44 | 45 |
import com.iver.cit.gvsig.fmap.ProjectionEvent; |
45 | 46 |
import com.iver.cit.gvsig.fmap.ViewPort; |
46 | 47 |
import com.iver.cit.gvsig.fmap.ViewPortListener; |
48 |
import com.iver.cit.gvsig.fmap.layers.WFSLayerNode; |
|
47 | 49 |
import com.iver.cit.gvsig.fmap.layers.XMLException; |
48 | 50 |
import com.iver.cit.gvsig.fmap.tools.ZoomOutRightButtonListener; |
49 | 51 |
import com.iver.cit.gvsig.fmap.tools.Behavior.Behavior; |
... | ... | |
214 | 216 |
* @author Pablo Piqueras Bartolom? (p_queras@hotmail.com) |
215 | 217 |
* @author Jorge Piera Llodr? (piera_jor@gva.es) |
216 | 218 |
*/ |
217 |
public class WFSAreaPanel extends JPanel {
|
|
219 |
public class WFSAreaPanel extends DefaultWFSDialogPanel {
|
|
218 | 220 |
private final Rectangle DEFAULT_BOUNDS = new Rectangle(10, 5, 490, 380); |
219 | 221 |
private final Rectangle DEFAULT_AREA_COORDINATES_PANEL_RECTANGLE = new Rectangle(8, 20, 481, 60); |
220 | 222 |
private final Rectangle DEFAULT_AREA_MAPCONTROL_PANEL_RECTANGLE = new Rectangle(8, 115, 481, 265); |
... | ... | |
241 | 243 |
private ExtentHistory previousExtentValids = null; |
242 | 244 |
|
243 | 245 |
private WFSWizardData data = null; |
244 |
private WFSParamsPanel parent = null; |
|
245 | 246 |
private AreaCoordinatesPanel coordinatesPanel = null; |
246 | 247 |
private SelectableMapControlAreaPanel selectableMapAreaPanel = null; |
247 | 248 |
private JComboBox jComboBoxToolSelection = null; |
... | ... | |
267 | 268 |
private final String MEASURE_AREA_TOOL = "MEASURE_AREA"; |
268 | 269 |
/* End tool identifier constants */ |
269 | 270 |
|
271 |
|
|
270 | 272 |
/** |
271 | 273 |
* This method initializes |
272 | 274 |
*/ |
273 |
public WFSAreaPanel(WFSParamsPanel parent) {
|
|
275 |
public WFSAreaPanel() { |
|
274 | 276 |
super(); |
275 |
this.parent = parent; |
|
276 | 277 |
initialize(); |
277 | 278 |
} |
278 | 279 |
|
279 | 280 |
/** |
280 |
* This method initializes this |
|
281 |
*/ |
|
282 |
private void initialize() { |
|
283 |
this.setLayout(null); |
|
284 |
this.setBounds(DEFAULT_BOUNDS); |
|
285 |
this.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
286 |
null, PluginServices.getText(this, "select_by_area"), |
|
287 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
288 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
289 |
|
|
290 |
// By default, user hasn't defined an area |
|
291 |
this.hasUserDefinedAnArea = false; |
|
292 |
|
|
293 |
// Adds JPanel with the coordinates |
|
294 |
this.add(getCoordinatesPanel(), null); |
|
295 |
|
|
296 |
// Adds a check box to enable or enable this kind of filtering |
|
297 |
this.add(getEnablingJCheckBox()); |
|
298 |
|
|
299 |
// Adds JComboBox to select a part of the graphical interface |
|
300 |
// this.add(getJComboBoxToolSelection(), null); |
|
301 |
// this.getJComboBoxToolSelection().setSelectedIndex(0); // By default select first element |
|
302 |
|
|
303 |
// Adds JPanel with the view |
|
304 |
// this.add(getSelectableMapAreaPanel(), null); |
|
305 |
|
|
306 |
previousExtentValids = new ExtentHistory(); |
|
307 |
initCoordinates(); |
|
308 |
} |
|
309 |
|
|
310 |
/** |
|
311 | 281 |
* Write the view coordinates into the coordinates panel |
312 | 282 |
*/ |
313 | 283 |
private void initCoordinates(){ |
... | ... | |
405 | 375 |
jEnablingCheckBox.setToolTipText(PluginServices.getText(this, "enable_filter_by_area")); |
406 | 376 |
disableCoorderatesRegionOperation(); |
407 | 377 |
} |
378 |
getParamsPanelData().isApplicable(true); |
|
408 | 379 |
} |
409 | 380 |
}); |
410 | 381 |
|
... | ... | |
888 | 859 |
* @param b A boolean value |
889 | 860 |
*/ |
890 | 861 |
private void setApplicable(boolean b) { |
891 |
if (!parent.getWFSFilterPanelIsAsTabForWFSLayersLoad())
|
|
892 |
parent.isApplicable(b);
|
|
862 |
if (!getParamsPanelData().getFilterPanel().getWFSFilterPanelIsAsTabForWFSLayersLoad())
|
|
863 |
getParamsPanelData().isApplicable(b);
|
|
893 | 864 |
// parent.isApplicable(true); |
894 | 865 |
} |
895 | 866 |
|
... | ... | |
2823 | 2794 |
return _message; |
2824 | 2795 |
} |
2825 | 2796 |
} |
2797 |
|
|
2798 |
/* |
|
2799 |
* (non-Javadoc) |
|
2800 |
* @see org.gvsig.gui.beans.panelGroup.panels.AbstractPanel#initialize() |
|
2801 |
*/ |
|
2802 |
protected void initialize() { |
|
2803 |
setLabel(PluginServices.getText(this, "area")); |
|
2804 |
setLabelGroup(PluginServices.getText(this, "wfs")); |
|
2805 |
this.setLayout(null); |
|
2806 |
this.setBounds(DEFAULT_BOUNDS); |
|
2807 |
this.setBorder(javax.swing.BorderFactory.createTitledBorder( |
|
2808 |
null, PluginServices.getText(this, "select_by_area"), |
|
2809 |
javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, |
|
2810 |
javax.swing.border.TitledBorder.DEFAULT_POSITION, null, null)); |
|
2811 |
|
|
2812 |
// By default, user hasn't defined an area |
|
2813 |
this.hasUserDefinedAnArea = false; |
|
2814 |
|
|
2815 |
// Adds JPanel with the coordinates |
|
2816 |
this.add(getCoordinatesPanel(), null); |
|
2817 |
|
|
2818 |
// Adds a check box to enable or enable this kind of filtering |
|
2819 |
this.add(getEnablingJCheckBox()); |
|
2820 |
|
|
2821 |
// Adds JComboBox to select a part of the graphical interface |
|
2822 |
// this.add(getJComboBoxToolSelection(), null); |
|
2823 |
// this.getJComboBoxToolSelection().setSelectedIndex(0); // By default select first element |
|
2824 |
|
|
2825 |
// Adds JPanel with the view |
|
2826 |
// this.add(getSelectableMapAreaPanel(), null); |
|
2827 |
|
|
2828 |
previousExtentValids = new ExtentHistory(); |
|
2829 |
initCoordinates(); |
|
2830 |
} |
|
2831 |
|
|
2832 |
/* |
|
2833 |
* (non-Javadoc) |
|
2834 |
* @see com.iver.cit.gvsig.gui.panels.IWFSDialogPanel#refresh(com.iver.cit.gvsig.fmap.layers.WFSLayerNode) |
|
2835 |
*/ |
|
2836 |
public void refresh(WFSLayerNode layer) { |
|
2837 |
// TODO Auto-generated method stub |
|
2838 |
|
|
2839 |
} |
|
2826 | 2840 |
} |
2827 | 2841 |
|
2828 | 2842 |
|
Also available in: Unified diff