Revision 37601

View differences:

branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/info/InstallerInfoFileWriter.java
149 149
				properties.setProperty(InstallerInfoTags.DOWNLOAD_URL,
150 150
						downloadURL.toString());
151 151
			}
152
			URL ownerURL = installInfo.getOwnerURL();
153
			if (ownerURL != null) {
154
				properties.setProperty(InstallerInfoTags.OWNER_URL,
155
						ownerURL.toString());
156
			}
152 157
			properties.setProperty(InstallerInfoTags.MODEL_VERSION, installInfo
153 158
					.getModelVersion());
154 159
			properties.store(os, "");
......
157 162
			throw new InstallerInfoFileException(
158 163
					"install_infofile_writing_error", e);
159 164
		}
160

  
161 165
	}
162 166
}
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/info/InstallerInfoTags.java
48 48
	public static final String DOWNLOAD_URL = "download-url";
49 49
	public static final String MODEL_VERSION = "model-version";
50 50
	public static final String OWNER = "owner";
51
	public static final String OWNER_URL = "owner-url";
51 52
	public static final String SOURCES_URL = "sources-url";
52 53
	public static final String WEB_URL = "web-url";
53 54
	public static final String DEPENDENCIES = "dependencies";
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/info/InstallerInfoFileReader.java
243 243
		} else {
244 244
			installerInfoResource.setWebURL(null);
245 245
		}
246
		
247
		String ownerURLStr = properties.getProperty(InstallerInfoTags.OWNER_URL);
248
		if (ownerURLStr != null && !ownerURLStr.equals("")) {
249
			URL ownerUrl;
250
			try {
251
				ownerUrl = new URL(ownerURLStr);
252
			} catch (MalformedURLException e) {
253
				throw new InstallerInfoFileException(
254
						"Error getting the value of the owner url property as URL: "
255
								+ ownerURLStr, e);
256
			}
257
			installerInfoResource.setOwnerURL(ownerUrl);
258
		} else {
259
			installerInfoResource.setOwnerURL(null);
260
		}
246 261

  
247 262
		String categories = properties
248 263
				.getProperty(InstallerInfoTags.CATEGORIES);
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.impl/src/main/java/org/gvsig/installer/lib/impl/DefaultPackageInfo.java
68 68
	private String javaVM = JVM.J1_5;
69 69

  
70 70
	private String owner = "";
71
	private URL ownerURL = null;
71 72
	private URL sources = null;
72 73
	private String gvSIGVersion = "";
73 74

  
......
223 224

  
224 225
	public URL getDownloadURL() {
225 226
		URL url = null;
226
		try {
227
			url = new URL(defaultDownloadURL);
228
		} catch (MalformedURLException e) {
229
			// TODO Auto-generated catch block
230
			e.printStackTrace();
227
		if (defaultDownloadURL != null) {
228
			try {
229
				url = new URL(defaultDownloadURL);
230
			} catch (MalformedURLException e) {
231
				// TODO Auto-generated catch block
232
				e.printStackTrace();
233
			}
231 234
		}
232 235
		return url;
233 236
	}
......
276 279
		this.owner = owner;
277 280
	}
278 281

  
282
	public URL getOwnerURL() {
283
		return ownerURL;
284
	}
285

  
286
	public void setOwnerURL(URL sources) {
287
		this.ownerURL = sources;
288
	}
289

  
279 290
	public URL getSourcesURL() {
280 291
		return sources;
281 292
	}
......
303 314
		append(buffer, InstallerInfoTags.TYPE, getType());
304 315
		append(buffer, InstallerInfoTags.MODEL_VERSION, getModelVersion());
305 316
		append(buffer, InstallerInfoTags.OWNER, getOwner());
317
		append(buffer, InstallerInfoTags.OWNER_URL, getOwnerURL());
306 318
		append(buffer, InstallerInfoTags.SOURCES_URL, getSourcesURL());
307 319
		append(buffer, InstallerInfoTags.DEPENDENCIES, getDependencies());
308 320
		append(buffer, InstallerInfoTags.WEB_URL, getWebURL());
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.lib/org.gvsig.installer.lib.api/src/main/java/org/gvsig/installer/lib/api/PackageInfo.java
246 246
	 *            the package owner
247 247
	 */
248 248
	public void setOwner(String owner);
