Revision 3014 trunk/extensions/extGeoreferencing/src/com/iver/cit/gvsig/gui/Dialogs/GeoreferencingDialog.java

View differences:

GeoreferencingDialog.java
1 1
package com.iver.cit.gvsig.gui.Dialogs;
2 2

  
3 3
import java.awt.BorderLayout;
4
import java.awt.Dimension;
4 5
import java.awt.FlowLayout;
5 6
import java.awt.event.ActionListener;
6 7
import java.beans.PropertyVetoException;
......
24 25
import com.iver.cit.gvsig.fmap.tools.Behavior.MouseMovementBehavior;
25 26
import com.iver.cit.gvsig.fmap.tools.Behavior.PointBehavior;
26 27
import com.iver.cit.gvsig.gui.View;
27
import com.iver.cit.gvsig.gui.Panels.DataPointsTabPanel;
28
import com.iver.cit.gvsig.gui.Panels.SelectFilePanel;
28
import com.iver.cit.gvsig.gui.Panels.ConectorPanel;
29 29
import com.iver.cit.gvsig.gui.Panels.SelectPointsPanel;
30
import com.iver.cit.gvsig.gui.Panels.TablePointsPanel;
31 30
import com.iver.cit.gvsig.gui.toolListeners.GeorefPanListener;
32 31
import com.iver.cit.gvsig.gui.toolListeners.GeorefPointerListener;
33 32
import com.iver.cit.gvsig.gui.toolListeners.StatusBarListener;
......
55 54
	private GeoMoveBehavior mb = null;
56 55
	private static boolean loadTools = false;
57 56
	private JInternalFrame frame = null;
57

  
58
	private ConectorPanel	conectorPanel = null;
58 59
	
59
	private SelectFilePanel selectFilePanel = null;
60
	private SelectPointsPanel selectPointsPanel = null;
61
	private TablePointsPanel tablePointsPanel = null;
62
	private DataPointsTabPanel dataPointsTabPanel = null;
60
	private boolean enlarge = false;
61
	private int normalWidth = 410;
62
	private int normalHeight = 315;
63
	private int enlargeHeight = 600;
63 64
	
64 65
	private JButton bAceptar = null;
66
	private JPanel pGeneral = null;
65 67
	
66 68
    /**
67 69
     * Constructor.
......
109 111
        }
110 112
        
111 113
        this.setLayout(new BorderLayout());
112
        this.setPreferredSize(new java.awt.Dimension(400,315));
113
        this.setSize(new java.awt.Dimension(400,315));
114
        if(!enlarge){
115
        	this.setPreferredSize(new java.awt.Dimension(normalWidth, normalHeight));
116
        	this.setSize(new java.awt.Dimension(normalWidth, normalHeight));
117
        }else{
118
        	this.setPreferredSize(new java.awt.Dimension(normalWidth, enlargeHeight));
119
        	this.setSize(new java.awt.Dimension(normalWidth, enlargeHeight));
120
        }
114 121
        this.setLocation(new java.awt.Point(0,0));
115
        this.add(getPBotones(), java.awt.BorderLayout.SOUTH);
116
        tablePointsPanel = new TablePointsPanel();
117
        selectPointsPanel = new SelectPointsPanel();
118
        this.add(this.getDataPointsPanel(), null);
119
       
122
        
123
        this.add(this.getPBotones(), BorderLayout.SOUTH);
124
        this.add(this.getConectorPanel(), BorderLayout.NORTH);
125
   
120 126
               
121 127
    }
122 128
    
123
    /**
124
     * Obtiene el panel que contiene los tabs de selecci?n de puntos y tabla de puntos.
125
     * @return
126
     */
127
    public DataPointsTabPanel getDataPointsPanel() {
128
	    if (dataPointsTabPanel == null) {	    		
129
	    	dataPointsTabPanel = new DataPointsTabPanel(this.selectPointsPanel, this.tablePointsPanel);
130
	    	dataPointsTabPanel.setBounds(0, 0, 519, 352);
129
    
130
    public ConectorPanel getConectorPanel() {
131
	    if (conectorPanel == null) {	    		
132
	    	conectorPanel = new ConectorPanel(this);
131 133
	    }
132 134
	
133
	    return dataPointsTabPanel;
135
	    return conectorPanel;
134 136
    }
135
    
137
    	
138
      
136 139
	/**
137 140
	 * This method initializes jPanel	
138 141
	 * 	
......
229 232
		return "GeoreferencingDialog";
230 233
	}*/
231 234
	
235
		
232 236
	/**
233
	 * @return Returns the selectFilePanel.
234
	 */
235
	public SelectFilePanel getSelectFilePanel() {
236
		return selectFilePanel;
237
	}
238
	
239
	/**
240
	 * @param selectFilePanel The selectFilePanel to set.
241
	 */
242
	public void setSelectFilePanel(SelectFilePanel selectFilePanel) {
243
		this.selectFilePanel = selectFilePanel;
244
	}
245
	
246
	/**
247
	 * @return Returns the selectPointsPanel.
248
	 */
249
	public SelectPointsPanel getSelectPointsPanel() {
250
		return selectPointsPanel;
251
	}
252
	
253
	/**
254
	 * @param selectPointsPanel The selectPointsPanel to set.
255
	 */
256
	public void setSelectPointsPanel(SelectPointsPanel selectPointsPanel) {
257
		this.selectPointsPanel = selectPointsPanel;
258
	}
259
	
260
	/**
261 237
	 * This method initializes jButton	
262 238
	 * 	
263 239
	 * @return javax.swing.JButton	
......
378 354
		}
379 355
		return bSave;
380 356
	}
357

  
358
	/**
359
	 * @return Returns the extended.
360
	 */
361
	public boolean isEnlarge() {
362
		return enlarge;
363
	}
364

  
365
	/**
366
	 * @param extended The extended to set.
367
	 */
368
	public void setEnlarge(boolean enlarge) {
369
		this.enlarge = enlarge;
370
		if(!enlarge){
371
			this.setPreferredSize(new Dimension(this.normalWidth, this.normalHeight));
372
			this.setSize(new Dimension(this.normalWidth, this.normalHeight));
373
			frame.setSize(new Dimension(this.normalWidth, this.normalHeight + 10));
374
			frame.setPreferredSize(new Dimension(this.normalWidth, this.normalHeight + 10));
375
			this.getConectorPanel().setCanvasVisible(false);
376
		}else{
377
			this.setPreferredSize(new Dimension(this.normalWidth, this.enlargeHeight));
378
			this.setSize(new Dimension(this.normalWidth, this.enlargeHeight));
379
			frame.setSize(new Dimension(this.normalWidth, this.enlargeHeight + 10));
380
			frame.setPreferredSize(new Dimension(this.normalWidth, this.enlargeHeight + 10));
381
			this.getConectorPanel().setCanvasVisible(true);
382
		}
383
		frame.pack();
384
	}
385

  
386
	public SelectPointsPanel getSelectPointsPanel(){
387
		return this.getConectorPanel().getDataPointsTabPanel().getSelectPointsPanel();
388
	}
389

  
381 390
   }  //  @jve:decl-index=0:visual-constraint="10,10"
382 391
 //  @jve:visual-info  decl-index=0 visual-constraint="10,10"
383 392
//  @jve:visual-info  decl-index=0 visual-constraint="10,10"

Also available in: Unified diff