Revision 2169

View differences:

branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/ProjectExtension.java
89 89
	private ProjectWindow projectFrame;
90 90
	private Project p;
91 91
	private boolean modified = false;
92

  
93 92
	/**
94 93
	 * @see com.iver.mdiApp.plugins.Extension#inicializar()
95 94
	 */
96 95
	public void inicializar() {
96
	    try {
97
            Class.forName("javax.media.jai.EnumeratedParameter");
98
        } catch (ClassNotFoundException e) {
99
            NotificationManager.addError("La m?quina virtual con la que se ejecuta gvSIG no tiene JAI instalado", e);
100
        }
101
	    
97 102
		p = ProjectFactory.createProject();
98 103
		p.setName(PluginServices.getText(this, "untitled"));
99 104
		p.setModified(false);
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/ConnectionPanel.java
1 1
package com.iver.cit.gvsig.gui.jdbcwizard;
2 2

  
3
import com.iver.andami.PluginServices;
4

  
5
import com.iver.utiles.NotExistInXMLEntity;
6
import com.iver.utiles.XMLEntity;
7
import com.iver.utiles.swing.JComboBox;
8
import com.iver.utiles.swing.wizard.Step;
9
import com.iver.utiles.swing.wizard.WizardControl;
10

  
11 3
import java.awt.FlowLayout;
12 4
import java.awt.GridLayout;
13 5
import java.awt.event.ActionEvent;
14 6
import java.awt.event.ActionListener;
15

  
16 7
import java.util.HashMap;
17 8
import java.util.Iterator;
18 9

  
......
22 13
import javax.swing.JPasswordField;
23 14
import javax.swing.JTextField;
24 15

  
16
import com.hardcode.driverManager.DriverLoadException;
17
import com.iver.andami.PluginServices;
18
import com.iver.cit.gvsig.fmap.drivers.VectorialJDBCDriver;
19
import com.iver.cit.gvsig.fmap.layers.LayerFactory;
20
import com.iver.utiles.swing.JComboBox;
21
import com.iver.utiles.swing.wizard.Step;
22
import com.iver.utiles.swing.wizard.WizardControl;
25 23

  
24

  
26 25
/**
27 26
 * DOCUMENT ME!
28 27
 *
......
59 58
     * This method initializes this
60 59
     */
61 60
    private void initialize() {
62
        this.setSize(300, 240);
61
        this.setSize(400, 240);
63 62
        this.add(getJPanel(), null);
64 63
        this.add(getJPanel1(), null);
65
        getTxtBD().setText("test");
66
        getTxtHost().setText("192.168.0.198");
67
        getTxtPassword().setText("aquilina");
68
        getTxtPort().setText("3306");
69
        getTxtUser().setText("root");
70 64
    }
71 65

  
72 66
    /**
......
86 80
            jLabel = new JLabel();
87 81
            jPanel = new JPanel();
88 82
            jPanel.setLayout(gridLayout1);
89
            jPanel.setPreferredSize(new java.awt.Dimension(120, 225));
90
            jLabel.setText("Host:");
83
            jPanel.setPreferredSize(new java.awt.Dimension(160,225));
84
            jLabel.setText(PluginServices.getText(this, "host") + ":");
91 85
            jLabel.setPreferredSize(new java.awt.Dimension(80, 15));
92 86
            jLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
93 87
            jLabel.setName("jLabel");
94
            jLabel1.setText("Puerto:");
88
            jLabel1.setText(PluginServices.getText(this, "puerto")+":");
95 89
            jLabel1.setPreferredSize(new java.awt.Dimension(83, 15));
96 90
            jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
97 91
            jLabel1.setName("jLabel1");
98
            jLabel2.setText("Usuario:");
92
            jLabel2.setText(PluginServices.getText(this, "usuario")+":");
99 93
            jLabel2.setName("jLabel2");
100 94
            jLabel2.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
101 95
            jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
102
            jLabel3.setText("Password:");
96
            jLabel3.setText(PluginServices.getText(this, "password")+":");
103 97
            jLabel3.setName("jLabel3");
104 98
            jLabel3.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
105 99
            jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
106
            jLabel4.setText("Base de datos:");
100
            jLabel4.setText(PluginServices.getText(this, "bd")+":");
107 101
            jLabel4.setName("jLabel4");
108 102
            jLabel4.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
109 103
            jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
110
            jLabel5.setText("Driver:");
104
            jLabel5.setText(PluginServices.getText(this, "driver")+":");
111 105
            jLabel5.setName("jLabel5");
112 106
            jLabel5.setHorizontalTextPosition(javax.swing.SwingConstants.RIGHT);
113 107
            jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
......
292 286
        }
293 287

  
294 288
        getCmbDriver().setModel(model);
289

  
290
        //Para que refresque el textbox del puerto
291
        if (drivers.length > 0)
292
            cmbDriver.setSelectedIndex(0);
293
        
295 294
    }
296 295

  
297 296
    /**
......
336 335
            cmbDriver = new JComboBox();
337 336
            cmbDriver.setPreferredSize(new java.awt.Dimension(120, 19));
338 337
            cmbDriver.setName("cmbDriver");
338
            cmbDriver.addActionListener(new ActionListener() {
339
                public void actionPerformed(ActionEvent e) {
340
                    String driverName = cmbDriver.getSelectedItem().toString();
341
                    VectorialJDBCDriver driver;
342
                    try {
343
                        driver = (VectorialJDBCDriver) LayerFactory.getDM().getDriver(driverName);
344
                        getTxtPort().setText(Integer.toString(driver.getDefaultPort()));
345
                    } catch (DriverLoadException e1) {
346
                        getTxtPort().setText("");
347
                    }
348
                }
349
            });
339 350
        }
340 351

  
341 352
        return cmbDriver;
......
360 371
    private JLabel getJLabel6() {
361 372
        if (jLabel6 == null) {
362 373
            jLabel6 = new JLabel();
363
            jLabel6.setText("Nombre:");
374
            jLabel6.setText(PluginServices.getText(this, "connection_name")+":");
364 375
            jLabel6.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
365 376
        }
366 377

  
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/UniqueFieldSelection.java
6 6
import javax.swing.JLabel;
7 7
import javax.swing.JScrollPane;
8 8
import javax.swing.JList;
9

  
10
import com.iver.andami.PluginServices;
9 11
/**
10 12
 * @author Fernando Gonz?lez Cort?s
11 13
 */
......
30 32
	private  void initialize() {
31 33
		jLabel = new JLabel();
32 34
		this.setSize(300,200);
33
		jLabel.setText("Seleccione el campo ?nico:");
35
		jLabel.setText(PluginServices.getText(this, "select_unique_field")+":");
34 36
		jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
35 37
		jLabel.setPreferredSize(new java.awt.Dimension(315,15));
36 38
		this.add(jLabel, null);
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/Wizard.java
173 173
	private JButton getBtnBack() {
174 174
		if (btnBack == null) {
175 175
			btnBack = new JButton();
176
			btnBack.setText("Back");
176
			btnBack.setText(PluginServices.getText(this, "back"));
177 177
			btnBack.setPreferredSize(new java.awt.Dimension(63,18));
178 178
			btnBack.addActionListener(new java.awt.event.ActionListener() { 
179 179
				public void actionPerformed(java.awt.event.ActionEvent e) {    
......
193 193
	private JButton getBtnNext() {
194 194
		if (btnNext == null) {
195 195
			btnNext = new JButton();
196
			btnNext.setText("Next");
196
			btnNext.setText(PluginServices.getText(this, "next"));
197 197
			btnNext.setPreferredSize(new java.awt.Dimension(62,18));
198 198
			btnNext.addActionListener(new java.awt.event.ActionListener() { 
199 199
				public void actionPerformed(java.awt.event.ActionEvent e) {
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/GeomFieldSelection.java
6 6
import javax.swing.JLabel;
7 7
import javax.swing.JList;
8 8
import javax.swing.JScrollPane;
9

  
10
import com.iver.andami.PluginServices;
9 11
/**
10 12
 * @author Fernando Gonz?lez Cort?s
11 13
 */
......
29 31
	private  void initialize() {
30 32
		jLabel = new JLabel();
31 33
		this.setSize(300,200);
32
		jLabel.setText("Selecciona el campo que lleva la geometr?a:");
34
		jLabel.setText(PluginServices.getText(this, "select_geom_field") + ":");
33 35
		jLabel.setPreferredSize(new java.awt.Dimension(359,15));
34 36
		jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
35 37
		this.add(jLabel, null);
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/FieldSelection.java
7 7
import javax.swing.JList;
8 8
import javax.swing.JLabel;
9 9

  
10
import com.iver.andami.PluginServices;
10 11
import com.iver.utiles.swing.wizard.Step;
11 12
import com.iver.utiles.swing.wizard.WizardControl;
12 13
import javax.swing.JButton;
......
38 39
	private  void initialize() {
39 40
		jLabel = new JLabel();
40 41
		this.setSize(300, 200);
41
		jLabel.setText("Seleccione los campos:");
42
		jLabel.setText(PluginServices.getText(this, "seleccion_de_campos") + ":");
42 43
		jLabel.setPreferredSize(new java.awt.Dimension(352,15));
43 44
		jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
44 45
		this.add(jLabel, null);
......
127 128
	private JButton getJButton() {
128 129
		if (jButton == null) {
129 130
			jButton = new JButton();
130
			jButton.setText("Select All");
131
			jButton.setText(PluginServices.getText(this, "select_all")+ ":");
131 132
			jButton.setPreferredSize(new java.awt.Dimension(93,18));
132 133
			jButton.addActionListener(new java.awt.event.ActionListener() { 
133 134
				public void actionPerformed(java.awt.event.ActionEvent e) {
......
149 150
	private JButton getJButton1() {
150 151
		if (jButton1 == null) {
151 152
			jButton1 = new JButton();
152
			jButton1.setText("Deselect All");
153
			jButton1.setText(PluginServices.getText(this, "select_none")+ ":");
153 154
			jButton1.setPreferredSize(new java.awt.Dimension(108,18));
154 155
			jButton1.addActionListener(new java.awt.event.ActionListener() { 
155 156
				public void actionPerformed(java.awt.event.ActionEvent e) {    
branches/gvSIG_GisPlanet/applications/appgvSIG/src/com/iver/cit/gvsig/gui/jdbcwizard/DBLayerDefinition.java
63 63
        jLabel = new JLabel();
64 64
        this.setSize(509, 375);
65 65
        this.setPreferredSize(new java.awt.Dimension(1260, 180));
66
        jLabel.setText("Seleccione una tabla:");
66
        jLabel.setText(PluginServices.getText(this, "seleccione_tabla") + ":");
67 67
        jLabel.setPreferredSize(new java.awt.Dimension(330, 15));
68 68
        jLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
69 69
        this.add(jLabel, null);
......
106 106
            jLabel2 = new JLabel();
107 107
            jLabel1 = new JLabel();
108 108
            pnlExtent = new JPanel();
109
            pnlExtent.setPreferredSize(new java.awt.Dimension(290, 60));
109
            pnlExtent.setPreferredSize(new java.awt.Dimension(400,60));
110 110
            jLabel1.setText("MinX:");
111 111
            jLabel2.setText("MaxX:");
112 112
            jLabel3.setText("MinY:");
......
274 274
    private JRadioButton getRadFullTable() {
275 275
        if (radFullTable == null) {
276 276
            radFullTable = new JRadioButton();
277
            radFullTable.setText("Toda la tabla");
277
            radFullTable.setText(PluginServices.getText(this, "toda_la_tabla")+":");
278 278
            radFullTable.setSelected(true);
279 279
            radFullTable.addActionListener(new ActionListener() {
280 280
                    public void actionPerformed(ActionEvent e) {
......
305 305
    private JRadioButton getRadWorkingArea() {
306 306
        if (radWorkingArea == null) {
307 307
            radWorkingArea = new JRadioButton();
308
            radWorkingArea.setText("Area de trabajo");
308
            radWorkingArea.setText(PluginServices.getText(this, "area_trabajo")+":");
309 309
            radWorkingArea.addActionListener(new ActionListener() {
310 310
                    public void actionPerformed(ActionEvent e) {
311 311
                        enableExtent(radWorkingArea.isSelected());
......
375 375
        if (jPanel1 == null) {
376 376
            jLabel5 = new JLabel();
377 377
            jPanel1 = new JPanel();
378
            jLabel5.setText("Nombre de la capa:");
379
            jPanel1.setPreferredSize(new java.awt.Dimension(303,29));
378
            jLabel5.setText(PluginServices.getText(this, "nombre_capa")+":");
379
            jPanel1.setPreferredSize(new java.awt.Dimension(383,29));
380 380
            jPanel1.add(jLabel5, null);
381 381
            jPanel1.add(getTxtLayerName(), null);
382 382
        }
......
407 407
	private JButton getJButton() {
408 408
		if (jButton == null) {
409 409
			jButton = new JButton();
410
			jButton.setText("Importar extent actual de la vista");
410
			jButton.setText(PluginServices.getText(this, "importar_extent")+":");
411 411
			jButton.addActionListener(new ActionListener() {
412 412
                public void actionPerformed(ActionEvent e) {
413 413
                    View v = PluginServices.getMDIManager().getActiveView();

Also available in: Unified diff