source: release-kits/shared/launch4j/src/net/sf/launch4j/form/ConfigForm.java@ 15024

Last change on this file since 15024 was 15024, checked in by oranfry, 16 years ago

putting launch4j in the shared area

File size: 28.0 KB
Line 
1package net.sf.launch4j.form;
2
3import com.jeta.forms.components.separator.TitledSeparator;
4import com.jgoodies.forms.layout.CellConstraints;
5import com.jgoodies.forms.layout.FormLayout;
6import java.awt.BorderLayout;
7import java.awt.Container;
8import java.awt.Dimension;
9import javax.swing.Box;
10import javax.swing.ButtonGroup;
11import javax.swing.ImageIcon;
12import javax.swing.JButton;
13import javax.swing.JCheckBox;
14import javax.swing.JLabel;
15import javax.swing.JPanel;
16import javax.swing.JRadioButton;
17import javax.swing.JScrollPane;
18import javax.swing.JTabbedPane;
19import javax.swing.JTextArea;
20import javax.swing.JTextField;
21
22
23public abstract class ConfigForm extends JPanel
24{
25 protected final JTabbedPane _tab = new JTabbedPane();
26 protected final JButton _outfileButton = new JButton();
27 protected final JLabel _outfileLabel = new JLabel();
28 protected final JLabel _errorTitleLabel = new JLabel();
29 protected final JTextField _outfileField = new JTextField();
30 protected final JTextField _errorTitleField = new JTextField();
31 protected final JCheckBox _customProcNameCheck = new JCheckBox();
32 protected final JCheckBox _stayAliveCheck = new JCheckBox();
33 protected final JLabel _iconLabel = new JLabel();
34 protected final JTextField _iconField = new JTextField();
35 protected final JTextField _jarField = new JTextField();
36 protected final JLabel _jarLabel = new JLabel();
37 protected final JButton _jarButton = new JButton();
38 protected final JButton _iconButton = new JButton();
39 protected final JLabel _jarArgsLabel = new JLabel();
40 protected final JTextField _jarArgsField = new JTextField();
41 protected final JLabel _optionsLabel = new JLabel();
42 protected final JLabel _chdirLabel = new JLabel();
43 protected final JTextField _chdirField = new JTextField();
44 protected final JCheckBox _dontWrapJarCheck = new JCheckBox();
45 protected final JLabel _headerTypeLabel = new JLabel();
46 protected final JRadioButton _guiHeaderRadio = new JRadioButton();
47 protected final ButtonGroup _headerButtonGroup = new ButtonGroup();
48 protected final JRadioButton _consoleHeaderRadio = new JRadioButton();
49 protected final JTextArea _headerObjectsTextArea = new JTextArea();
50 protected final JTextArea _libsTextArea = new JTextArea();
51 protected final JCheckBox _headerObjectsCheck = new JCheckBox();
52 protected final JCheckBox _libsCheck = new JCheckBox();
53 protected final TitledSeparator _linkerOptionsSeparator = new TitledSeparator();
54 protected final JLabel _jrePathLabel = new JLabel();
55 protected final JLabel _jreMinLabel = new JLabel();
56 protected final JLabel _jreMaxLabel = new JLabel();
57 protected final JLabel _jvmArgsTextLabel = new JLabel();
58 protected final JTextField _jrePathField = new JTextField();
59 protected final JTextField _jreMinField = new JTextField();
60 protected final JTextField _jreMaxField = new JTextField();
61 protected final JTextArea _jvmArgsTextArea = new JTextArea();
62 protected final JLabel _initialHeapSizeLabel = new JLabel();
63 protected final JLabel _maxHeapSizeLabel = new JLabel();
64 protected final JTextField _initialHeapSizeField = new JTextField();
65 protected final JTextField _maxHeapSizeField = new JTextField();
66 protected final JRadioButton _otherVarRadio = new JRadioButton();
67 protected final ButtonGroup _buttongroup1 = new ButtonGroup();
68 protected final JTextField _otherVarField = new JTextField();
69 protected final JButton _addVarButton = new JButton();
70 protected final JRadioButton _exeDirRadio = new JRadioButton();
71 protected final JRadioButton _exeFileRadio = new JRadioButton();
72 protected final JLabel _addVarsLabel = new JLabel();
73 protected final JLabel _splashFileLabel = new JLabel();
74 protected final JLabel _waitForWindowLabel = new JLabel();
75 protected final JLabel _timeoutLabel = new JLabel();
76 protected final JCheckBox _timeoutErrCheck = new JCheckBox();
77 protected final JTextField _splashFileField = new JTextField();
78 protected final JTextField _timeoutField = new JTextField();
79 protected final JButton _splashFileButton = new JButton();
80 protected final JCheckBox _splashCheck = new JCheckBox();
81 protected final JCheckBox _waitForWindowCheck = new JCheckBox();
82 protected final JCheckBox _versionInfoCheck = new JCheckBox();
83 protected final JLabel _fileVersionLabel = new JLabel();
84 protected final JTextField _fileVersionField = new JTextField();
85 protected final TitledSeparator _addVersionInfoSeparator = new TitledSeparator();
86 protected final JLabel _productVersionLabel = new JLabel();
87 protected final JTextField _productVersionField = new JTextField();
88 protected final JLabel _fileDescriptionLabel = new JLabel();
89 protected final JTextField _fileDescriptionField = new JTextField();
90 protected final JLabel _copyrightLabel = new JLabel();
91 protected final JTextField _copyrightField = new JTextField();
92 protected final JLabel _txtFileVersionLabel = new JLabel();
93 protected final JTextField _txtFileVersionField = new JTextField();
94 protected final JLabel _txtProductVersionLabel = new JLabel();
95 protected final JTextField _txtProductVersionField = new JTextField();
96 protected final JLabel _productNameLabel = new JLabel();
97 protected final JTextField _productNameField = new JTextField();
98 protected final JLabel _originalFilenameLabel = new JLabel();
99 protected final JTextField _originalFilenameField = new JTextField();
100 protected final JLabel _internalNameLabel = new JLabel();
101 protected final JTextField _internalNameField = new JTextField();
102 protected final JLabel _companyNameLabel = new JLabel();
103 protected final JTextField _companyNameField = new JTextField();
104 protected final JTextArea _logTextArea = new JTextArea();
105 protected final TitledSeparator _logSeparator = new TitledSeparator();
106
107 /**
108 * Default constructor
109 */
110 public ConfigForm()
111 {
112 initializePanel();
113 }
114
115 /**
116 * Adds fill components to empty cells in the first row and first column of the grid.
117 * This ensures that the grid spacing will be the same as shown in the designer.
118 * @param cols an array of column indices in the first row where fill components should be added.
119 * @param rows an array of row indices in the first column where fill components should be added.
120 */
121 void addFillComponents( Container panel, int[] cols, int[] rows )
122 {
123 Dimension filler = new Dimension(10,10);
124
125 boolean filled_cell_11 = false;
126 CellConstraints cc = new CellConstraints();
127 if ( cols.length > 0 && rows.length > 0 )
128 {
129 if ( cols[0] == 1 && rows[0] == 1 )
130 {
131 /** add a rigid area */
132 panel.add( Box.createRigidArea( filler ), cc.xy(1,1) );
133 filled_cell_11 = true;
134 }
135 }
136
137 for( int index = 0; index < cols.length; index++ )
138 {
139 if ( cols[index] == 1 && filled_cell_11 )
140 {
141 continue;
142 }
143 panel.add( Box.createRigidArea( filler ), cc.xy(cols[index],1) );
144 }
145
146 for( int index = 0; index < rows.length; index++ )
147 {
148 if ( rows[index] == 1 && filled_cell_11 )
149 {
150 continue;
151 }
152 panel.add( Box.createRigidArea( filler ), cc.xy(1,rows[index]) );
153 }
154
155 }
156
157 /**
158 * Helper method to load an image file from the CLASSPATH
159 * @param imageName the package and name of the file to load relative to the CLASSPATH
160 * @return an ImageIcon instance with the specified image file
161 * @throws IllegalArgumentException if the image resource cannot be loaded.
162 */
163 public ImageIcon loadImage( String imageName )
164 {
165 try
166 {
167 ClassLoader classloader = getClass().getClassLoader();
168 java.net.URL url = classloader.getResource( imageName );
169 if ( url != null )
170 {
171 ImageIcon icon = new ImageIcon( url );
172 return icon;
173 }
174 }
175 catch( Exception e )
176 {
177 e.printStackTrace();
178 }
179 throw new IllegalArgumentException( "Unable to load image: " + imageName );
180 }
181
182 public JPanel createPanel()
183 {
184 JPanel jpanel1 = new JPanel();
185 FormLayout formlayout1 = new FormLayout("FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE","CENTER:3DLU:NONE,FILL:DEFAULT:NONE,CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE");
186 CellConstraints cc = new CellConstraints();
187 jpanel1.setLayout(formlayout1);
188
189 _tab.setName("tab");
190 _tab.addTab("Basic",null,createPanel1());
191 _tab.addTab("Header",null,createPanel2());
192 _tab.addTab("JRE",null,createPanel3());
193 _tab.addTab("Splash",null,createPanel5());
194 _tab.addTab("Version Info",null,createPanel6());
195 jpanel1.add(_tab,cc.xy(2,2));
196
197 _logTextArea.setName("logTextArea");
198 JScrollPane jscrollpane1 = new JScrollPane();
199 jscrollpane1.setViewportView(_logTextArea);
200 jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
201 jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
202 jpanel1.add(jscrollpane1,cc.xy(2,6));
203
204 _logSeparator.setName("logSeparator");
205 _logSeparator.setText("Log");
206 jpanel1.add(_logSeparator,cc.xy(2,4));
207
208 addFillComponents(jpanel1,new int[]{ 1,2,3 },new int[]{ 1,2,3,4,5,6,7 });
209 return jpanel1;
210 }
211
212 public JPanel createPanel1()
213 {
214 JPanel jpanel1 = new JPanel();
215 FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE,FILL:26PX:NONE,FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
216 CellConstraints cc = new CellConstraints();
217 jpanel1.setLayout(formlayout1);
218
219 _outfileButton.setIcon(loadImage("images/open16.png"));
220 _outfileButton.setName("outfileButton");
221 jpanel1.add(_outfileButton,cc.xy(6,2));
222
223 _outfileLabel.setName("outfileLabel");
224 _outfileLabel.setText("<html><b>Output file</b></html>");
225 jpanel1.add(_outfileLabel,cc.xy(2,2));
226
227 _errorTitleLabel.setName("errorTitleLabel");
228 _errorTitleLabel.setText("Error title");
229 jpanel1.add(_errorTitleLabel,cc.xy(2,14));
230
231 _outfileField.setName("outfileField");
232 _outfileField.setToolTipText("Output executable file.");
233 jpanel1.add(_outfileField,cc.xy(4,2));
234
235 _errorTitleField.setName("errorTitleField");
236 _errorTitleField.setToolTipText("Launch4j signals errors using a message box, you can set it's title to the application's name.");
237 jpanel1.add(_errorTitleField,cc.xy(4,14));
238
239 _customProcNameCheck.setActionCommand("Custom process name");
240 _customProcNameCheck.setName("customProcNameCheck");
241 _customProcNameCheck.setText("Custom process name");
242 jpanel1.add(_customProcNameCheck,cc.xy(4,16));
243
244 _stayAliveCheck.setActionCommand("Stay alive after launching a GUI application");
245 _stayAliveCheck.setName("stayAliveCheck");
246 _stayAliveCheck.setText("Stay alive after launching a GUI application");
247 jpanel1.add(_stayAliveCheck,cc.xy(4,18));
248
249 _iconLabel.setName("iconLabel");
250 _iconLabel.setText("Icon");
251 jpanel1.add(_iconLabel,cc.xy(2,8));
252
253 _iconField.setName("iconField");
254 _iconField.setToolTipText("Application icon.");
255 jpanel1.add(_iconField,cc.xy(4,8));
256
257 _jarField.setName("jarField");
258 _jarField.setToolTipText("Application jar.");
259 jpanel1.add(_jarField,cc.xy(4,4));
260
261 _jarLabel.setName("jarLabel");
262 _jarLabel.setText("<html><b>Jar</b></html>");
263 jpanel1.add(_jarLabel,cc.xy(2,4));
264
265 _jarButton.setIcon(loadImage("images/open16.png"));
266 _jarButton.setName("jarButton");
267 jpanel1.add(_jarButton,cc.xy(6,4));
268
269 _iconButton.setIcon(loadImage("images/open16.png"));
270 _iconButton.setName("iconButton");
271 jpanel1.add(_iconButton,cc.xy(6,8));
272
273 _jarArgsLabel.setName("jarArgsLabel");
274 _jarArgsLabel.setText("Jar arguments");
275 jpanel1.add(_jarArgsLabel,cc.xy(2,12));
276
277 _jarArgsField.setName("jarArgsField");
278 _jarArgsField.setToolTipText("Constant command line arguments passed to the application.");
279 jpanel1.add(_jarArgsField,cc.xy(4,12));
280
281 _optionsLabel.setName("optionsLabel");
282 _optionsLabel.setText("Options");
283 jpanel1.add(_optionsLabel,cc.xy(2,16));
284
285 _chdirLabel.setName("chdirLabel");
286 _chdirLabel.setText("Change dir");
287 jpanel1.add(_chdirLabel,cc.xy(2,10));
288
289 _chdirField.setName("chdirField");
290 _chdirField.setToolTipText("Change current directory to a location relative to the executable. Empty field has no effect, . - changes directory to the exe location.");
291 jpanel1.add(_chdirField,cc.xy(4,10));
292
293 _dontWrapJarCheck.setActionCommand("Don't wrap the jar, launch it only");
294 _dontWrapJarCheck.setName("dontWrapJarCheck");
295 _dontWrapJarCheck.setText("Don't wrap the jar, launch only");
296 jpanel1.add(_dontWrapJarCheck,cc.xy(4,6));
297
298 addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19 });
299 return jpanel1;
300 }
301
302 public JPanel createPanel2()
303 {
304 JPanel jpanel1 = new JPanel();
305 FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:7DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:DEFAULT:GROW(0.2),CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:9DLU:NONE");
306 CellConstraints cc = new CellConstraints();
307 jpanel1.setLayout(formlayout1);
308
309 _headerTypeLabel.setName("headerTypeLabel");
310 _headerTypeLabel.setText("Header type");
311 jpanel1.add(_headerTypeLabel,cc.xy(2,2));
312
313 _guiHeaderRadio.setActionCommand("GUI");
314 _guiHeaderRadio.setName("guiHeaderRadio");
315 _guiHeaderRadio.setText("GUI");
316 _headerButtonGroup.add(_guiHeaderRadio);
317 jpanel1.add(_guiHeaderRadio,cc.xy(4,2));
318
319 _consoleHeaderRadio.setActionCommand("Console");
320 _consoleHeaderRadio.setName("consoleHeaderRadio");
321 _consoleHeaderRadio.setText("Console");
322 _headerButtonGroup.add(_consoleHeaderRadio);
323 jpanel1.add(_consoleHeaderRadio,cc.xy(6,2));
324
325 _headerObjectsTextArea.setName("headerObjectsTextArea");
326 JScrollPane jscrollpane1 = new JScrollPane();
327 jscrollpane1.setViewportView(_headerObjectsTextArea);
328 jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
329 jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
330 jpanel1.add(jscrollpane1,cc.xywh(4,6,4,1));
331
332 _libsTextArea.setName("libsTextArea");
333 JScrollPane jscrollpane2 = new JScrollPane();
334 jscrollpane2.setViewportView(_libsTextArea);
335 jscrollpane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
336 jscrollpane2.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
337 jpanel1.add(jscrollpane2,cc.xywh(4,8,4,1));
338
339 _headerObjectsCheck.setActionCommand("Object files");
340 _headerObjectsCheck.setName("headerObjectsCheck");
341 _headerObjectsCheck.setText("Object files");
342 jpanel1.add(_headerObjectsCheck,new CellConstraints(2,6,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
343
344 _libsCheck.setActionCommand("w32api");
345 _libsCheck.setName("libsCheck");
346 _libsCheck.setText("w32api");
347 jpanel1.add(_libsCheck,new CellConstraints(2,8,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
348
349 _linkerOptionsSeparator.setName("linkerOptionsSeparator");
350 _linkerOptionsSeparator.setText("Custom header - linker options");
351 jpanel1.add(_linkerOptionsSeparator,cc.xywh(2,4,6,1));
352
353 addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8 },new int[]{ 1,2,3,4,5,6,7,8,9 });
354 return jpanel1;
355 }
356
357 public JPanel createPanel3()
358 {
359 JPanel jpanel1 = new JPanel();
360 FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:60DLU:NONE,FILL:3DLU:NONE,FILL:DEFAULT:NONE,FILL:DEFAULT:GROW(1.0),FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,FILL:DEFAULT:GROW(1.0),CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
361 CellConstraints cc = new CellConstraints();
362 jpanel1.setLayout(formlayout1);
363
364 _jrePathLabel.setName("jrePathLabel");
365 _jrePathLabel.setText("<html><b>Emb. JRE path</b></html>");
366 jpanel1.add(_jrePathLabel,cc.xy(2,2));
367
368 _jreMinLabel.setName("jreMinLabel");
369 _jreMinLabel.setText("<html><b>Min JRE version</b></html>");
370 jpanel1.add(_jreMinLabel,cc.xy(2,4));
371
372 _jreMaxLabel.setName("jreMaxLabel");
373 _jreMaxLabel.setText("Max JRE version");
374 jpanel1.add(_jreMaxLabel,cc.xy(2,6));
375
376 _jvmArgsTextLabel.setName("jvmArgsTextLabel");
377 _jvmArgsTextLabel.setText("JVM arguments");
378 jpanel1.add(_jvmArgsTextLabel,new CellConstraints(2,12,1,1,CellConstraints.DEFAULT,CellConstraints.TOP));
379
380 _jrePathField.setName("jrePathField");
381 _jrePathField.setToolTipText("Embedded JRE path relative to the executable.");
382 jpanel1.add(_jrePathField,cc.xywh(4,2,4,1));
383
384 _jreMinField.setName("jreMinField");
385 jpanel1.add(_jreMinField,cc.xy(4,4));
386
387 _jreMaxField.setName("jreMaxField");
388 jpanel1.add(_jreMaxField,cc.xy(4,6));
389
390 _jvmArgsTextArea.setName("jvmArgsTextArea");
391 _jvmArgsTextArea.setToolTipText("Accepts everything you would normally pass to java/javaw launcher: assertion options, system properties and X options.");
392 JScrollPane jscrollpane1 = new JScrollPane();
393 jscrollpane1.setViewportView(_jvmArgsTextArea);
394 jscrollpane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED);
395 jscrollpane1.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);
396 jpanel1.add(jscrollpane1,cc.xywh(4,12,4,1));
397
398 _initialHeapSizeLabel.setName("initialHeapSizeLabel");
399 _initialHeapSizeLabel.setText("Initial heap size");
400 jpanel1.add(_initialHeapSizeLabel,cc.xy(2,8));
401
402 _maxHeapSizeLabel.setName("maxHeapSizeLabel");
403 _maxHeapSizeLabel.setText("Max heap size");
404 jpanel1.add(_maxHeapSizeLabel,cc.xy(2,10));
405
406 JLabel jlabel1 = new JLabel();
407 jlabel1.setText("MB");
408 jpanel1.add(jlabel1,cc.xy(6,8));
409
410 JLabel jlabel2 = new JLabel();
411 jlabel2.setText("MB");
412 jpanel1.add(jlabel2,cc.xy(6,10));
413
414 _initialHeapSizeField.setName("initialHeapSizeField");
415 jpanel1.add(_initialHeapSizeField,cc.xy(4,8));
416
417 _maxHeapSizeField.setName("maxHeapSizeField");
418 jpanel1.add(_maxHeapSizeField,cc.xy(4,10));
419
420 jpanel1.add(createPanel4(),cc.xywh(4,14,4,1));
421 _addVarsLabel.setName("addVarsLabel");
422 _addVarsLabel.setText("Add variables");
423 jpanel1.add(_addVarsLabel,cc.xy(2,14));
424
425 addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 });
426 return jpanel1;
427 }
428
429 public JPanel createPanel4()
430 {
431 JPanel jpanel1 = new JPanel();
432 FormLayout formlayout1 = new FormLayout("FILL:DEFAULT:NONE,FILL:7DLU:NONE,FILL:DEFAULT:NONE,FILL:7DLU:NONE,FILL:DEFAULT:NONE,FILL:3DLU:NONE,FILL:60DLU:GROW(1.0),FILL:3DLU:NONE,FILL:DEFAULT:NONE","CENTER:DEFAULT:NONE");
433 CellConstraints cc = new CellConstraints();
434 jpanel1.setLayout(formlayout1);
435
436 _otherVarRadio.setActionCommand("Other");
437 _otherVarRadio.setName("otherVarRadio");
438 _otherVarRadio.setText("Other");
439 _buttongroup1.add(_otherVarRadio);
440 jpanel1.add(_otherVarRadio,cc.xy(5,1));
441
442 _otherVarField.setName("otherVarField");
443 jpanel1.add(_otherVarField,cc.xy(7,1));
444
445 _addVarButton.setActionCommand("Add");
446 _addVarButton.setIcon(loadImage("images/edit_add16.png"));
447 _addVarButton.setName("addVarButton");
448 _addVarButton.setText("Add");
449 jpanel1.add(_addVarButton,cc.xy(9,1));
450
451 _exeDirRadio.setActionCommand("%EXEPATH%");
452 _exeDirRadio.setName("exeDirRadio");
453 _exeDirRadio.setText("EXEDIR");
454 _buttongroup1.add(_exeDirRadio);
455 jpanel1.add(_exeDirRadio,cc.xy(1,1));
456
457 _exeFileRadio.setActionCommand("%EXEFILE%");
458 _exeFileRadio.setName("exeFileRadio");
459 _exeFileRadio.setText("EXEFILE");
460 _buttongroup1.add(_exeFileRadio);
461 jpanel1.add(_exeFileRadio,cc.xy(3,1));
462
463 addFillComponents(jpanel1,new int[]{ 2,4,6,8 },new int[0]);
464 return jpanel1;
465 }
466
467 public JPanel createPanel5()
468 {
469 JPanel jpanel1 = new JPanel();
470 FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:60DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:3DLU:NONE,FILL:26PX:NONE,FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
471 CellConstraints cc = new CellConstraints();
472 jpanel1.setLayout(formlayout1);
473
474 _splashFileLabel.setName("splashFileLabel");
475 _splashFileLabel.setText("Splash file");
476 jpanel1.add(_splashFileLabel,cc.xy(2,4));
477
478 _waitForWindowLabel.setName("waitForWindowLabel");
479 _waitForWindowLabel.setText("Wait for window");
480 jpanel1.add(_waitForWindowLabel,cc.xy(2,6));
481
482 _timeoutLabel.setName("timeoutLabel");
483 _timeoutLabel.setText("Timeout [s]");
484 jpanel1.add(_timeoutLabel,cc.xy(2,8));
485
486 _timeoutErrCheck.setActionCommand("Signal error on timeout");
487 _timeoutErrCheck.setName("timeoutErrCheck");
488 _timeoutErrCheck.setText("Signal error on timeout");
489 _timeoutErrCheck.setToolTipText("True signals an error on splash timeout, false closes the splash screen quietly.");
490 jpanel1.add(_timeoutErrCheck,cc.xywh(4,10,2,1));
491
492 _splashFileField.setName("splashFileField");
493 _splashFileField.setToolTipText("Splash screen file in BMP format.");
494 jpanel1.add(_splashFileField,cc.xywh(4,4,2,1));
495
496 _timeoutField.setName("timeoutField");
497 _timeoutField.setToolTipText("Number of seconds after which the splash screen must close. Splash timeout may cause an error depending on splashTimeoutErr property.");
498 jpanel1.add(_timeoutField,cc.xy(4,8));
499
500 _splashFileButton.setIcon(loadImage("images/open16.png"));
501 _splashFileButton.setName("splashFileButton");
502 jpanel1.add(_splashFileButton,cc.xy(7,4));
503
504 _splashCheck.setActionCommand("Enable splash screen");
505 _splashCheck.setName("splashCheck");
506 _splashCheck.setText("Enable splash screen");
507 jpanel1.add(_splashCheck,cc.xywh(4,2,2,1));
508
509 _waitForWindowCheck.setActionCommand("Close splash screen when an application window appears");
510 _waitForWindowCheck.setName("waitForWindowCheck");
511 _waitForWindowCheck.setText("Close splash screen when an application window appears");
512 jpanel1.add(_waitForWindowCheck,cc.xywh(4,6,2,1));
513
514 addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11 });
515 return jpanel1;
516 }
517
518 public JPanel createPanel6()
519 {
520 JPanel jpanel1 = new JPanel();
521 FormLayout formlayout1 = new FormLayout("FILL:7DLU:NONE,RIGHT:MAX(65DLU;DEFAULT):NONE,FILL:3DLU:NONE,FILL:60DLU:NONE,FILL:7DLU:NONE,RIGHT:DEFAULT:NONE,FILL:3DLU:NONE,FILL:DEFAULT:GROW(1.0),FILL:7DLU:NONE","CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:3DLU:NONE,CENTER:DEFAULT:NONE,CENTER:9DLU:NONE");
522 CellConstraints cc = new CellConstraints();
523 jpanel1.setLayout(formlayout1);
524
525 _versionInfoCheck.setActionCommand("Add version information");
526 _versionInfoCheck.setName("versionInfoCheck");
527 _versionInfoCheck.setText("Add version information");
528 jpanel1.add(_versionInfoCheck,cc.xywh(4,2,5,1));
529
530 _fileVersionLabel.setName("fileVersionLabel");
531 _fileVersionLabel.setText("File version");
532 jpanel1.add(_fileVersionLabel,cc.xy(2,4));
533
534 _fileVersionField.setName("fileVersionField");
535 _fileVersionField.setToolTipText("Version number 'x.x.x.x'");
536 jpanel1.add(_fileVersionField,cc.xy(4,4));
537
538 _addVersionInfoSeparator.setName("addVersionInfoSeparator");
539 _addVersionInfoSeparator.setText("Additional information");
540 jpanel1.add(_addVersionInfoSeparator,cc.xywh(2,10,7,1));
541
542 _productVersionLabel.setName("productVersionLabel");
543 _productVersionLabel.setText("Product version");
544 jpanel1.add(_productVersionLabel,cc.xy(2,12));
545
546 _productVersionField.setName("productVersionField");
547 _productVersionField.setToolTipText("Version number 'x.x.x.x'");
548 jpanel1.add(_productVersionField,cc.xy(4,12));
549
550 _fileDescriptionLabel.setName("fileDescriptionLabel");
551 _fileDescriptionLabel.setText("File description");
552 jpanel1.add(_fileDescriptionLabel,cc.xy(2,6));
553
554 _fileDescriptionField.setName("fileDescriptionField");
555 _fileDescriptionField.setToolTipText("File description presented to the user.");
556 jpanel1.add(_fileDescriptionField,cc.xywh(4,6,5,1));
557
558 _copyrightLabel.setName("copyrightLabel");
559 _copyrightLabel.setText("Copyright");
560 jpanel1.add(_copyrightLabel,cc.xy(2,8));
561
562 _copyrightField.setName("copyrightField");
563 jpanel1.add(_copyrightField,cc.xywh(4,8,5,1));
564
565 _txtFileVersionLabel.setName("txtFileVersionLabel");
566 _txtFileVersionLabel.setText("Free form");
567 jpanel1.add(_txtFileVersionLabel,cc.xy(6,4));
568
569 _txtFileVersionField.setName("txtFileVersionField");
570 _txtFileVersionField.setToolTipText("Free form file version, for example '1.20.RC1'.");
571 jpanel1.add(_txtFileVersionField,cc.xy(8,4));
572
573 _txtProductVersionLabel.setName("txtProductVersionLabel");
574 _txtProductVersionLabel.setText("Free form");
575 jpanel1.add(_txtProductVersionLabel,cc.xy(6,12));
576
577 _txtProductVersionField.setName("txtProductVersionField");
578 _txtProductVersionField.setToolTipText("Free form product version, for example '1.20.RC1'.");
579 jpanel1.add(_txtProductVersionField,cc.xy(8,12));
580
581 _productNameLabel.setName("productNameLabel");
582 _productNameLabel.setText("Product name");
583 jpanel1.add(_productNameLabel,cc.xy(2,14));
584
585 _productNameField.setName("productNameField");
586 jpanel1.add(_productNameField,cc.xywh(4,14,5,1));
587
588 _originalFilenameLabel.setName("originalFilenameLabel");
589 _originalFilenameLabel.setText("Original filename");
590 jpanel1.add(_originalFilenameLabel,cc.xy(2,20));
591
592 _originalFilenameField.setName("originalFilenameField");
593 _originalFilenameField.setToolTipText("Original name of the file without the path. Allows to determine whether a file has been renamed by a user.");
594 jpanel1.add(_originalFilenameField,cc.xywh(4,20,5,1));
595
596 _internalNameLabel.setName("internalNameLabel");
597 _internalNameLabel.setText("Internal name");
598 jpanel1.add(_internalNameLabel,cc.xy(2,18));
599
600 _internalNameField.setName("internalNameField");
601 _internalNameField.setToolTipText("Internal name without extension, original filename or module name for example.");
602 jpanel1.add(_internalNameField,cc.xywh(4,18,5,1));
603
604 _companyNameLabel.setName("companyNameLabel");
605 _companyNameLabel.setText("Company name");
606 jpanel1.add(_companyNameLabel,cc.xy(2,16));
607
608 _companyNameField.setName("companyNameField");
609 jpanel1.add(_companyNameField,cc.xywh(4,16,5,1));
610
611 addFillComponents(jpanel1,new int[]{ 1,2,3,4,5,6,7,8,9 },new int[]{ 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21 });
612 return jpanel1;
613 }
614
615 /**
616 * Initializer
617 */
618 protected void initializePanel()
619 {
620 setLayout(new BorderLayout());
621 add(createPanel(), BorderLayout.CENTER);
622 }
623
624
625}
Note: See TracBrowser for help on using the repository browser.