Revision 4624

View differences:

trunk/extensions/extWMS/src/com/iver/cit/gvsig/gui/wizards/WMSWizard.java
82 82
 */
83 83
public class WMSWizard extends WizardPanel {
84 84
	private static Logger logger = Logger.getLogger(WMSWizard.class.getName());
85
	private int page;
86
	private boolean connected = false;
85
	protected int page;
86
	protected boolean connected = false;
87 87
	private JComboServer cmbHost = null;
88 88
	private javax.swing.JButton btnConnect = null;
89 89
	private javax.swing.JPanel jPanel = null;
......
95 95
	private javax.swing.JButton btnSiguiente = null;
96 96
	private javax.swing.JButton btnAnterior = null;
97 97
	private javax.swing.JPanel jPanel1 = null;
98
	private WizardListenerSupport listenerSupport = new WizardListenerSupport();
99
	private WMSWizardData dataSource;
100
	private WMSParamsPanel wmsParamsPanel = null;
101
	private JLabel lblServerType = null;
102
	private JLabel lblServerTypeValue = null;
98
	protected WizardListenerSupport listenerSupport = new WizardListenerSupport();
99
	protected WMSWizardData dataSource;
100
	protected WMSParamsPanel wmsParamsPanel = null;
101
	protected JLabel lblServerType = null;
102
	protected JLabel lblServerTypeValue = null;
103 103
	private JCheckBox chkCaching = null;
104 104
	private static Preferences fPrefs = Preferences.userRoot().node( "gvsig.wms-wizard" );
105 105
	private boolean refreshing = fPrefs.getBoolean("refresh_capabilities", false);
106
	private int firstPage;
106
	protected int firstPage;
107 107

  
108
	/**
109
	 * Sets the parameters for this WMS connection. It escapes the host panel.
110
	 * used for Costas
111
	 * @param params
112
	 */
113 108
	public WMSWizard (WMSParamsPanel params){
109
		
114 110
		super();
115 111
		firstPage = 1;
116 112
		page = firstPage;
......
148 144
		getPanelPage2().setVisible(true);
149 145
		connected = true;     
150 146
	}
151

  
147
	
152 148
	/**
153 149
	 * This is the default constructor
154 150
	 */
......
188 184
	}
189 185

  
190 186

  
191
	private JPanel getPanelPage2(){
187
	protected JPanel getPanelPage2(){
192 188
		if (wmsParamsPanel == null){
193 189
			wmsParamsPanel = new WMSParamsPanel();
194 190
			wmsParamsPanel.setListenerSupport(this.listenerSupport);
......
264 260
	/**
265 261
	 * DOCUMENT ME!
266 262
	 */
267
	private void activarVisualizarBotones() {
263
	protected void activarVisualizarBotones() {
268 264
		if (page == firstPage) {
269 265
			getBtnAnterior().setEnabled(false);
270 266
			getBtnSiguiente().setVisible(true);
......
734 730
	 *
735 731
	 * @return DOCUMENT ME!
736 732
	 */
737
	private String getLayersQuery() {
733
	protected String getLayersQuery() {
738 734
		return wmsParamsPanel.getLayersQuery();
739 735
	}
740 736

  
......
769 765
	 * If user does not select the chekbox Disagregate layers, will get the layer tree in WMS
770 766
	 * @return
771 767
	 */
772
    private FLayer getLayerTree() {    	
768
    protected FLayer getLayerTree() {    	
773 769
        String[] layerNames = getLayersQuery().split(",");
774 770
        LayerTree layerTree = wmsParamsPanel.getLayerStructure();  
775 771
//        try{
......
787 783
		return null;
788 784
    }
789 785
    
790
    private boolean nodeSelected(TreePath[] selection, WMSLayerNode node){
786
    protected boolean nodeSelected(TreePath[] selection, WMSLayerNode node){
791 787
		for (int i = 0; i < selection.length; i++) {		
792 788
			Object[] components = selection[i].getPath();
793 789
			for (int j=0; j < components.length ; j++)
794 790
			{				
795
				
796
//				if (components[j].equals(node)){
797
//					return true;
798
//				}
799 791
				if (components[j] instanceof WMSLayerNode){
800 792
					if (((WMSLayerNode)components[j]).getTitle().compareTo(node.getTitle()) == 0){
801 793
						return true;
802 794
					}
803 795
				}
804
//				else if (components[j] instanceof String){
805
//					if (((String)(components[j])).compareTo(name) == 0){
806
//						return true;
807
//					}					
808
//				}
809 796
			}						
810 797
		}  
811 798
		return false;
812 799
    }
813 800
    
814
	private FLayer getSubTree(WMSLayerNode node, TreePath[] selection)
801
	protected FLayer getSubTree(WMSLayerNode node, TreePath[] selection)
815 802
	{		
816 803
		if (node.getChildren().size() > 0)
817 804
		{
......
876 863
	 * the tree structure in WMS will be lost.
877 864
	 * @return
878 865
	 */
879
    private FLayer getLayerPlain(){
866
    protected FLayer getLayerPlain(){
880 867
        FLyrWMS layer = new FLyrWMS();
881 868
        layer.setHost(getHost());
882 869
        try{
......
902 889
        return layer;
903 890
    }
904 891

  
905
	private boolean isQueryable() {
892
	protected boolean isQueryable() {
906 893
		return dataSource.isQueryable();
907 894
	}
908 895

  
909
	private Dimension getFixedSize() {
896
	protected Dimension getFixedSize() {
910 897
		return wmsParamsPanel.getFixedSize();
911 898
	}
912 899

  
......
914 901
		return wmsParamsPanel.getOnlineResources();
915 902
	}
916 903

  
917
	private FMapWMSDriver getDriver() {
904
	protected FMapWMSDriver getDriver() {
918 905
		return wmsParamsPanel.getDriver();
919 906
	}
920 907

  
921 908
	/**
922 909
	 * @return
923 910
	 */
924
	private Vector getStyles() {
911
	protected Vector getStyles() {
925 912
		return wmsParamsPanel.getStyles();
926 913
	}
927 914

  
928
	private Vector getDimensions() {
915
	protected Vector getDimensions() {
929 916
		return wmsParamsPanel.getDimensions();
930 917
	}
931 918

  
932 919
	/**
933 920
	 * @return
934 921
	 */
935
	private boolean getTransparency() {
922
	protected boolean getTransparency() {
936 923
		return wmsParamsPanel.getTransparency();
937 924
	}
938 925

  

Also available in: Unified diff