Revision 37590 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
DefaultPackageInfoPanel.java | ||
---|---|---|
55 | 55 |
*/ |
56 | 56 |
public class DefaultPackageInfoPanel extends JPackageInfoPanel { |
57 | 57 |
|
58 |
private static final long serialVersionUID = 3220127550495628087L;
|
|
58 |
private static final long serialVersionUID = 3220127550495628087L;
|
|
59 | 59 |
|
60 |
protected DefaultSwingInstallerManager swingInstallerManager = null;
|
|
61 |
private JLabel buildLabel;
|
|
62 |
private JTextField buildText;
|
|
63 |
private JLabel codeLabel;
|
|
64 |
private JTextField codeText;
|
|
65 |
private JTextArea descriptionArea;
|
|
66 |
private JLabel descriptionLabel;
|
|
67 |
private JScrollPane descriptionScrollPane;
|
|
68 |
private JTextField nameText;
|
|
69 |
private JLabel nameLabel;
|
|
70 |
private JLabel officialLabel;
|
|
71 |
private JCheckBox officialCheckBox;
|
|
72 |
private JComboBox statusCombo;
|
|
73 |
private JLabel statusLabel;
|
|
74 |
private JLabel versionLabel;
|
|
75 |
private JTextField versionText;
|
|
76 |
private JLabel operatingSystemLabel;
|
|
77 |
private JComboBox operatingSystemCombo;
|
|
78 |
private JLabel architectureLabel;
|
|
79 |
private JComboBox architectureCombo;
|
|
80 |
private JLabel javaVMLabel;
|
|
81 |
private JComboBox javaVMCombo;
|
|
82 |
private JLabel applicationVersionLabel;
|
|
83 |
private JTextField applicationVersionText;
|
|
84 |
private JLabel sourcesLabel;
|
|
85 |
private JTextField sourcesText;
|
|
86 |
private JLabel ownerLabel;
|
|
87 |
private JTextField ownerText;
|
|
88 |
private JLabel dependenciesLabel;
|
|
89 |
private JTextField dependenciesText;
|
|
60 |
protected DefaultSwingInstallerManager swingInstallerManager = null;
|
|
61 |
private JLabel buildLabel;
|
|
62 |
private JTextField buildText;
|
|
63 |
private JLabel codeLabel;
|
|
64 |
private JTextField codeText;
|
|
65 |
private JTextArea descriptionArea;
|
|
66 |
private JLabel descriptionLabel;
|
|
67 |
private JScrollPane descriptionScrollPane;
|
|
68 |
private JTextField nameText;
|
|
69 |
private JLabel nameLabel;
|
|
70 |
private JLabel officialLabel;
|
|
71 |
private JCheckBox officialCheckBox;
|
|
72 |
private JComboBox statusCombo;
|
|
73 |
private JLabel statusLabel;
|
|
74 |
private JLabel versionLabel;
|
|
75 |
private JTextField versionText;
|
|
76 |
private JLabel operatingSystemLabel;
|
|
77 |
private JComboBox operatingSystemCombo;
|
|
78 |
private JLabel architectureLabel;
|
|
79 |
private JComboBox architectureCombo;
|
|
80 |
private JLabel javaVMLabel;
|
|
81 |
private JComboBox javaVMCombo;
|
|
82 |
private JLabel applicationVersionLabel;
|
|
83 |
private JTextField applicationVersionText;
|
|
84 |
private JLabel sourcesLabel;
|
|
85 |
private JTextField sourcesText;
|
|
86 |
private JLabel ownerLabel;
|
|
87 |
private JTextField ownerText;
|
|
88 |
private JLabel dependenciesLabel;
|
|
89 |
private JTextField dependenciesText;
|
|
90 | 90 |
|
91 |
|
|
92 |
public DefaultPackageInfoPanel() { |
|
93 |
super(); |
|
94 |
swingInstallerManager = |
|
95 |
(DefaultSwingInstallerManager) SwingInstallerLocator |
|
96 |
.getSwingInstallerManager(); |
|
97 |
initComponents(); |
|
98 |
initCombos(); |
|
99 |
} |
|
91 |
public DefaultPackageInfoPanel() { |
|
92 |
super(); |
|
93 |
swingInstallerManager = (DefaultSwingInstallerManager) SwingInstallerLocator |
|
94 |
.getSwingInstallerManager(); |
|
95 |
initComponents(); |
|
96 |
initCombos(); |
|
97 |
} |
|
100 | 98 |
|
101 |
private void initCombos() {
|
|
102 |
statusCombo.addItem(STATE.DEVEL);
|
|
103 |
statusCombo.addItem(STATE.TESTING);
|
|
104 |
statusCombo.addItem(STATE.PILOT);
|
|
105 |
statusCombo.addItem(STATE.PROTOTYPE);
|
|
106 |
statusCombo.addItem(STATE.ALPHA.concat("1"));
|
|
107 |
statusCombo.addItem(STATE.ALPHA.concat("2"));
|
|
108 |
statusCombo.addItem(STATE.ALPHA.concat("3"));
|
|
109 |
statusCombo.addItem(STATE.BETA.concat("1"));
|
|
110 |
statusCombo.addItem(STATE.BETA.concat("2"));
|
|
111 |
statusCombo.addItem(STATE.BETA.concat("3"));
|
|
112 |
statusCombo.addItem(STATE.RC.concat("1"));
|
|
113 |
statusCombo.addItem(STATE.RC.concat("2"));
|
|
114 |
statusCombo.addItem(STATE.RC.concat("3"));
|
|
115 |
statusCombo.addItem(STATE.FINAL);
|
|
99 |
private void initCombos() {
|
|
100 |
statusCombo.addItem(STATE.DEVEL);
|
|
101 |
statusCombo.addItem(STATE.TESTING);
|
|
102 |
statusCombo.addItem(STATE.PILOT);
|
|
103 |
statusCombo.addItem(STATE.PROTOTYPE);
|
|
104 |
statusCombo.addItem(STATE.ALPHA.concat("1"));
|
|
105 |
statusCombo.addItem(STATE.ALPHA.concat("2"));
|
|
106 |
statusCombo.addItem(STATE.ALPHA.concat("3"));
|
|
107 |
statusCombo.addItem(STATE.BETA.concat("1"));
|
|
108 |
statusCombo.addItem(STATE.BETA.concat("2"));
|
|
109 |
statusCombo.addItem(STATE.BETA.concat("3"));
|
|
110 |
statusCombo.addItem(STATE.RC.concat("1"));
|
|
111 |
statusCombo.addItem(STATE.RC.concat("2"));
|
|
112 |
statusCombo.addItem(STATE.RC.concat("3"));
|
|
113 |
statusCombo.addItem(STATE.FINAL);
|
|
116 | 114 |
|
117 |
operatingSystemCombo.addItem(OS.ALL);
|
|
118 |
operatingSystemCombo.addItem(OS.LINUX);
|
|
119 |
operatingSystemCombo.addItem(OS.WINDOWS);
|
|
120 |
operatingSystemCombo.addItem(OS.OSX_10_4);
|
|
121 |
operatingSystemCombo.addItem(OS.OSX_10_5);
|
|
122 |
operatingSystemCombo.addItem(OS.OSX_10_6);
|
|
115 |
operatingSystemCombo.addItem(OS.ALL);
|
|
116 |
operatingSystemCombo.addItem(OS.LINUX);
|
|
117 |
operatingSystemCombo.addItem(OS.WINDOWS);
|
|
118 |
operatingSystemCombo.addItem(OS.OSX_10_4);
|
|
119 |
operatingSystemCombo.addItem(OS.OSX_10_5);
|
|
120 |
operatingSystemCombo.addItem(OS.OSX_10_6);
|
|
123 | 121 |
|
124 |
architectureCombo.addItem(ARCH.ALL);
|
|
125 |
architectureCombo.addItem(ARCH.X86);
|
|
126 |
architectureCombo.addItem(ARCH.X86_64);
|
|
122 |
architectureCombo.addItem(ARCH.ALL);
|
|
123 |
architectureCombo.addItem(ARCH.X86);
|
|
124 |
architectureCombo.addItem(ARCH.X86_64);
|
|
127 | 125 |
|
128 |
javaVMCombo.addItem(JVM.J1_5);
|
|
129 |
javaVMCombo.addItem(JVM.J1_6);
|
|
130 |
}
|
|
126 |
javaVMCombo.addItem(JVM.J1_5);
|
|
127 |
javaVMCombo.addItem(JVM.J1_6);
|
|
128 |
}
|
|
131 | 129 |
|
132 |
private void initComponents() {
|
|
133 |
java.awt.GridBagConstraints gridBagConstraints;
|
|
130 |
private void initComponents() {
|
|
131 |
java.awt.GridBagConstraints gridBagConstraints;
|
|
134 | 132 |
|
135 |
nameLabel = new JLabel();
|
|
136 |
nameText = new JTextField();
|
|
137 |
descriptionScrollPane = new JScrollPane();
|
|
138 |
descriptionArea = new JTextArea();
|
|
139 |
descriptionLabel = new JLabel();
|
|
140 |
versionLabel = new JLabel();
|
|
141 |
versionText = new JTextField();
|
|
142 |
buildLabel = new JLabel();
|
|
143 |
buildText = new JTextField();
|
|
144 |
statusLabel = new JLabel();
|
|
145 |
statusCombo = new JComboBox();
|
|
146 |
officialLabel = new javax.swing.JLabel();
|
|
147 |
officialCheckBox = new JCheckBox();
|
|
148 |
codeLabel = new JLabel();
|
|
149 |
codeText = new JTextField();
|
|
133 |
nameLabel = new JLabel();
|
|
134 |
nameText = new JTextField();
|
|
135 |
descriptionScrollPane = new JScrollPane();
|
|
136 |
descriptionArea = new JTextArea();
|
|
137 |
descriptionLabel = new JLabel();
|
|
138 |
versionLabel = new JLabel();
|
|
139 |
versionText = new JTextField();
|
|
140 |
buildLabel = new JLabel();
|
|
141 |
buildText = new JTextField();
|
|
142 |
statusLabel = new JLabel();
|
|
143 |
statusCombo = new JComboBox();
|
|
144 |
officialLabel = new javax.swing.JLabel();
|
|
145 |
officialCheckBox = new JCheckBox();
|
|
146 |
codeLabel = new JLabel();
|
|
147 |
codeText = new JTextField();
|
|
150 | 148 |
|
151 |
operatingSystemLabel = new JLabel();
|
|
152 |
operatingSystemCombo = new JComboBox();
|
|
153 |
architectureLabel = new JLabel();
|
|
154 |
architectureCombo = new JComboBox();
|
|
155 |
javaVMLabel = new JLabel();
|
|
156 |
javaVMCombo = new JComboBox();
|
|
157 |
applicationVersionLabel = new JLabel();
|
|
158 |
applicationVersionText = new JTextField();
|
|
149 |
operatingSystemLabel = new JLabel();
|
|
150 |
operatingSystemCombo = new JComboBox();
|
|
151 |
architectureLabel = new JLabel();
|
|
152 |
architectureCombo = new JComboBox();
|
|
153 |
javaVMLabel = new JLabel();
|
|
154 |
javaVMCombo = new JComboBox();
|
|
155 |
applicationVersionLabel = new JLabel();
|
|
156 |
applicationVersionText = new JTextField();
|
|
159 | 157 |
|
160 |
sourcesLabel = new JLabel();
|
|
161 |
sourcesText = new JTextField();
|
|
162 |
ownerLabel = new JLabel();
|
|
163 |
ownerText = new JTextField();
|
|
164 |
dependenciesLabel = new JLabel();
|
|
165 |
dependenciesText = new JTextField();
|
|
158 |
sourcesLabel = new JLabel();
|
|
159 |
sourcesText = new JTextField();
|
|
160 |
ownerLabel = new JLabel();
|
|
161 |
ownerText = new JTextField();
|
|
162 |
dependenciesLabel = new JLabel();
|
|
163 |
dependenciesText = new JTextField();
|
|
166 | 164 |
|
167 |
setLayout(new java.awt.GridBagLayout());
|
|
165 |
setLayout(new java.awt.GridBagLayout());
|
|
168 | 166 |
|
169 |
nameLabel.setText(swingInstallerManager.getText("name"));
|
|
170 |
gridBagConstraints = new GridBagConstraints();
|
|
171 |
gridBagConstraints.gridx = 0;
|
|
172 |
gridBagConstraints.gridy = 1;
|
|
173 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
174 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
175 |
add(nameLabel, gridBagConstraints);
|
|
167 |
nameLabel.setText(swingInstallerManager.getText("name"));
|
|
168 |
gridBagConstraints = new GridBagConstraints();
|
|
169 |
gridBagConstraints.gridx = 0;
|
|
170 |
gridBagConstraints.gridy = 1;
|
|
171 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
172 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
173 |
add(nameLabel, gridBagConstraints);
|
|
176 | 174 |
|
177 |
gridBagConstraints = new GridBagConstraints();
|
|
178 |
gridBagConstraints.gridx = 1;
|
|
179 |
gridBagConstraints.gridy = 1;
|
|
180 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
181 |
gridBagConstraints.weightx = 1.0;
|
|
182 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
183 |
add(nameText, gridBagConstraints);
|
|
175 |
gridBagConstraints = new GridBagConstraints();
|
|
176 |
gridBagConstraints.gridx = 1;
|
|
177 |
gridBagConstraints.gridy = 1;
|
|
178 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
179 |
gridBagConstraints.weightx = 1.0;
|
|
180 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
181 |
add(nameText, gridBagConstraints);
|
|
184 | 182 |
|
185 |
descriptionLabel.setText(swingInstallerManager.getText("description"));
|
|
186 |
gridBagConstraints = new GridBagConstraints();
|
|
187 |
gridBagConstraints.gridx = 0;
|
|
188 |
gridBagConstraints.gridy = 2;
|
|
189 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
190 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
191 |
add(descriptionLabel, gridBagConstraints);
|
|
183 |
descriptionLabel.setText(swingInstallerManager.getText("description"));
|
|
184 |
gridBagConstraints = new GridBagConstraints();
|
|
185 |
gridBagConstraints.gridx = 0;
|
|
186 |
gridBagConstraints.gridy = 2;
|
|
187 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
188 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
189 |
add(descriptionLabel, gridBagConstraints);
|
|
192 | 190 |
|
193 |
descriptionArea.setColumns(20);
|
|
194 |
descriptionArea.setRows(5);
|
|
195 |
descriptionScrollPane.setViewportView(descriptionArea);
|
|
196 |
gridBagConstraints = new GridBagConstraints();
|
|
197 |
gridBagConstraints.gridx = 1;
|
|
198 |
gridBagConstraints.gridy = 2;
|
|
199 |
gridBagConstraints.fill = GridBagConstraints.BOTH;
|
|
200 |
gridBagConstraints.weightx = 1.0;
|
|
201 |
gridBagConstraints.weighty = 1.0;
|
|
202 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
203 |
add(descriptionScrollPane, gridBagConstraints);
|
|
191 |
descriptionArea.setColumns(20);
|
|
192 |
descriptionArea.setRows(5);
|
|
193 |
descriptionScrollPane.setViewportView(descriptionArea);
|
|
194 |
gridBagConstraints = new GridBagConstraints();
|
|
195 |
gridBagConstraints.gridx = 1;
|
|
196 |
gridBagConstraints.gridy = 2;
|
|
197 |
gridBagConstraints.fill = GridBagConstraints.BOTH;
|
|
198 |
gridBagConstraints.weightx = 1.0;
|
|
199 |
gridBagConstraints.weighty = 1.0;
|
|
200 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
201 |
add(descriptionScrollPane, gridBagConstraints);
|
|
204 | 202 |
|
205 |
versionLabel.setText(swingInstallerManager.getText("version"));
|
|
206 |
gridBagConstraints = new GridBagConstraints();
|
|
207 |
gridBagConstraints.gridx = 0;
|
|
208 |
gridBagConstraints.gridy = 3;
|
|
209 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
210 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
211 |
add(versionLabel, gridBagConstraints);
|
|
203 |
versionLabel.setText(swingInstallerManager.getText("version"));
|
|
204 |
gridBagConstraints = new GridBagConstraints();
|
|
205 |
gridBagConstraints.gridx = 0;
|
|
206 |
gridBagConstraints.gridy = 3;
|
|
207 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
208 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
209 |
add(versionLabel, gridBagConstraints);
|
|
212 | 210 |
|
213 |
versionText.setPreferredSize(new Dimension(100, 27));
|
|
214 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
|
215 |
gridBagConstraints.gridx = 1;
|
|
216 |
gridBagConstraints.gridy = 3;
|
|
217 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
218 |
gridBagConstraints.weightx = 1.0;
|
|
219 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
220 |
add(versionText, gridBagConstraints);
|
|
211 |
versionText.setPreferredSize(new Dimension(100, 27));
|
|
212 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
|
213 |
gridBagConstraints.gridx = 1;
|
|
214 |
gridBagConstraints.gridy = 3;
|
|
215 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
216 |
gridBagConstraints.weightx = 1.0;
|
|
217 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
218 |
add(versionText, gridBagConstraints);
|
|
221 | 219 |
|
222 |
buildLabel.setText(swingInstallerManager.getText("build"));
|
|
223 |
gridBagConstraints = new GridBagConstraints();
|
|
224 |
gridBagConstraints.gridx = 0;
|
|
225 |
gridBagConstraints.gridy = 4;
|
|
226 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
227 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
228 |
add(buildLabel, gridBagConstraints);
|
|
220 |
buildLabel.setText(swingInstallerManager.getText("build"));
|
|
221 |
gridBagConstraints = new GridBagConstraints();
|
|
222 |
gridBagConstraints.gridx = 0;
|
|
223 |
gridBagConstraints.gridy = 4;
|
|
224 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
225 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
226 |
add(buildLabel, gridBagConstraints);
|
|
229 | 227 |
|
230 |
buildText.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
231 |
gridBagConstraints = new GridBagConstraints();
|
|
232 |
gridBagConstraints.gridx = 1;
|
|
233 |
gridBagConstraints.gridy = 4;
|
|
234 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
235 |
gridBagConstraints.weightx = 1.0;
|
|
236 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
237 |
add(buildText, gridBagConstraints);
|
|
228 |
buildText.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
229 |
gridBagConstraints = new GridBagConstraints();
|
|
230 |
gridBagConstraints.gridx = 1;
|
|
231 |
gridBagConstraints.gridy = 4;
|
|
232 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
233 |
gridBagConstraints.weightx = 1.0;
|
|
234 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
235 |
add(buildText, gridBagConstraints);
|
|
238 | 236 |
|
239 |
officialLabel.setText(swingInstallerManager.getText("is_official"));
|
|
240 |
gridBagConstraints = new GridBagConstraints();
|
|
241 |
gridBagConstraints.gridx = 0;
|
|
242 |
gridBagConstraints.gridy = 6;
|
|
243 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
244 |
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
|
|
245 |
add(officialLabel, gridBagConstraints);
|
|
237 |
officialLabel.setText(swingInstallerManager.getText("is_official"));
|
|
238 |
gridBagConstraints = new GridBagConstraints();
|
|
239 |
gridBagConstraints.gridx = 0;
|
|
240 |
gridBagConstraints.gridy = 6;
|
|
241 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
242 |
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
|
|
243 |
add(officialLabel, gridBagConstraints);
|
|
246 | 244 |
|
247 |
gridBagConstraints = new GridBagConstraints();
|
|
248 |
gridBagConstraints.gridx = 1;
|
|
249 |
gridBagConstraints.gridy = 6;
|
|
250 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
251 |
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
|
|
252 |
add(officialCheckBox, gridBagConstraints);
|
|
245 |
gridBagConstraints = new GridBagConstraints();
|
|
246 |
gridBagConstraints.gridx = 1;
|
|
247 |
gridBagConstraints.gridy = 6;
|
|
248 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
249 |
gridBagConstraints.insets = new java.awt.Insets(2, 2, 2, 2);
|
|
250 |
add(officialCheckBox, gridBagConstraints);
|
|
253 | 251 |
|
254 |
statusLabel.setText(swingInstallerManager.getText("status"));
|
|
255 |
gridBagConstraints = new GridBagConstraints();
|
|
256 |
gridBagConstraints.gridx = 0;
|
|
257 |
gridBagConstraints.gridy = 5;
|
|
258 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
259 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
260 |
add(statusLabel, gridBagConstraints);
|
|
252 |
statusLabel.setText(swingInstallerManager.getText("status"));
|
|
253 |
gridBagConstraints = new GridBagConstraints();
|
|
254 |
gridBagConstraints.gridx = 0;
|
|
255 |
gridBagConstraints.gridy = 5;
|
|
256 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
257 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
258 |
add(statusLabel, gridBagConstraints);
|
|
261 | 259 |
|
262 |
statusCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
263 |
gridBagConstraints = new GridBagConstraints();
|
|
264 |
gridBagConstraints.gridx = 1;
|
|
265 |
gridBagConstraints.gridy = 5;
|
|
266 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
267 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
268 |
add(statusCombo, gridBagConstraints);
|
|
260 |
statusCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
261 |
gridBagConstraints = new GridBagConstraints();
|
|
262 |
gridBagConstraints.gridx = 1;
|
|
263 |
gridBagConstraints.gridy = 5;
|
|
264 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
265 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
266 |
add(statusCombo, gridBagConstraints);
|
|
269 | 267 |
|
270 |
codeLabel.setText(swingInstallerManager.getText("code"));
|
|
271 |
gridBagConstraints = new GridBagConstraints();
|
|
272 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
273 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
274 |
add(codeLabel, gridBagConstraints);
|
|
268 |
codeLabel.setText(swingInstallerManager.getText("code"));
|
|
269 |
gridBagConstraints = new GridBagConstraints();
|
|
270 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
271 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
272 |
add(codeLabel, gridBagConstraints);
|
|
275 | 273 |
|
276 |
gridBagConstraints = new GridBagConstraints();
|
|
277 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
278 |
gridBagConstraints.weightx = 1.0;
|
|
279 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
280 |
add(codeText, gridBagConstraints);
|
|
274 |
gridBagConstraints = new GridBagConstraints();
|
|
275 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
276 |
gridBagConstraints.weightx = 1.0;
|
|
277 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
278 |
add(codeText, gridBagConstraints);
|
|
281 | 279 |
|
282 |
operatingSystemLabel.setText(swingInstallerManager
|
|
283 |
.getText("operating_system"));
|
|
284 |
gridBagConstraints = new GridBagConstraints();
|
|
285 |
gridBagConstraints.gridx = 0;
|
|
286 |
gridBagConstraints.gridy = 7;
|
|
287 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
288 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
289 |
add(operatingSystemLabel, gridBagConstraints);
|
|
280 |
operatingSystemLabel.setText(swingInstallerManager
|
|
281 |
.getText("operating_system"));
|
|
282 |
gridBagConstraints = new GridBagConstraints();
|
|
283 |
gridBagConstraints.gridx = 0;
|
|
284 |
gridBagConstraints.gridy = 7;
|
|
285 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
286 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
287 |
add(operatingSystemLabel, gridBagConstraints);
|
|
290 | 288 |
|
291 |
operatingSystemCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
292 |
gridBagConstraints = new GridBagConstraints();
|
|
293 |
gridBagConstraints.gridx = 1;
|
|
294 |
gridBagConstraints.gridy = 7;
|
|
295 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
296 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
297 |
add(operatingSystemCombo, gridBagConstraints);
|
|
289 |
operatingSystemCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
290 |
gridBagConstraints = new GridBagConstraints();
|
|
291 |
gridBagConstraints.gridx = 1;
|
|
292 |
gridBagConstraints.gridy = 7;
|
|
293 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
294 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
295 |
add(operatingSystemCombo, gridBagConstraints);
|
|
298 | 296 |
|
299 |
architectureLabel
|
|
300 |
.setText(swingInstallerManager.getText("architecture"));
|
|
301 |
gridBagConstraints = new GridBagConstraints();
|
|
302 |
gridBagConstraints.gridx = 0;
|
|
303 |
gridBagConstraints.gridy = 8;
|
|
304 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
305 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
306 |
add(architectureLabel, gridBagConstraints);
|
|
297 |
architectureLabel
|
|
298 |
.setText(swingInstallerManager.getText("architecture"));
|
|
299 |
gridBagConstraints = new GridBagConstraints();
|
|
300 |
gridBagConstraints.gridx = 0;
|
|
301 |
gridBagConstraints.gridy = 8;
|
|
302 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
303 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
304 |
add(architectureLabel, gridBagConstraints);
|
|
307 | 305 |
|
308 |
architectureCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
309 |
gridBagConstraints = new GridBagConstraints();
|
|
310 |
gridBagConstraints.gridx = 1;
|
|
311 |
gridBagConstraints.gridy = 8;
|
|
312 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
313 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
314 |
add(architectureCombo, gridBagConstraints);
|
|
306 |
architectureCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
307 |
gridBagConstraints = new GridBagConstraints();
|
|
308 |
gridBagConstraints.gridx = 1;
|
|
309 |
gridBagConstraints.gridy = 8;
|
|
310 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
311 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
312 |
add(architectureCombo, gridBagConstraints);
|
|
315 | 313 |
|
316 |
javaVMLabel.setText(swingInstallerManager.getText("java_version"));
|
|
317 |
gridBagConstraints = new GridBagConstraints();
|
|
318 |
gridBagConstraints.gridx = 0;
|
|
319 |
gridBagConstraints.gridy = 9;
|
|
320 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
321 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
322 |
add(javaVMLabel, gridBagConstraints);
|
|
314 |
javaVMLabel.setText(swingInstallerManager.getText("java_version"));
|
|
315 |
gridBagConstraints = new GridBagConstraints();
|
|
316 |
gridBagConstraints.gridx = 0;
|
|
317 |
gridBagConstraints.gridy = 9;
|
|
318 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
319 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
320 |
add(javaVMLabel, gridBagConstraints);
|
|
323 | 321 |
|
324 |
javaVMCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
325 |
gridBagConstraints = new GridBagConstraints();
|
|
326 |
gridBagConstraints.gridx = 1;
|
|
327 |
gridBagConstraints.gridy = 9;
|
|
328 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
329 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
330 |
add(javaVMCombo, gridBagConstraints);
|
|
322 |
javaVMCombo.setPreferredSize(new java.awt.Dimension(100, 27));
|
|
323 |
gridBagConstraints = new GridBagConstraints();
|
|
324 |
gridBagConstraints.gridx = 1;
|
|
325 |
gridBagConstraints.gridy = 9;
|
|
326 |
gridBagConstraints.anchor = GridBagConstraints.WEST;
|
|
327 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
328 |
add(javaVMCombo, gridBagConstraints);
|
|
331 | 329 |
|
332 |
applicationVersionLabel.setText(swingInstallerManager
|
|
333 |
.getText("gvSIG_desktop_version"));
|
|
334 |
gridBagConstraints = new GridBagConstraints();
|
|
335 |
gridBagConstraints.gridx = 0;
|
|
336 |
gridBagConstraints.gridy = 10;
|
|
337 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
338 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
339 |
add(applicationVersionLabel, gridBagConstraints);
|
|
330 |
applicationVersionLabel.setText(swingInstallerManager
|
|
331 |
.getText("gvSIG_desktop_version"));
|
|
332 |
gridBagConstraints = new GridBagConstraints();
|
|
333 |
gridBagConstraints.gridx = 0;
|
|
334 |
gridBagConstraints.gridy = 10;
|
|
335 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
336 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
337 |
add(applicationVersionLabel, gridBagConstraints);
|
|
340 | 338 |
|
341 |
applicationVersionText.setText(findCurrentGvSIGVersion());
|
|
342 |
gridBagConstraints = new GridBagConstraints();
|
|
343 |
gridBagConstraints.gridx = 1;
|
|
344 |
gridBagConstraints.gridy = 10;
|
|
345 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
346 |
gridBagConstraints.weightx = 1.0;
|
|
347 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
348 |
add(applicationVersionText, gridBagConstraints);
|
|
339 |
applicationVersionText.setText(findCurrentGvSIGVersion());
|
|
340 |
gridBagConstraints = new GridBagConstraints();
|
|
341 |
gridBagConstraints.gridx = 1;
|
|
342 |
gridBagConstraints.gridy = 10;
|
|
343 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
344 |
gridBagConstraints.weightx = 1.0;
|
|
345 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
346 |
add(applicationVersionText, gridBagConstraints);
|
|
349 | 347 |
|
350 |
ownerLabel.setText(swingInstallerManager.getText("package_owner"));
|
|
351 |
gridBagConstraints = new GridBagConstraints();
|
|
352 |
gridBagConstraints.gridx = 0;
|
|
353 |
gridBagConstraints.gridy = 11;
|
|
354 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
355 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
356 |
add(ownerLabel, gridBagConstraints);
|
|
348 |
ownerLabel.setText(swingInstallerManager.getText("package_owner"));
|
|
349 |
gridBagConstraints = new GridBagConstraints();
|
|
350 |
gridBagConstraints.gridx = 0;
|
|
351 |
gridBagConstraints.gridy = 11;
|
|
352 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
353 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
354 |
add(ownerLabel, gridBagConstraints);
|
|
357 | 355 |
|
358 |
ownerText.setPreferredSize(new Dimension(100, 27));
|
|
359 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
|
360 |
gridBagConstraints.gridx = 1;
|
|
361 |
gridBagConstraints.gridy = 11;
|
|
362 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
363 |
gridBagConstraints.weightx = 1.0;
|
|
364 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
365 |
add(ownerText, gridBagConstraints);
|
|
356 |
ownerText.setPreferredSize(new Dimension(100, 27));
|
|
357 |
gridBagConstraints = new java.awt.GridBagConstraints();
|
|
358 |
gridBagConstraints.gridx = 1;
|
|
359 |
gridBagConstraints.gridy = 11;
|
|
360 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL;
|
|
361 |
gridBagConstraints.weightx = 1.0;
|
|
362 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
363 |
add(ownerText, gridBagConstraints);
|
|
366 | 364 |
|
367 |
sourcesLabel.setText(swingInstallerManager.getText("sources_url"));
|
|
368 |
gridBagConstraints = new GridBagConstraints();
|
|
369 |
gridBagConstraints.gridx = 0;
|
|
370 |
gridBagConstraints.gridy = 12;
|
|
371 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
372 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
373 |
add(sourcesLabel, gridBagConstraints);
|
|
365 |
sourcesLabel.setText(swingInstallerManager.getText("sources_url"));
|
|
366 |
gridBagConstraints = new GridBagConstraints();
|
|
367 |
gridBagConstraints.gridx = 0;
|
|
368 |
gridBagConstraints.gridy = 12;
|
|
369 |
gridBagConstraints.anchor = GridBagConstraints.EAST;
|
|
370 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2);
|
|
371 |
add(sourcesLabel, gridBagConstraints);
|
|
374 | 372 |
|
375 |
sourcesText.setPreferredSize(new Dimension(100, 27)); |
|
376 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
377 |
gridBagConstraints.gridx = 1; |
|
378 |
gridBagConstraints.gridy = 12; |
|
379 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
380 |
gridBagConstraints.weightx = 1.0; |
|
381 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
382 |
add(sourcesText, gridBagConstraints); |
|
383 |
|
|
384 |
dependenciesLabel.setText(swingInstallerManager.getText("dependencies")); |
|
385 |
gridBagConstraints = new GridBagConstraints(); |
|
386 |
gridBagConstraints.gridx = 0; |
|
387 |
gridBagConstraints.gridy = 13; |
|
388 |
gridBagConstraints.anchor = GridBagConstraints.EAST; |
|
389 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
390 |
add(dependenciesLabel, gridBagConstraints); |
|
373 |
sourcesText.setPreferredSize(new Dimension(100, 27)); |
|
374 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
375 |
gridBagConstraints.gridx = 1; |
|
376 |
gridBagConstraints.gridy = 12; |
|
377 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
378 |
gridBagConstraints.weightx = 1.0; |
|
379 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
380 |
add(sourcesText, gridBagConstraints); |
|
391 | 381 |
|
392 |
dependenciesText.setPreferredSize(new Dimension(100, 27)); |
|
393 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
394 |
gridBagConstraints.gridx = 1; |
|
395 |
gridBagConstraints.gridy = 13; |
|
396 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
397 |
gridBagConstraints.weightx = 1.0; |
|
398 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
399 |
add(dependenciesText, gridBagConstraints); |
|
400 |
} |
|
382 |
dependenciesLabel |
|
383 |
.setText(swingInstallerManager.getText("dependencies")); |
|
384 |
gridBagConstraints = new GridBagConstraints(); |
|
385 |
gridBagConstraints.gridx = 0; |
|
386 |
gridBagConstraints.gridy = 13; |
|
387 |
gridBagConstraints.anchor = GridBagConstraints.EAST; |
|
388 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
389 |
add(dependenciesLabel, gridBagConstraints); |
|
401 | 390 |
|
402 |
protected String findCurrentGvSIGVersion() { |
|
403 |
return SwingInstallerLocator.getSwingInstallerManager() |
|
404 |
.getApplicationVersion(); |
|
405 |
} |
|
391 |
dependenciesText.setPreferredSize(new Dimension(100, 27)); |
|
392 |
gridBagConstraints = new java.awt.GridBagConstraints(); |
|
393 |
gridBagConstraints.gridx = 1; |
|
394 |
gridBagConstraints.gridy = 13; |
|
395 |
gridBagConstraints.fill = GridBagConstraints.HORIZONTAL; |
|
396 |
gridBagConstraints.weightx = 1.0; |
|
397 |
gridBagConstraints.insets = new Insets(2, 2, 2, 2); |
|
398 |
add(dependenciesText, gridBagConstraints); |
|
399 |
} |
|
406 | 400 |
|
407 |
/** |
|
408 |
* @return the build |
|
409 |
*/ |
|
410 |
public Integer getBuild() { |
|
411 |
try { |
|
412 |
return Integer.parseInt(buildText.getText()); |
|
413 |
} catch (Exception e) { |
|
414 |
return 0; |
|
415 |
} |
|
416 |
} |
|
401 |
protected String findCurrentGvSIGVersion() { |
|
402 |
return SwingInstallerLocator.getSwingInstallerManager() |
|
403 |
.getApplicationVersion(); |
|
404 |
} |
|
417 | 405 |
|
418 |
/** |
|
419 |
* @param build |
|
420 |
* the build to set |
|
421 |
*/ |
|
422 |
public void setBuildText(Integer build) { |
|
423 |
this.buildText.setText(build.toString()); |
|
424 |
} |
|
406 |
/** |
|
407 |
* @return the build |
|
408 |
*/ |
|
409 |
public Integer getBuild() { |
|
410 |
try { |
|
411 |
return Integer.parseInt(buildText.getText()); |
|
412 |
} catch (Exception e) { |
|
413 |
return 0; |
|
414 |
} |
|
415 |
} |
|
425 | 416 |
|
426 |
/** |
|
427 |
* @return the code |
|
428 |
*/ |
|
429 |
public String getCode() { |
|
430 |
return codeText.getText(); |
|
431 |
} |
|
417 |
/** |
|
418 |
* @param build |
|
419 |
* the build to set |
|
420 |
*/ |
|
421 |
public void setBuildText(Integer build) { |
|
422 |
this.buildText.setText(build.toString()); |
|
423 |
} |
|
432 | 424 |
|
433 |
/** |
|
434 |
* @param code |
|
435 |
* the codeText to set |
|
436 |
*/ |
|
437 |
public void setCode(String code) { |
|
438 |
this.codeText.setText(code); |
|
439 |
} |
|
425 |
/** |
|
426 |
* @return the code |
|
427 |
*/ |
|
428 |
public String getCode() { |
|
429 |
return codeText.getText(); |
|
430 |
} |
|
440 | 431 |
|
441 |
/**
|
|
442 |
* @return the naem
|
|
443 |
*/
|
|
444 |
@Override
|
|
445 |
public String getName() {
|
|
446 |
return nameText.getText();
|
|
447 |
}
|
|
432 |
/**
|
|
433 |
* @param code
|
|
434 |
* the codeText to set
|
|
435 |
*/
|
|
436 |
public void setCode(String code) {
|
|
437 |
this.codeText.setText(code);
|
|
438 |
}
|
|
448 | 439 |
|
449 |
/** |
|
450 |
* @param naem |
|
451 |
* the naem to set |
|
452 |
*/ |
|
453 |
@Override |
|
454 |
public void setName(String name) { |
|
455 |
this.nameText.setText(name); |
|
456 |
} |
|
440 |
/** |
|
441 |
* @return the naem |
|
442 |
*/ |
|
443 |
@Override |
|
444 |
public String getName() { |
|
445 |
return nameText.getText(); |
|
446 |
} |
|
457 | 447 |
|
458 |
/** |
|
459 |
* @return the offcicial |
|
460 |
*/ |
|
461 |
public boolean isOfficial() { |
|
462 |
return officialCheckBox.isSelected(); |
|
463 |
} |
|
448 |
/** |
|
449 |
* @param naem |
|
450 |
* the naem to set |
|
451 |
*/ |
|
452 |
@Override |
|
453 |
public void setName(String name) { |
|
454 |
this.nameText.setText(name); |
|
455 |
} |
|
464 | 456 |
|
465 |
/** |
|
466 |
* @param offcicial |
|
467 |
* the offcicial to set |
|
468 |
*/ |
|
469 |
public void setOfficial(boolean isOfficial) { |
|
470 |
this.officialCheckBox.setSelected(isOfficial); |
|
471 |
} |
|
457 |
/** |
|
458 |
* @return the offcicial |
|
459 |
*/ |
|
460 |
public boolean isOfficial() { |
|
461 |
return officialCheckBox.isSelected(); |
|
462 |
} |
|
472 | 463 |
|
473 |
/** |
|
474 |
* @return the status |
|
475 |
*/ |
|
476 |
public String getState() { |
|
477 |
return (String) statusCombo.getSelectedItem(); |
|
478 |
} |
|
464 |
/** |
|
465 |
* @param offcicial |
|
466 |
* the offcicial to set |
|
467 |
*/ |
|
468 |
public void setOfficial(boolean isOfficial) { |
|
469 |
this.officialCheckBox.setSelected(isOfficial); |
|
470 |
} |
|
479 | 471 |
|
480 |
/** |
|
481 |
* @param status |
|
482 |
* the status to set |
|
483 |
*/ |
|
484 |
public void setState(String state) { |
|
485 |
this.statusCombo.setSelectedItem(state); |
|
486 |
} |
|
472 |
/** |
|
473 |
* @return the status |
|
474 |
*/ |
|
475 |
public String getState() { |
|
476 |
return (String) statusCombo.getSelectedItem(); |
|
477 |
} |
|
487 | 478 |
|
488 |
/** |
|
489 |
* @return the version |
|
490 |
*/ |
|
491 |
public String getVersion() { |
|
492 |
return versionText.getText(); |
|
493 |
} |
|
479 |
/** |
|
480 |
* @param status |
|
481 |
* the status to set |
|
482 |
*/ |
|
483 |
public void setState(String state) { |
|
484 |
this.statusCombo.setSelectedItem(state); |
|
485 |
} |
|
494 | 486 |
|
495 |
/** |
|
496 |
* @param version |
|
497 |
* the version to set |
|
498 |
*/ |
|
499 |
public void setVersion(String version) { |
|
500 |
this.versionText.setText(version); |
|
501 |
} |
|
487 |
/** |
|
488 |
* @return the version |
|
489 |
*/ |
|
490 |
public String getVersion() { |
|
491 |
return versionText.getText(); |
|
492 |
} |
|
502 | 493 |
|
503 |
/** |
|
504 |
* @return the descriptionArea |
|
505 |
*/ |
|
506 |
public String getDescription() { |
|
507 |
return descriptionArea.getText(); |
|
508 |
} |
|
494 |
/** |
|
495 |
* @param version |
|
496 |
* the version to set |
|
497 |
*/ |
|
498 |
public void setVersion(String version) { |
|
499 |
this.versionText.setText(version); |
|
500 |
} |
|
509 | 501 |
|
510 |
/** |
|
511 |
* @param descriptionArea |
|
512 |
* the descriptionArea to set |
|
513 |
*/ |
|
514 |
public void setDescription(String description) { |
|
515 |
this.descriptionArea.setText(description); |
|
516 |
} |
|
502 |
/** |
|
503 |
* @return the descriptionArea |
|
504 |
*/ |
|
505 |
public String getDescription() { |
|
506 |
return descriptionArea.getText(); |
|
507 |
} |
|
517 | 508 |
|
518 |
public String getOperatingSystem() { |
|
519 |
return (String) this.operatingSystemCombo.getSelectedItem(); |
|
520 |
} |
|
509 |
/** |
|
510 |
* @param descriptionArea |
|
511 |
* the descriptionArea to set |
|
512 |
*/ |
|
513 |
public void setDescription(String description) { |
|
514 |
this.descriptionArea.setText(description); |
|
515 |
} |
|
521 | 516 |
|
522 |
public void setOperatingSystem(String operatingSystem) {
|
|
523 |
this.operatingSystemCombo.setSelectedItem(operatingSystem);
|
|
524 |
}
|
|
517 |
public String getOperatingSystem() {
|
|
518 |
return (String) this.operatingSystemCombo.getSelectedItem();
|
|
519 |
}
|
|
525 | 520 |
|
526 |
public String getArchitecture() {
|
|
527 |
return (String) this.architectureCombo.getSelectedItem();
|
|
528 |
}
|
|
521 |
public void setOperatingSystem(String operatingSystem) {
|
|
522 |
this.operatingSystemCombo.setSelectedItem(operatingSystem);
|
|
523 |
}
|
|
529 | 524 |
|
530 |
public void setArchitecture(String architecture) {
|
|
531 |
this.architectureCombo.setSelectedItem(architecture);
|
|
532 |
}
|
|
525 |
public String getArchitecture() {
|
|
526 |
return (String) this.architectureCombo.getSelectedItem();
|
|
527 |
}
|
|
533 | 528 |
|
534 |
public String getJavaVM() {
|
|
535 |
return (String) this.javaVMCombo.getSelectedItem();
|
|
536 |
}
|
|
529 |
public void setArchitecture(String architecture) {
|
|
530 |
this.architectureCombo.setSelectedItem(architecture);
|
|
531 |
}
|
|
537 | 532 |
|
538 |
public void setJavaVM(String javaVM) {
|
|
539 |
this.javaVMCombo.setSelectedItem(javaVM);
|
|
540 |
}
|
|
533 |
public String getJavaVM() {
|
|
534 |
return (String) this.javaVMCombo.getSelectedItem();
|
|
535 |
}
|
|
541 | 536 |
|
542 |
public String getGvSIGVersion() {
|
|
543 |
return this.applicationVersionText.getText();
|
|
544 |
}
|
|
537 |
public void setJavaVM(String javaVM) {
|
|
538 |
this.javaVMCombo.setSelectedItem(javaVM);
|
|
539 |
}
|
|
545 | 540 |
|
546 |
public void setGvSIGVersion(String gvSIGVersion) {
|
|
547 |
this.applicationVersionText.setText(gvSIGVersion);
|
|
548 |
}
|
|
541 |
public String getGvSIGVersion() {
|
|
542 |
return this.applicationVersionText.getText();
|
|
543 |
}
|
|
549 | 544 |
|
550 |
public void setOwner(String owner) {
|
|
551 |
this.ownerText.setText(owner);
|
|
552 |
}
|
|
545 |
public void setGvSIGVersion(String gvSIGVersion) {
|
|
546 |
this.applicationVersionText.setText(gvSIGVersion);
|
|
547 |
}
|
|
553 | 548 |
|
554 |
public String getOwner() {
|
|
555 |
return this.ownerText.getText();
|
|
556 |
}
|
|
549 |
public void setOwner(String owner) {
|
|
550 |
this.ownerText.setText(owner);
|
|
551 |
}
|
|
557 | 552 |
|
558 |
public void setSources(String sources) {
|
|
559 |
this.sourcesText.setText(sources);
|
|
560 |
}
|
|
553 |
public String getOwner() {
|
|
554 |
return this.ownerText.getText();
|
|
555 |
}
|
|
561 | 556 |
|
562 |
public URL getSources() throws MalformedURLException { |
|
563 |
String str = this.sourcesText.getText(); |
|
564 |
str = str.trim(); |
|
565 |
if (str.equals("")) { |
|
566 |
return null; |
|
567 |
} |
|
568 |
return new URL(str); |
|
569 |
} |
|
570 |
|
|
571 |
public void setDependencies(String dependencies) { |
|
572 |
this.dependenciesText.setText(dependencies); |
|
573 |
} |
|
557 |
public void setSources(String sources) { |
|
558 |
this.sourcesText.setText(sources); |
|
559 |
} |
|
574 | 560 |
|
575 |
public String getDependencies() { |
|
576 |
return this.dependenciesText.getText(); |
|
577 |
} |
|
561 |
public URL getSources() throws MalformedURLException { |
|
562 |
String str = this.sourcesText.getText(); |
|
563 |
str = str.trim(); |
|
564 |
if (str.equals("")) { |
|
565 |
return null; |
|
566 |
} |
|
567 |
return new URL(str); |
|
568 |
} |
|
578 | 569 |
|
579 |
public boolean validatePanel() { |
|
580 |
try { |
|
581 |
getSources(); |
|
582 |
} catch (MalformedURLException e) { |
|
583 |
JOptionPane.showMessageDialog(null, "_the_package_source_files_url_is_malformed._Please_review_it.", |
|
584 |
"_Malformed_URL", JOptionPane.OK_OPTION |
|
585 |
+ JOptionPane.WARNING_MESSAGE); |
|
586 |
return false; |
|
587 |
} |
|
588 |
return true; |
|
589 |
} |
|
590 |
|
|
591 |
public void panelToPackageInfo(PackageInfo packageInfo) { |
|
592 |
packageInfo.setCode(getCode()); |
|
593 |
packageInfo.setName(getName()); |
|
594 |
packageInfo.setDescription(getDescription()); |
|
595 |
packageInfo.setVersion(getVersion()); |
|
596 |
packageInfo.setBuild(getBuild()); |
|
597 |
packageInfo.setState(getState()); |
|
598 |
packageInfo.setOfficial(isOfficial()); |
|
599 |
packageInfo.setOperatingSystem(getOperatingSystem()); |
|
600 |
packageInfo.setArchitecture(getArchitecture()); |
|
601 |
packageInfo.setJavaVM(getJavaVM()); |
|
602 |
packageInfo.setGvSIGVersion(getGvSIGVersion()); |
|
603 |
try { |
|
604 |
packageInfo.setSourcesURL(getSources()); |
|
605 |
} catch (MalformedURLException e) { |
|
606 |
throw new RuntimeException(e); |
|
607 |
} |
|
608 |
packageInfo.setOwner(getOwner()); |
|
609 |
packageInfo.setDependencies(getDependencies()); |
|
610 |
} |
|
570 |
public void setDependencies(String dependencies) { |
|
571 |
this.dependenciesText.setText(dependencies); |
|
572 |
} |
|
611 | 573 |
|
612 |
public void packageInfoToPanel(PackageInfo packageInfo) { |
|
613 |
setCode(packageInfo.getCode()); |
|
614 |
setName(packageInfo.getName()); |
|
615 |
setVersion(packageInfo.getVersion().toString()); |
|
616 |
setBuildText(packageInfo.getBuild()); |
|
617 |
setOfficial(packageInfo.isOfficial()); |
|
618 |
setState(packageInfo.getState()); |
|
619 |
setDescription(packageInfo.getDescription()); |
|
620 |
setOperatingSystem(packageInfo.getOperatingSystem()); |
|
621 |
setArchitecture(packageInfo.getArchitecture()); |
|
622 |
setJavaVM(packageInfo.getJavaVM()); |
|
623 |
String version = packageInfo.getGvSIGVersion(); |
|
624 |
if ((version == null) || version.equals("")) { |
|
625 |
setGvSIGVersion(findCurrentGvSIGVersion()); |
|
626 |
} else { |
|
627 |
setGvSIGVersion(packageInfo.getGvSIGVersion()); |
|
628 |
} |
|
629 |
if (packageInfo.getSourcesURL() == null) { |
|
630 |
setSources(""); |
|
631 |
} else { |
|
632 |
setSources(packageInfo.getSourcesURL().toString()); |
|
633 |
} |
|
634 |
if (packageInfo.getOwner() == null ) { |
|
635 |
setOwner(""); |
|
636 |
} else { |
|
637 |
setOwner(packageInfo.getOwner()); |
|
638 |
} |
|
639 |
if (packageInfo.getDependencies() == null ) { |
|
640 |
setDependencies(""); |
|
641 |
} else { |
|
642 |
setDependencies(packageInfo.getDependencies().toString()); |
|
643 |
} |
|
574 |
public String getDependencies() { |
|
575 |
return this.dependenciesText.getText(); |
|
576 |
} |
|
644 | 577 |
|
578 |
@Override |
|
579 |
public boolean validatePanel() { |
|
580 |
try { |
|
581 |
getSources(); |
|
582 |
} catch (MalformedURLException e) { |
|
583 |
JOptionPane |
|
584 |
.showMessageDialog( |
|
585 |
null, |
|
586 |
"_the_package_source_files_url_is_malformed._Please_review_it.", |
|
587 |
"_Malformed_URL", JOptionPane.OK_OPTION |
|
588 |
+ JOptionPane.WARNING_MESSAGE); |
|
589 |
return false; |
|
590 |
} |
|
591 |
return true; |
|
592 |
} |
|
645 | 593 |
|
646 |
} |
|
594 |
@Override |
|
595 |
public void panelToPackageInfo(PackageInfo packageInfo) { |
|
596 |
packageInfo.setCode(getCode()); |
|
597 |
packageInfo.setName(getName()); |
|
598 |
packageInfo.setDescription(getDescription()); |
|
599 |
packageInfo.setVersion(getVersion()); |
|
600 |
packageInfo.setBuild(getBuild()); |
|
601 |
packageInfo.setState(getState()); |
|
602 |
packageInfo.setOfficial(isOfficial()); |
|
603 |
packageInfo.setOperatingSystem(getOperatingSystem()); |
|
604 |
packageInfo.setArchitecture(getArchitecture()); |
|
605 |
packageInfo.setJavaVM(getJavaVM()); |
|
606 |
packageInfo.setGvSIGVersion(getGvSIGVersion()); |
|
607 |
try { |
|
608 |
packageInfo.setSourcesURL(getSources()); |
|
609 |
} catch (MalformedURLException e) { |
|
610 |
throw new RuntimeException(e); |
|
611 |
} |
|
612 |
packageInfo.setOwner(getOwner()); |
|
613 |
packageInfo.setDependencies(getDependencies()); |
|
614 |
} |
|
615 |
|
|
616 |
@Override |
|
617 |
public void packageInfoToPanel(PackageInfo packageInfo) { |
|
618 |
setCode(packageInfo.getCode()); |
|
619 |
setName(packageInfo.getName()); |
|
620 |
setVersion(packageInfo.getVersion().toString()); |
|
621 |
setBuildText(packageInfo.getBuild()); |
|
622 |
setOfficial(packageInfo.isOfficial()); |
|
623 |
setState(packageInfo.getState()); |
|
624 |
setDescription(packageInfo.getDescription()); |
|
625 |
setOperatingSystem(packageInfo.getOperatingSystem()); |
|
626 |
setArchitecture(packageInfo.getArchitecture()); |
|
627 |
setJavaVM(packageInfo.getJavaVM()); |
|
628 |
String version = packageInfo.getGvSIGVersion(); |
|
629 |
if ((version == null) || version.equals("")) { |
|
630 |
setGvSIGVersion(findCurrentGvSIGVersion()); |
|
631 |
} else { |
|
632 |
setGvSIGVersion(packageInfo.getGvSIGVersion()); |
|
633 |
} |
|
634 |
if (packageInfo.getSourcesURL() == null) { |
|
635 |
setSources(""); |
|
636 |
} else { |
|
637 |
setSources(packageInfo.getSourcesURL().toString()); |
|
638 |
} |
|
639 |
if (packageInfo.getOwner() == null) { |
|
640 |
setOwner(""); |
|
641 |
} else { |
|
642 |
setOwner(packageInfo.getOwner()); |
|
643 |
} |
|
644 |
if (packageInfo.getDependencies() == null) { |
|
645 |
setDependencies(""); |
|
646 |
} else { |
|
647 |
setDependencies(packageInfo.getDependencies().toString()); |
|
648 |
} |
|
649 |
|
|
650 |
} |
|
647 | 651 |
} |
Also available in: Unified diff