root / branches / v2_0_0_prep / extensions / org.gvsig.symbology.app / org.gvsig.symbology.app.symbolinstaller / src / main / java / org / gvsig / symbology / app / symbolinstaller / creation / wizard / PackageInfoWizard.java @ 37296
History | View | Annotate | Download (2.75 KB)
1 | 37171 | nfrancisco | package org.gvsig.symbology.app.symbolinstaller.creation.wizard; |
---|---|---|---|
2 | |||
3 | /* gvSIG. Geographic Information System of the Valencian Government
|
||
4 | *
|
||
5 | * Copyright (C) 2007-2008 Infrastructures and Transports Department
|
||
6 | * of the Valencian Government (CIT)
|
||
7 | *
|
||
8 | * This program is free software; you can redistribute it and/or
|
||
9 | * modify it under the terms of the GNU General Public License
|
||
10 | * as published by the Free Software Foundation; either version 2
|
||
11 | * of the License, or (at your option) any later version.
|
||
12 | *
|
||
13 | * This program is distributed in the hope that it will be useful,
|
||
14 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||
15 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||
16 | * GNU General Public License for more details.
|
||
17 | *
|
||
18 | * You should have received a copy of the GNU General Public License
|
||
19 | * along with this program; if not, write to the Free Software
|
||
20 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
||
21 | * MA 02110-1301, USA.
|
||
22 | *
|
||
23 | */
|
||
24 | |||
25 | /*
|
||
26 | * AUTHORS (In addition to CIT):
|
||
27 | * 2010 {Prodevelop} {Task}
|
||
28 | */
|
||
29 | |||
30 | import javax.swing.JPanel; |
||
31 | |||
32 | import org.gvsig.gui.beans.wizard.panel.NotContinueWizardException; |
||
33 | import org.gvsig.gui.beans.wizard.panel.OptionPanel; |
||
34 | 37186 | nfrancisco | import org.gvsig.i18n.Messages; |
35 | 37171 | nfrancisco | import org.gvsig.installer.lib.api.PackageInfo; |
36 | import org.gvsig.installer.swing.api.SwingInstallerLocator; |
||
37 | import org.gvsig.installer.swing.api.creation.JPackageInfoPanel; |
||
38 | 37186 | nfrancisco | import org.gvsig.symbology.app.symbolinstaller.creation.DefaultMakeSymbolPackageWizard; |
39 | 37171 | nfrancisco | |
40 | /**
|
||
41 | * @author <a href="mailto:jpiera@gvsig.org">Jorge Piera Llodrá</a>
|
||
42 | */
|
||
43 | public class PackageInfoWizard implements OptionPanel { |
||
44 | |||
45 | private JPackageInfoPanel packageInfoPanel;
|
||
46 | |||
47 | private PackageInfo packageInfo;
|
||
48 | |||
49 | 37186 | nfrancisco | // private DefaultMakeSymbolPackageWizard wizard;
|
50 | |||
51 | public PackageInfoWizard(DefaultMakeSymbolPackageWizard wizard,
|
||
52 | PackageInfo packageInfo) { |
||
53 | 37171 | nfrancisco | super();
|
54 | // this.wizard = wizard;
|
||
55 | this.packageInfoPanel =
|
||
56 | SwingInstallerLocator.getSwingInstallerManager() |
||
57 | .createPackageInfoPanel(); |
||
58 | this.packageInfo = packageInfo;
|
||
59 | } |
||
60 | |||
61 | private String getText(String msg) { |
||
62 | 37186 | nfrancisco | return Messages.getText(msg);
|
63 | 37171 | nfrancisco | } |
64 | |||
65 | public JPanel getJPanel() { |
||
66 | return this.packageInfoPanel; |
||
67 | } |
||
68 | |||
69 | public String getPanelTitle() { |
||
70 | 37186 | nfrancisco | return getText("_plugin_description"); |
71 | 37171 | nfrancisco | } |
72 | |||
73 | public void lastPanel() { |
||
74 | // TODO Auto-generated method stub
|
||
75 | |||
76 | } |
||
77 | |||
78 | public void nextPanel() throws NotContinueWizardException { |
||
79 | if (!this.packageInfoPanel.validatePanel()) { |
||
80 | throw new NotContinueWizardException("", null, false); |
||
81 | } |
||
82 | this.packageInfoPanel.panelToPackageInfo(packageInfo);
|
||
83 | } |
||
84 | |||
85 | public void updatePanel() { |
||
86 | this.packageInfoPanel.packageInfoToPanel(packageInfo);
|
||
87 | } |
||
88 | |||
89 | } |