249
	
250
	/**
251
	 * Returns the owner's url {@link URL}.
252
	 * 
253
	 * @return the owner's url {@link URL}
254
	 */
255
	public URL getOwnerURL();
249 256

  
250 257
	/**
258
	 * Sets the package owner's url.
259
	 * 
260
	 * @param sources
261
	 *            the package owner's url
262
	 */
263
	public void setOwnerURL(URL sources);
264

  
265
	/**
251 266
	 * Returns the package source files url {@link URL}.
252 267
	 * 
253 268
	 * @return the package source files url {@link URL}
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/PackagesTablePanel.java
212 212
				.hasAnyPackageSelected();
213 213
	}
214 214

  
215
	// shows the package info in the wizard
215 216
	public void valueChanged(ListSelectionEvent e) {
216 217
		int row = pluginsTable.getSelectedRow();
217 218
		if (row != -1) {
......
239 240
			} else {
240 241
				owner = "Owner: " + owner + "\n";
241 242
			}
243
			
244
			String ownerUrlStr;
245
			URL ownerURL = ((PackagesTableModel) pluginsTable.getModel())
246
					.getOwnerUrlAt(row);
247
			if (ownerURL == null) {
248
				ownerUrlStr = "";
249
			} else {
250
				ownerUrlStr = "Owner URL: " + ownerURL.toString() + "\n";
251
			}
242 252

  
243 253
			String sources;
244 254
			URL sourcesURL = ((PackagesTableModel) pluginsTable.getModel())
......
273 283
			}
274 284

  
275 285
			String descriptionText = name + "\n" + description + "\n" + code
276
					+ owner + sources + depends + categories;
286
					+ owner + ownerUrlStr + sources + depends + categories;
277 287

  
278 288
			descriptionTextArea.setText(descriptionText.trim());
279 289

  
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/SelectBundlesPanel.java
112 112

  
113 113
			@Override
114 114
			public String getDescription() {
115
				return "gvSIG packags and package and index sets (*."
115
				return "gvSIG packages and package and index sets (*."
116 116
						+ packageExt + ", *." + packageSetExt + ", *."
117 117
						+ indexSetExt + ")";
118 118
			}
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/execution/panel/model/PackagesTableModel.java
404 404
	public URL getSourcesAt(int rowIndex) {
405 405
		return getPackageInfoAt(rowIndex).getSourcesURL();
406 406
	}
407
	
408
	public URL getOwnerUrlAt(int rowIndex) {
409
		return getPackageInfoAt(rowIndex).getOwnerURL();
410
	}
407 411

  
408 412
	public String getOwnerAt(int rowIndex) {
409 413
		return getPackageInfoAt(rowIndex).getOwner();
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/java/org/gvsig/installer/swing/impl/creation/panel/DefaultPackageInfoPanel.java
37 37
import javax.swing.JComboBox;
38 38
import javax.swing.JLabel;
39 39
import javax.swing.JOptionPane;
40
import javax.swing.JPanel;
40 41
import javax.swing.JScrollPane;
41 42
import javax.swing.JTextArea;
42 43
import javax.swing.JTextField;
......
87 88
	private JTextField ownerText;
88 89
	private JLabel dependenciesLabel;
89 90
	private JTextField dependenciesText;
91
	private JLabel ownerURLLabel;
92
	private JTextField ownerURLText;
90 93

  
94
	// private JScrollPane scrollPane;
95
	private JPanel newPanel;
96

  
91 97
	public DefaultPackageInfoPanel() {
92 98
		super();
93 99
		swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator
94 100
				.getSwingInstallerManager();
95 101
		initComponents();
102
		// initComponents2();
96 103
		initCombos();
97 104
	}
98 105

  
......
159 166
		sourcesText = new JTextField();
160 167
		ownerLabel = new JLabel();
161 168
		ownerText = new JTextField();
169
		ownerURLLabel = new JLabel();
170
		ownerURLText = new JTextField();
171

  
162 172
		dependenciesLabel = new JLabel();
163 173
		dependenciesText = new JTextField();
164 174

  
......
362 372
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
363 373
		add(ownerText, gridBagConstraints);
364 374

  
365
		sourcesLabel.setText(swingInstallerManager.getText("sources_url"));
375
		ownerURLLabel.setText(swingInstallerManager
376
				.getText("package_URL_owner"));
366 377
		gridBagConstraints = new GridBagConstraints();
367 378
		gridBagConstraints.gridx = 0;
368 379
		gridBagConstraints.gridy = 12;
369 380
		gridBagConstraints.anchor = GridBagConstraints.EAST;
370 381
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
382
		add(ownerURLLabel, gridBagConstraints);
383

  
384
		ownerURLText.setPreferredSize(new Dimension(100, 27));
385
		gridBagConstraints = new java.awt.GridBagConstraints();
386
		gridBagConstraints.gridx = 1;
387
		gridBagConstraints.gridy = 12;
388
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
389
		gridBagConstraints.weightx = 1.0;
390
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
391
		add(ownerURLText, gridBagConstraints);
392

  
393
		sourcesLabel.setText(swingInstallerManager.getText("sources_url"));
394
		gridBagConstraints = new GridBagConstraints();
395
		gridBagConstraints.gridx = 0;
396
		gridBagConstraints.gridy = 13;
397
		gridBagConstraints.anchor = GridBagConstraints.EAST;
398
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
371 399
		add(sourcesLabel, gridBagConstraints);
372 400

  
373 401
		sourcesText.setPreferredSize(new Dimension(100, 27));
374 402
		gridBagConstraints = new java.awt.GridBagConstraints();
375 403
		gridBagConstraints.gridx = 1;
376
		gridBagConstraints.gridy = 12;
404
		gridBagConstraints.gridy = 13;
377 405
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
378 406
		gridBagConstraints.weightx = 1.0;
379 407
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
......
383 411
				.setText(swingInstallerManager.getText("dependencies"));
384 412
		gridBagConstraints = new GridBagConstraints();
385 413
		gridBagConstraints.gridx = 0;
386
		gridBagConstraints.gridy = 13;
414
		gridBagConstraints.gridy = 14;
387 415
		gridBagConstraints.anchor = GridBagConstraints.EAST;
388 416
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
389 417
		add(dependenciesLabel, gridBagConstraints);
......
391 419
		dependenciesText.setPreferredSize(new Dimension(100, 27));
392 420
		gridBagConstraints = new java.awt.GridBagConstraints();
393 421
		gridBagConstraints.gridx = 1;
394
		gridBagConstraints.gridy = 13;
422
		gridBagConstraints.gridy = 14;
395 423
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
396 424
		gridBagConstraints.weightx = 1.0;
397 425
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
398 426
		add(dependenciesText, gridBagConstraints);
399 427
	}
400 428

  
429
	private void initComponents2() {
430
		java.awt.GridBagConstraints gridBagConstraints;
431

  
432
		// new
433
		newPanel = new JPanel();
434

  
435
		nameLabel = new JLabel();
436
		nameText = new JTextField();
437
		descriptionScrollPane = new JScrollPane();
438
		descriptionArea = new JTextArea();
439
		descriptionLabel = new JLabel();
440
		versionLabel = new JLabel();
441
		versionText = new JTextField();
442
		buildLabel = new JLabel();
443
		buildText = new JTextField();
444
		statusLabel = new JLabel();
445
		statusCombo = new JComboBox();
446
		officialLabel = new javax.swing.JLabel();
447
		officialCheckBox = new JCheckBox();
448
		codeLabel = new JLabel();
449
		codeText = new JTextField();
450

  
451
		operatingSystemLabel = new JLabel();
452
		operatingSystemCombo = new JComboBox();
453
		architectureLabel = new JLabel();
454
		architectureCombo = new JComboBox();
455
		javaVMLabel = new JLabel();
456
		javaVMCombo = new JComboBox();
457
		applicationVersionLabel = new JLabel();
458
		applicationVersionText = new JTextField();
459

  
460
		sourcesLabel = new JLabel();
461
		sourcesText = new JTextField();
462
		ownerLabel = new JLabel();
463
		ownerText = new JTextField();
464
		ownerURLLabel = new JLabel();
465
		ownerURLText = new JTextField();
466

  
467
		dependenciesLabel = new JLabel();
468
		dependenciesText = new JTextField();
469

  
470
		newPanel.setLayout(new java.awt.GridBagLayout());
471

  
472
		nameLabel.setText(swingInstallerManager.getText("name"));
473
		gridBagConstraints = new GridBagConstraints();
474
		gridBagConstraints.gridx = 0;
475
		gridBagConstraints.gridy = 1;
476
		gridBagConstraints.anchor = GridBagConstraints.EAST;
477
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
478
		newPanel.add(nameLabel, gridBagConstraints);
479

  
480
		nameText.setPreferredSize(new Dimension(100, 27));
481
		gridBagConstraints = new GridBagConstraints();
482
		gridBagConstraints.gridx = 1;
483
		gridBagConstraints.gridy = 1;
484
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
485
		gridBagConstraints.weightx = 1.0;
486
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
487
		newPanel.add(nameText, gridBagConstraints);
488

  
489
		descriptionLabel.setText(swingInstallerManager.getText("description"));
490
		gridBagConstraints = new GridBagConstraints();
491
		gridBagConstraints.gridx = 0;
492
		gridBagConstraints.gridy = 2;
493
		gridBagConstraints.anchor = GridBagConstraints.EAST;
494
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
495
		newPanel.add(descriptionLabel, gridBagConstraints);
496

  
497
		descriptionArea.setColumns(20);
498
		descriptionArea.setRows(5);
499
		descriptionScrollPane.setViewportView(descriptionArea);
500
		gridBagConstraints = new GridBagConstraints();
501
		gridBagConstraints.gridx = 1;
502
		gridBagConstraints.gridy = 2;
503
		gridBagConstraints.fill = GridBagConstraints.BOTH;
504
		gridBagConstraints.weightx = 1.0;
505
		gridBagConstraints.weighty = 1.0;
506
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
507
		newPanel.add(descriptionScrollPane, gridBagConstraints);
508

  
509
		versionLabel.setText(swingInstallerManager.getText("version"));
510
		gridBagConstraints = new GridBagConstraints();
511
		gridBagConstraints.gridx = 0;
512
		gridBagConstraints.gridy = 3;
513
		gridBagConstraints.anchor = GridBagConstraints.EAST;
514
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
515
		newPanel.add(versionLabel, gridBagConstraints);
516

  
517
		versionText.setPreferredSize(new Dimension(100, 27));
518
		gridBagConstraints = new java.awt.GridBagConstraints();
519
		gridBagConstraints.gridx = 1;
520
		gridBagConstraints.gridy = 3;
521
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
522
		gridBagConstraints.weightx = 1.0;
523
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
524
		newPanel.add(versionText, gridBagConstraints);
525

  
526
		buildLabel.setText(swingInstallerManager.getText("build"));
527
		gridBagConstraints = new GridBagConstraints();
528
		gridBagConstraints.gridx = 0;
529
		gridBagConstraints.gridy = 4;
530
		gridBagConstraints.anchor = GridBagConstraints.EAST;
531
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
532
		newPanel.add(buildLabel, gridBagConstraints);
533

  
534
		buildText.setPreferredSize(new java.awt.Dimension(100, 27));
535
		gridBagConstraints = new GridBagConstraints();
536
		gridBagConstraints.gridx = 1;
537
		gridBagConstraints.gridy = 4;
538
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
539
		gridBagConstraints.weightx = 1.0;
540
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
541
		newPanel.add(buildText, gridBagConstraints);
542

  
543
		officialLabel.setText(swingInstallerManager.getText("is_official"));
544
		gridBagConstraints = new GridBagConstraints();
545
		gridBagConstraints.gridx = 0;
546
		gridBagConstraints.gridy = 6;
547
		gridBagConstraints.anchor = GridBagConstraints.EAST;
548
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
549
		newPanel.add(officialLabel, gridBagConstraints);
550

  
551
		gridBagConstraints = new GridBagConstraints();
552
		gridBagConstraints.gridx = 1;
553
		gridBagConstraints.gridy = 6;
554
		gridBagConstraints.anchor = GridBagConstraints.WEST;
555
		gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
556
		newPanel.add(officialCheckBox, gridBagConstraints);
557

  
558
		statusLabel.setText(swingInstallerManager.getText("status"));
559
		gridBagConstraints = new GridBagConstraints();
560
		gridBagConstraints.gridx = 0;
561
		gridBagConstraints.gridy = 5;
562
		gridBagConstraints.anchor = GridBagConstraints.EAST;
563
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
564
		newPanel.add(statusLabel, gridBagConstraints);
565

  
566
		statusCombo.setPreferredSize(new java.awt.Dimension(100, 27));
567
		gridBagConstraints = new GridBagConstraints();
568
		gridBagConstraints.gridx = 1;
569
		gridBagConstraints.gridy = 5;
570
		gridBagConstraints.anchor = GridBagConstraints.WEST;
571
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
572
		newPanel.add(statusCombo, gridBagConstraints);
573

  
574
		codeLabel.setText(swingInstallerManager.getText("code"));
575
		gridBagConstraints = new GridBagConstraints();
576
		gridBagConstraints.anchor = GridBagConstraints.EAST;
577
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
578
		newPanel.add(codeLabel, gridBagConstraints);
579

  
580
		codeText.setPreferredSize(new java.awt.Dimension(100, 27));
581
		gridBagConstraints = new GridBagConstraints();
582
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
583
		gridBagConstraints.weightx = 1.0;
584
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
585
		newPanel.add(codeText, gridBagConstraints);
586

  
587
		operatingSystemLabel.setText(swingInstallerManager
588
				.getText("operating_system"));
589
		gridBagConstraints = new GridBagConstraints();
590
		gridBagConstraints.gridx = 0;
591
		gridBagConstraints.gridy = 7;
592
		gridBagConstraints.anchor = GridBagConstraints.EAST;
593
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
594
		newPanel.add(operatingSystemLabel, gridBagConstraints);
595

  
596
		operatingSystemCombo.setPreferredSize(new java.awt.Dimension(100, 27));
597
		gridBagConstraints = new GridBagConstraints();
598
		gridBagConstraints.gridx = 1;
599
		gridBagConstraints.gridy = 7;
600
		gridBagConstraints.anchor = GridBagConstraints.WEST;
601
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
602
		newPanel.add(operatingSystemCombo, gridBagConstraints);
603

  
604
		architectureLabel
605
				.setText(swingInstallerManager.getText("architecture"));
606
		gridBagConstraints = new GridBagConstraints();
607
		gridBagConstraints.gridx = 0;
608
		gridBagConstraints.gridy = 8;
609
		gridBagConstraints.anchor = GridBagConstraints.EAST;
610
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
611
		newPanel.add(architectureLabel, gridBagConstraints);
612

  
613
		architectureCombo.setPreferredSize(new java.awt.Dimension(100, 27));
614
		gridBagConstraints = new GridBagConstraints();
615
		gridBagConstraints.gridx = 1;
616
		gridBagConstraints.gridy = 8;
617
		gridBagConstraints.anchor = GridBagConstraints.WEST;
618
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
619
		newPanel.add(architectureCombo, gridBagConstraints);
620

  
621
		javaVMLabel.setText(swingInstallerManager.getText("java_version"));
622
		gridBagConstraints = new GridBagConstraints();
623
		gridBagConstraints.gridx = 0;
624
		gridBagConstraints.gridy = 9;
625
		gridBagConstraints.anchor = GridBagConstraints.EAST;
626
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
627
		newPanel.add(javaVMLabel, gridBagConstraints);
628

  
629
		javaVMCombo.setPreferredSize(new java.awt.Dimension(100, 27));
630
		gridBagConstraints = new GridBagConstraints();
631
		gridBagConstraints.gridx = 1;
632
		gridBagConstraints.gridy = 9;
633
		gridBagConstraints.anchor = GridBagConstraints.WEST;
634
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
635
		newPanel.add(javaVMCombo, gridBagConstraints);
636

  
637
		applicationVersionLabel.setText(swingInstallerManager
638
				.getText("gvSIG_desktop_version"));
639
		gridBagConstraints = new GridBagConstraints();
640
		gridBagConstraints.gridx = 0;
641
		gridBagConstraints.gridy = 10;
642
		gridBagConstraints.anchor = GridBagConstraints.EAST;
643
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
644
		newPanel.add(applicationVersionLabel, gridBagConstraints);
645

  
646
		applicationVersionText.setText(findCurrentGvSIGVersion());
647
		gridBagConstraints = new GridBagConstraints();
648
		gridBagConstraints.gridx = 1;
649
		gridBagConstraints.gridy = 10;
650
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
651
		gridBagConstraints.weightx = 1.0;
652
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
653
		newPanel.add(applicationVersionText, gridBagConstraints);
654

  
655
		ownerLabel.setText(swingInstallerManager.getText("package_owner"));
656
		gridBagConstraints = new GridBagConstraints();
657
		gridBagConstraints.gridx = 0;
658
		gridBagConstraints.gridy = 11;
659
		gridBagConstraints.anchor = GridBagConstraints.EAST;
660
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
661
		newPanel.add(ownerLabel, gridBagConstraints);
662

  
663
		ownerText.setPreferredSize(new Dimension(100, 27));
664
		gridBagConstraints = new java.awt.GridBagConstraints();
665
		gridBagConstraints.gridx = 1;
666
		gridBagConstraints.gridy = 11;
667
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
668
		gridBagConstraints.weightx = 1.0;
669
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
670
		newPanel.add(ownerText, gridBagConstraints);
671

  
672
		sourcesLabel.setText(swingInstallerManager.getText("sources_url"));
673
		gridBagConstraints = new GridBagConstraints();
674
		gridBagConstraints.gridx = 0;
675
		gridBagConstraints.gridy = 12;
676
		gridBagConstraints.anchor = GridBagConstraints.EAST;
677
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
678
		newPanel.add(sourcesLabel, gridBagConstraints);
679

  
680
		sourcesText.setPreferredSize(new Dimension(100, 27));
681
		gridBagConstraints = new java.awt.GridBagConstraints();
682
		gridBagConstraints.gridx = 1;
683
		gridBagConstraints.gridy = 12;
684
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
685
		gridBagConstraints.weightx = 1.0;
686
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
687
		newPanel.add(sourcesText, gridBagConstraints);
688

  
689
		dependenciesLabel
690
				.setText(swingInstallerManager.getText("dependencies"));
691
		gridBagConstraints = new GridBagConstraints();
692
		gridBagConstraints.gridx = 0;
693
		gridBagConstraints.gridy = 13;
694
		gridBagConstraints.anchor = GridBagConstraints.EAST;
695
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
696
		newPanel.add(dependenciesLabel, gridBagConstraints);
697

  
698
		dependenciesText.setPreferredSize(new Dimension(100, 27));
699
		gridBagConstraints = new java.awt.GridBagConstraints();
700
		gridBagConstraints.gridx = 1;
701
		gridBagConstraints.gridy = 13;
702
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
703
		gridBagConstraints.weightx = 1.0;
704
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
705
		newPanel.add(dependenciesText, gridBagConstraints);
706

  
707
		ownerURLLabel.setPreferredSize(new Dimension(100, 27));
708
		ownerURLLabel.setText(swingInstallerManager
709
				.getText("package_URL_owner"));
710
		gridBagConstraints = new GridBagConstraints();
711
		gridBagConstraints.gridx = 0;
712
		gridBagConstraints.gridy = 14;
713
		gridBagConstraints.anchor = GridBagConstraints.EAST;
714
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
715
		newPanel.add(ownerURLLabel, gridBagConstraints);
716

  
717
		ownerURLText.setPreferredSize(new Dimension(100, 27));
718
		gridBagConstraints = new java.awt.GridBagConstraints();
719
		gridBagConstraints.gridx = 1;
720
		gridBagConstraints.gridy = 14;
721
		gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
722
		gridBagConstraints.weightx = 1.0;
723
		gridBagConstraints.insets = new Insets(2, 2, 2, 2);
724
		newPanel.add(ownerURLText, gridBagConstraints);
725

  
726
		// scrollPane = new JScrollPane(newPanel);
727

  
728
		add(newPanel);
729
	}
730

  
401 731
	protected String findCurrentGvSIGVersion() {
402 732
		return SwingInstallerLocator.getSwingInstallerManager()
403 733
				.getApplicationVersion();
......
406 736
	/**
407 737
	 * @return the build
408 738
	 */
409
	public Integer getBuild() {
739
	private Integer getBuild() {
410 740
		try {
411 741
			return Integer.parseInt(buildText.getText());
412 742
		} catch (Exception e) {
......
418 748
	 * @param build
419 749
	 *            the build to set
420 750
	 */
421
	public void setBuildText(Integer build) {
751
	private void setBuildText(Integer build) {
422 752
		this.buildText.setText(build.toString());
423 753
	}
424 754

  
425 755
	/**
426 756
	 * @return the code
427 757
	 */
428
	public String getCode() {
758
	private String getCode() {
429 759
		return codeText.getText();
430 760
	}
431 761

  
......
433 763
	 * @param code
434 764
	 *            the codeText to set
435 765
	 */
436
	public void setCode(String code) {
766
	private void setCode(String code) {
437 767
		this.codeText.setText(code);
438 768
	}
439 769

  
......
457 787
	/**
458 788
	 * @return the offcicial
459 789
	 */
460
	public boolean isOfficial() {
790
	private boolean isOfficial() {
461 791
		return officialCheckBox.isSelected();
462 792
	}
463 793

  
......
465 795
	 * @param offcicial
466 796
	 *            the offcicial to set
467 797
	 */
468
	public void setOfficial(boolean isOfficial) {
798
	private void setOfficial(boolean isOfficial) {
469 799
		this.officialCheckBox.setSelected(isOfficial);
470 800
	}
471 801

  
472 802
	/**
473 803
	 * @return the status
474 804
	 */
475
	public String getState() {
805
	private String getState() {
476 806
		return (String) statusCombo.getSelectedItem();
477 807
	}
478 808

  
......
480 810
	 * @param status
481 811
	 *            the status to set
482 812
	 */
483
	public void setState(String state) {
813
	private void setState(String state) {
484 814
		this.statusCombo.setSelectedItem(state);
485 815
	}
486 816

  
487 817
	/**
488 818
	 * @return the version
489 819
	 */
490
	public String getVersion() {
820
	private String getVersion() {
491 821
		return versionText.getText();
492 822
	}
493 823

  
......
495 825
	 * @param version
496 826
	 *            the version to set
497 827
	 */
498
	public void setVersion(String version) {
828
	private void setVersion(String version) {
499 829
		this.versionText.setText(version);
500 830
	}
501 831

  
502 832
	/**
503 833
	 * @return the descriptionArea
504 834
	 */
505
	public String getDescription() {
835
	private String getDescription() {
506 836
		return descriptionArea.getText();
507 837
	}
508 838

  
......
510 840
	 * @param descriptionArea
511 841
	 *            the descriptionArea to set
512 842
	 */
513
	public void setDescription(String description) {
843
	private void setDescription(String description) {
514 844
		this.descriptionArea.setText(description);
515 845
	}
516 846

  
517
	public String getOperatingSystem() {
847
	private String getOperatingSystem() {
518 848
		return (String) this.operatingSystemCombo.getSelectedItem();
519 849
	}
520 850

  
521
	public void setOperatingSystem(String operatingSystem) {
851
	private void setOperatingSystem(String operatingSystem) {
522 852
		this.operatingSystemCombo.setSelectedItem(operatingSystem);
523 853
	}
524 854

  
525
	public String getArchitecture() {
855
	private String getArchitecture() {
526 856
		return (String) this.architectureCombo.getSelectedItem();
527 857
	}
528 858

  
529
	public void setArchitecture(String architecture) {
859
	private void setArchitecture(String architecture) {
530 860
		this.architectureCombo.setSelectedItem(architecture);
531 861
	}
532 862

  
533
	public String getJavaVM() {
863
	private String getJavaVM() {
534 864
		return (String) this.javaVMCombo.getSelectedItem();
535 865
	}
536 866

  
537
	public void setJavaVM(String javaVM) {
867
	private void setJavaVM(String javaVM) {
538 868
		this.javaVMCombo.setSelectedItem(javaVM);
539 869
	}
540 870

  
541
	public String getGvSIGVersion() {
871
	private String getGvSIGVersion() {
542 872
		return this.applicationVersionText.getText();
543 873
	}
544 874

  
545
	public void setGvSIGVersion(String gvSIGVersion) {
875
	private void setGvSIGVersion(String gvSIGVersion) {
546 876
		this.applicationVersionText.setText(gvSIGVersion);
547 877
	}
548 878

  
549
	public void setOwner(String owner) {
879
	private void setOwner(String owner) {
550 880
		this.ownerText.setText(owner);
551 881
	}
552 882

  
553
	public String getOwner() {
883
	private String getOwner() {
554 884
		return this.ownerText.getText();
555 885
	}
556 886

  
557
	public void setSources(String sources) {
887
	private void setSources(String sources) {
558 888
		this.sourcesText.setText(sources);
559 889
	}
560 890

  
561
	public URL getSources() throws MalformedURLException {
891
	private URL getSources() throws MalformedURLException {
562 892
		String str = this.sourcesText.getText();
563 893
		str = str.trim();
564 894
		if (str.equals("")) {
......
567 897
		return new URL(str);
568 898
	}
569 899

  
570
	public void setDependencies(String dependencies) {
900
	private void setOwnerURL(String sources) {
901
		this.ownerURLText.setText(sources);
902
	}
903

  
904
	private URL getOwnerURL() throws MalformedURLException {
905
		String str = this.ownerURLText.getText();
906
		str = str.trim();
907
		if (str.equals("")) {
908
			return null;
909
		}
910
		return new URL(str);
911
	}
912

  
913
	private void setDependencies(String dependencies) {
571 914
		this.dependenciesText.setText(dependencies);
572 915
	}
573 916

  
574
	public String getDependencies() {
917
	private String getDependencies() {
575 918
		return this.dependenciesText.getText();
576 919
	}
577 920

  
......
583 926
			JOptionPane
584 927
					.showMessageDialog(
585 928
							null,
586
							"_the_package_source_files_url_is_malformed._Please_review_it.",
587
							"_Malformed_URL", JOptionPane.OK_OPTION
929
							swingInstallerManager
930
									.getText("_the_package_source_files_url_is_malformed._Please_review_it"),
931
							"_malformed_url", JOptionPane.OK_OPTION
588 932
									+ JOptionPane.WARNING_MESSAGE);
589 933
			return false;
590 934
		}
935

  
936
		try {
937
			getOwnerURL();
938
		} catch (MalformedURLException e) {
939
			JOptionPane.showMessageDialog(null, swingInstallerManager
940
					.getText("_the_owners_url_is_malformed._Please_review_it"),
941
					"_malformed_url", JOptionPane.OK_OPTION
942
							+ JOptionPane.WARNING_MESSAGE);
943
			return false;
944
		}
945

  
591 946
		return true;
592 947
	}
593 948

  
......
609 964
		} catch (MalformedURLException e) {
610 965
			throw new RuntimeException(e);
611 966
		}
967
		try {
968
			packageInfo.setOwnerURL(getOwnerURL());
969
		} catch (MalformedURLException e) {
970
			throw new RuntimeException(e);
971
		}
612 972
		packageInfo.setOwner(getOwner());
613 973
		packageInfo.setDependencies(getDependencies());
614 974
	}
......
641 1001
		} else {
642 1002
			setOwner(packageInfo.getOwner());
643 1003
		}
1004
		if (packageInfo.getOwnerURL() == null) {
1005
			setOwnerURL("");
1006
		} else {
1007
			setOwnerURL(packageInfo.getOwnerURL().toString());
1008
		}
644 1009
		if (packageInfo.getDependencies() == null) {
645 1010
			setDependencies("");
646 1011
		} else {
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/resources/org/gvsig/symbology/app/symbolinstaller/text.properties
60 60
_cancel=Cancelar
61 61
_continue=Continuar
62 62
_error_creating_the_wizard=Error creando el asistente.
63
_malformed_url=Direcci?n URL incorrecta.
63
_malformed_url=Direcci?n URL incorrecta.
64
_the_package_source_files_url_is_malformed._Please_review_it=La URL de los archivos fuente del paquete es incorrecta. Por favor, rev?sala.
65
_the_owners_url_is_malformed._Please_review_it=La URL del propietario es incorrecta. Por favor, rev?sala.
branches/v2_0_0_prep/extensions/org.gvsig.installer/org.gvsig.installer.swing/org.gvsig.installer.swing.impl/src/main/resources/org/gvsig/symbology/app/symbolinstaller/text_en.properties
60 60
_cancel=Cancel
61 61
_continue=Continue
62 62
_error_creating_the_wizard=Error creating the wizard
63
_malformed_url=Malformed URL
63
_malformed_url=Malformed URL
64
_the_package_source_files_url_is_malformed._Please_review_it=The package source files URL is malformed. Please review it.
65
_the_owners_url_is_malformed._Please_review_it=The owner's URL is malformed. Please review it.

Also available in: Unified diff