]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/platform/ui/FpdHeader.java
a. Add support arch. filter for library instance selection in FPD file.
[mirror_edk2.git] / Tools / Java / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / platform / ui / FpdHeader.java
1 /** @file
2
3 The file is used to create, update FpdHeader of Fpd file
4
5 Copyright (c) 2006, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
10
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13
14 **/
15
16 package org.tianocore.frameworkwizard.platform.ui;
17
18 import java.awt.Dimension;
19 import java.awt.event.ActionEvent;
20 import java.awt.event.ComponentEvent;
21 import java.awt.event.FocusAdapter;
22 import java.awt.event.FocusEvent;
23 import java.util.Vector;
24
25 import javax.swing.JButton;
26 import javax.swing.JFrame;
27 import javax.swing.JLabel;
28 import javax.swing.JOptionPane;
29 import javax.swing.JPanel;
30 import javax.swing.JScrollPane;
31 import javax.swing.JTextArea;
32 import javax.swing.JTextField;
33
34
35
36 import org.tianocore.PlatformSurfaceAreaDocument;
37
38 import org.tianocore.frameworkwizard.common.DataValidation;
39 import org.tianocore.frameworkwizard.common.Tools;
40 import org.tianocore.frameworkwizard.common.Identifications.OpeningPlatformType;
41 import org.tianocore.frameworkwizard.common.ui.IInternalFrame;
42 import org.tianocore.frameworkwizard.common.ui.StarLabel;
43
44 /**
45 The class is used to create, update FpdHeader of Fpd file
46 It extends IInternalFrame
47
48 @since PackageEditor 1.0
49
50 **/
51 public class FpdHeader extends IInternalFrame {
52
53 private int dialogWidth = 560;
54
55 private int labelColumn = 12;
56
57 private int labelWidth = 155;
58
59 private int buttonWidth = 60;
60
61 private final int valueColumn = 168;
62
63 private final int valueWidth = 320;
64
65 private final int specWidth = 420;
66
67 private int shortValueWidth = valueWidth - (buttonWidth + 5);
68
69 private final int oneRowHeight = 20;
70
71 private final int threeRowHeight = 60;
72
73 private final int fourRowHeight = 80;
74
75 private final int rowSep = 5;
76
77 private final int rowOne = 12;
78
79 private final int rowTwo = rowOne + oneRowHeight + rowSep;
80
81 private final int rowThree = rowTwo + oneRowHeight + rowSep;
82
83 private final int rowFour = rowThree + oneRowHeight + rowSep;
84
85 private final int rowFive = rowFour + threeRowHeight + rowSep;
86
87 private final int rowSix = rowFive + fourRowHeight + rowSep;
88
89 private final int rowSeven = rowSix + oneRowHeight + rowSep;
90
91 private final int rowEight = rowSeven + oneRowHeight + rowSep;
92
93 private final int rowNine = rowEight + fourRowHeight + threeRowHeight +rowSep;
94
95 private int dialogHeight = rowNine + threeRowHeight;
96 ///
97 /// Define class Serial Version UID
98 ///
99 private static final long serialVersionUID = -8152099582923006900L;
100
101 static JFrame frame;
102 //
103 //Define class members
104 //
105 private JPanel jContentPane = null; // @jve:decl-index=0:visual-constraint="10,53"
106
107 private JLabel jLabelBaseName = null;
108
109 private JTextField jTextFieldBaseName = null;
110
111 private JLabel jLabelGuid = null;
112
113 private JTextField jTextFieldGuid = null;
114
115 private JLabel jLabelVersion = null;
116
117 private JTextField jTextFieldVersion = null;
118
119 private JButton jButtonGenerateGuid = null;
120
121 private JLabel jLabelLicense = null;
122
123 private JTextArea jTextAreaLicense = null;
124
125 private JLabel jLabelCopyright = null;
126
127 private JLabel jLabelDescription = null;
128
129 private JTextArea jTextAreaDescription = null;
130
131 private JTextField jTextFieldSpecification = null;
132
133 private JButton jButtonOk = null;
134
135 private JButton jButtonCancel = null;
136
137 private JScrollPane jScrollPaneLicense = null;
138
139 private JScrollPane jScrollPaneDescription = null;
140
141 private JScrollPane jCopyrightScrollPane = null;
142
143 private JLabel jLabelAbstract = null;
144
145 private JTextField jTextFieldAbstract = null;
146
147 private StarLabel jStarLabel1 = null;
148
149 private StarLabel jStarLabel2 = null;
150
151 private StarLabel jStarLabel3 = null;
152
153 private StarLabel jStarLabel4 = null;
154
155 private StarLabel jStarLabel5 = null;
156
157 private StarLabel jStarLabel7 = null;
158
159 private StarLabel jStarLabel8 = null;
160
161 private JTextArea jCopyrightTextArea = null;
162
163 private JLabel jLabel = null;
164
165 private JTextField jTextFieldUrl = null;
166
167 private FpdFileContents ffc = null;
168
169 private OpeningPlatformType docConsole = null;
170
171 private boolean amended = false;
172
173 /**
174 This method initializes jTextFieldBaseName
175
176 @return javax.swing.JTextField jTextFieldBaseName
177
178 **/
179 private JTextField getJTextFieldBaseName() {
180 if (jTextFieldBaseName == null) {
181 jTextFieldBaseName = new JTextField();
182 jTextFieldBaseName.setBounds(new java.awt.Rectangle(valueColumn, rowOne, valueWidth, oneRowHeight));
183 jTextFieldBaseName.setPreferredSize(new java.awt.Dimension(valueWidth,oneRowHeight));
184 jTextFieldBaseName.addFocusListener(new FocusAdapter(){
185 public void focusLost(FocusEvent e) {
186 if (!DataValidation.isUiNameType(jTextFieldBaseName.getText())) {
187 JOptionPane.showMessageDialog(frame, "Package Name does not match the UiNameType datatype.");
188 return;
189 }
190 if (jTextFieldBaseName.getText().equals(ffc.getFpdHdrPlatformName())) {
191 return;
192 }
193 docConsole.setSaved(false);
194 ffc.setFpdHdrPlatformName(jTextFieldBaseName.getText());
195 }
196 });
197 }
198 return jTextFieldBaseName;
199 }
200
201 /**
202 This method initializes jTextFieldGuid
203
204 @return javax.swing.JTextField jTextFieldGuid
205
206 **/
207 private JTextField getJTextFieldGuid() {
208 if (jTextFieldGuid == null) {
209 jTextFieldGuid = new JTextField();
210 jTextFieldGuid.setBounds(new java.awt.Rectangle(valueColumn, rowTwo, shortValueWidth, oneRowHeight));
211 jTextFieldGuid.setPreferredSize(new java.awt.Dimension(shortValueWidth,oneRowHeight));
212 jTextFieldGuid.addFocusListener(new FocusAdapter(){
213 public void focusLost(FocusEvent e) {
214 if (!DataValidation.isGuid(jTextFieldGuid.getText())) {
215 JOptionPane.showMessageDialog(frame, "Guid must be in registry (8-4-4-4-12) format.");
216 return;
217 }
218 if (jTextFieldGuid.getText().equals(ffc.getFpdHdrGuidValue())) {
219 return;
220 }
221 docConsole.setSaved(false);
222 ffc.setFpdHdrGuidValue(jTextFieldGuid.getText());
223 }
224 });
225 }
226 return jTextFieldGuid;
227 }
228
229 /**
230 This method initializes jTextFieldVersion
231
232 @return javax.swing.JTextField jTextFieldVersion
233
234 **/
235 private JTextField getJTextFieldVersion() {
236 if (jTextFieldVersion == null) {
237 jTextFieldVersion = new JTextField();
238 jTextFieldVersion.setBounds(new java.awt.Rectangle(valueColumn, rowThree, valueWidth, oneRowHeight));
239 jTextFieldVersion.setPreferredSize(new java.awt.Dimension(valueWidth,oneRowHeight));
240 jTextFieldVersion.addFocusListener(new FocusAdapter(){
241 public void focusLost(FocusEvent e) {
242 if (!DataValidation.isVersion(jTextFieldVersion.getText())) {
243 JOptionPane.showMessageDialog(frame, "Version does not match the Version datatype.");
244 return;
245 }
246 if (jTextFieldVersion.getText().equals(ffc.getFpdHdrVer())) {
247 return;
248 }
249 docConsole.setSaved(false);
250 ffc.setFpdHdrVer(jTextFieldVersion.getText());
251 }
252 });
253 }
254 return jTextFieldVersion;
255 }
256
257 /**
258 This method initializes jButtonGenerateGuid
259
260 @return javax.swing.JButton jButtonGenerateGuid
261
262 **/
263 private JButton getJButtonGenerateGuid() {
264 if (jButtonGenerateGuid == null) {
265 jButtonGenerateGuid = new JButton();
266 jButtonGenerateGuid.setBounds(new java.awt.Rectangle(valueColumn + shortValueWidth + 5, rowTwo, buttonWidth, oneRowHeight));
267 jButtonGenerateGuid.setText("GEN");
268 jButtonGenerateGuid.addActionListener(this);
269 }
270 return jButtonGenerateGuid;
271 }
272
273 /**
274 This method initializes jTextAreaLicense
275
276 @return javax.swing.JTextArea jTextAreaLicense
277
278 **/
279 private JTextArea getJTextAreaLicense() {
280 if (jTextAreaLicense == null) {
281 jTextAreaLicense = new JTextArea();
282 jTextAreaLicense.setText("");
283 jTextAreaLicense.setLineWrap(true);
284 jTextAreaLicense.addFocusListener(new FocusAdapter(){
285 public void focusLost(FocusEvent e) {
286 if (jTextAreaLicense.getText().length() == 0) {
287 JOptionPane.showMessageDialog(frame, "License must be entered!");
288 return;
289 }
290 if (jTextAreaLicense.getText().equals(ffc.getFpdHdrLicense())) {
291 return;
292 }
293 docConsole.setSaved(false);
294 ffc.setFpdHdrLicense(jTextAreaLicense.getText());
295 }
296 });
297 }
298 return jTextAreaLicense;
299 }
300
301 /**
302 This method initializes jTextAreaDescription
303
304 @return javax.swing.JTextArea jTextAreaDescription
305
306 **/
307 private JTextArea getJTextAreaDescription() {
308 if (jTextAreaDescription == null) {
309 jTextAreaDescription = new JTextArea();
310 jTextAreaDescription.setLineWrap(true);
311 jTextAreaDescription.addFocusListener(new FocusAdapter(){
312 public void focusLost(FocusEvent e) {
313 if (jTextAreaDescription.getText().length() == 0) {
314 JOptionPane.showMessageDialog(frame, "Description must be entered.");
315 return;
316 }
317 if (jTextAreaDescription.getText().equals(ffc.getFpdHdrDescription())) {
318 return;
319 }
320 docConsole.setSaved(false);
321 ffc.setFpdHdrDescription(jTextAreaDescription.getText());
322 }
323 });
324 }
325 return jTextAreaDescription;
326 }
327
328 /**
329 This method initializes jTextFieldSpecification
330
331 @return javax.swing.JTextField jTextFieldSpecification
332
333 **/
334 private JTextField getJTextFieldSpecification() {
335 if (jTextFieldSpecification == null) {
336 jTextFieldSpecification = new JTextField();
337 jTextFieldSpecification.setBounds(new java.awt.Rectangle(labelColumn,rowNine,specWidth,oneRowHeight));
338 jTextFieldSpecification.setEditable(false);
339 jTextFieldSpecification.setPreferredSize(new java.awt.Dimension(specWidth,oneRowHeight));
340 jTextFieldSpecification.setBorder(null);
341 jTextFieldSpecification.addFocusListener(new FocusAdapter(){
342 public void focusLost(FocusEvent e) {
343 ffc.setFpdHdrSpec(jTextFieldSpecification.getText());
344 }
345 });
346 }
347 return jTextFieldSpecification;
348 }
349
350 /**
351 This method initializes jButtonOk
352
353 @return javax.swing.JButton jButtonOk
354
355 **/
356 private JButton getJButtonOk() {
357 if (jButtonOk == null) {
358 jButtonOk = new JButton();
359 jButtonOk.setText("OK");
360 jButtonOk.setBounds(new java.awt.Rectangle(290,351,90,20));
361 jButtonOk.setVisible(false);
362 jButtonOk.addActionListener(this);
363 }
364 return jButtonOk;
365 }
366
367 /**
368 This method initializes jButtonCancel
369
370 @return javax.swing.JButton jButtonCancel
371
372 **/
373 private JButton getJButtonCancel() {
374 if (jButtonCancel == null) {
375 jButtonCancel = new JButton();
376 jButtonCancel.setText("Cancel");
377 jButtonCancel.setBounds(new java.awt.Rectangle(390,351,90,20));
378 jButtonCancel.setVisible(false);
379 jButtonCancel.addActionListener(this);
380 }
381 return jButtonCancel;
382 }
383
384 /**
385 This method initializes jScrollPaneLicense
386
387 @return javax.swing.JScrollPane jScrollPaneLicense
388
389 **/
390 private JScrollPane getJScrollPaneLicense() {
391 if (jScrollPaneLicense == null) {
392 jScrollPaneLicense = new JScrollPane();
393 jScrollPaneLicense.setBounds(new java.awt.Rectangle(valueColumn,rowFive,valueWidth,fourRowHeight));
394 jScrollPaneLicense.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
395 jScrollPaneLicense.setPreferredSize(new java.awt.Dimension(valueWidth,fourRowHeight));
396 jScrollPaneLicense.setViewportView(getJTextAreaLicense());
397 }
398 return jScrollPaneLicense;
399 }
400
401 /**
402 This method initializes jScrollPaneDescription
403
404 @return javax.swing.JScrollPane jScrollPaneDescription
405
406 **/
407 private JScrollPane getJScrollPaneDescription() {
408 if (jScrollPaneDescription == null) {
409 jScrollPaneDescription = new JScrollPane();
410 jScrollPaneDescription.setBounds(new java.awt.Rectangle(valueColumn,rowEight,valueWidth,fourRowHeight));
411 jScrollPaneDescription.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
412 jScrollPaneDescription.setPreferredSize(new java.awt.Dimension(valueWidth, fourRowHeight));
413 jScrollPaneDescription.setViewportView(getJTextAreaDescription());
414 }
415 return jScrollPaneDescription;
416 }
417
418 /**
419 This method initializes jTextFieldAbstract
420
421 @return javax.swing.JTextField jTextFieldAbstract
422
423 **/
424 private JTextField getJTextFieldAbstract() {
425 if (jTextFieldAbstract == null) {
426 jTextFieldAbstract = new JTextField();
427 jTextFieldAbstract.setBounds(new java.awt.Rectangle(valueColumn,rowSeven,valueWidth,oneRowHeight));
428 jTextFieldAbstract.setPreferredSize(new java.awt.Dimension(valueWidth, oneRowHeight));
429 jTextFieldAbstract.addFocusListener(new FocusAdapter(){
430 public void focusLost(FocusEvent e) {
431 if (!DataValidation.isAbstract(jTextFieldAbstract.getText())) {
432 JOptionPane.showMessageDialog(frame, "Abstract must be entered.");
433 return;
434 }
435 if (jTextFieldAbstract.getText().equals(ffc.getFpdHdrAbs())) {
436 return;
437 }
438 docConsole.setSaved(false);
439 ffc.setFpdHdrAbs(jTextFieldAbstract.getText());
440 }
441 });
442 }
443 return jTextFieldAbstract;
444 }
445
446 private JScrollPane getCopyrightScrollPane() {
447 if (jCopyrightScrollPane == null) {
448 jCopyrightScrollPane = new JScrollPane();
449 jCopyrightScrollPane.setBounds(new java.awt.Rectangle(valueColumn, rowFour, valueWidth, threeRowHeight));
450 jCopyrightScrollPane.setHorizontalScrollBarPolicy(javax.swing.JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
451 jCopyrightScrollPane.setPreferredSize(new java.awt.Dimension(valueWidth, threeRowHeight));
452 jCopyrightScrollPane.setViewportView(getJCopyrightTextArea());
453 }
454 return jCopyrightScrollPane;
455 }
456 /**
457 This method initializes jTextFieldCopyright
458
459 @return javax.swing.JTextField jTextFieldCopyright
460
461 **/
462 private JTextArea getJCopyrightTextArea() {
463 if (jCopyrightTextArea == null) {
464 jCopyrightTextArea = new JTextArea();
465 jCopyrightTextArea.setWrapStyleWord(true);
466 jCopyrightTextArea.setLineWrap(true);
467 jCopyrightTextArea.addFocusListener(new FocusAdapter(){
468 public void focusLost(FocusEvent e) {
469 if (!DataValidation.isCopyright(jCopyrightTextArea.getText())) {
470 JOptionPane.showMessageDialog(frame, "Copyright must be entered.");
471 return;
472 }
473 if (jCopyrightTextArea.getText().equals(ffc.getFpdHdrCopyright())) {
474 return;
475 }
476 docConsole.setSaved(false);
477 ffc.setFpdHdrCopyright(jCopyrightTextArea.getText());
478 }
479 });
480 }
481 return jCopyrightTextArea;
482 }
483
484 /**
485 * This method initializes jTextField
486 *
487 * @return javax.swing.JTextField
488 */
489 private JTextField getJTextFieldUrl() {
490 if (jTextFieldUrl == null) {
491 jTextFieldUrl = new JTextField();
492 jTextFieldUrl.setBounds(new java.awt.Rectangle(valueColumn,rowSix,valueWidth,oneRowHeight));
493 jTextFieldUrl.setPreferredSize(new Dimension(valueWidth, oneRowHeight));
494 jTextFieldUrl.addFocusListener(new FocusAdapter(){
495 public void focusLost(FocusEvent e){
496 if (jTextFieldUrl.getText().length() == 0 && ffc.getFpdHdrUrl() == null) {
497 return;
498 }
499 if (jTextFieldUrl.getText().equals(ffc.getFpdHdrUrl())) {
500 return;
501 }
502 ffc.setFpdHdrLicense(jTextAreaLicense.getText());
503 ffc.setFpdHdrUrl(jTextFieldUrl.getText());
504 docConsole.setSaved(false);
505 }
506 });
507 }
508 return jTextFieldUrl;
509 }
510
511 public static void main(String[] args) {
512 new FpdHeader().setVisible(true);
513 }
514
515 /**
516 This is the default constructor
517
518 **/
519 public FpdHeader() {
520 super();
521 init();
522 this.setVisible(true);
523 }
524
525 /**
526 This is the override edit constructor
527
528 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
529
530 **/
531 public FpdHeader(PlatformSurfaceAreaDocument.PlatformSurfaceArea inFpd) {
532 this();
533 ffc = new FpdFileContents(inFpd);
534 init(ffc);
535
536 }
537
538 public FpdHeader(OpeningPlatformType opt) {
539 this(opt.getXmlFpd());
540 docConsole = opt;
541 if (amended) {
542 docConsole.setSaved(false);
543 amended = false;
544 }
545 }
546
547 /**
548 This method initializes this
549
550 **/
551 private void init() {
552 //this.setSize(500, 515);
553 this.setContentPane(getJContentPane());
554 this.setTitle("Platform Surface Area Header");
555 initFrame();
556
557 }
558
559 /**
560 This method initializes this
561 Fill values to all fields if these values are not empty
562
563 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
564
565 **/
566 private void init(FpdFileContents ffc) {
567
568 if (ffc.getFpdHdrPlatformName() != null) {
569 jTextFieldBaseName.setText(ffc.getFpdHdrPlatformName());
570 }
571 if (ffc.getFpdHdrGuidValue() != null) {
572 jTextFieldGuid.setText(ffc.getFpdHdrGuidValue());
573 }
574 if (ffc.getFpdHdrVer() != null) {
575 jTextFieldVersion.setText(ffc.getFpdHdrVer());
576 }
577 if (ffc.getFpdHdrLicense() != null) {
578 jTextAreaLicense.setText(ffc.getFpdHdrLicense());
579 }
580 if (ffc.getFpdHdrAbs() != null) {
581 jTextFieldAbstract.setText(ffc.getFpdHdrAbs());
582 }
583 if (ffc.getFpdHdrUrl() != null) {
584 jTextFieldUrl.setText(ffc.getFpdHdrUrl());
585 }
586 if (ffc.getFpdHdrCopyright() != null) {
587 jCopyrightTextArea.setText(ffc.getFpdHdrCopyright());
588 }
589 if (ffc.getFpdHdrDescription() != null) {
590 jTextAreaDescription.setText(ffc.getFpdHdrDescription());
591 }
592 if (ffc.getFpdHdrSpec() != null) {
593 jTextFieldSpecification.setText(ffc.getFpdHdrSpec());
594 }
595 ffc.setFpdHdrSpec(jTextFieldSpecification.getText());
596
597 if (ffc.getPlatformDefsSkuInfoCount() == 0) {
598 ffc.genPlatformDefsSkuInfo("0", "DEFAULT");
599 amended = true;
600 JOptionPane.showMessageDialog(this, "Default SKU set for this platform.");
601 }
602 Vector<Object> v = new Vector<Object>();
603 ffc.getPlatformDefsSupportedArchs(v);
604 if (v.size() == 0) {
605 v.add("IA32");
606 ffc.setPlatformDefsSupportedArchs(v);
607 amended = true;
608 JOptionPane.showMessageDialog(this, "Supported Arch. IA32 added for this platform.");
609 }
610 v.removeAllElements();
611 ffc.getPlatformDefsBuildTargets(v);
612 if (v.size() == 0) {
613 v.add("DEBUG");
614 ffc.setPlatformDefsBuildTargets(v);
615 amended = true;
616 JOptionPane.showMessageDialog(this, "Build target IA32 added for this platform.");
617 }
618 if (ffc.getPlatformDefsInterDir() == null) {
619 ffc.setPlatformDefsInterDir("UNIFIED");
620 amended = true;
621 JOptionPane.showMessageDialog(this, "UNIFIED Intermediate Directory set for this platform.");
622 }
623 }
624
625 /**
626 This method initializes jContentPane
627
628 @return javax.swing.JPanel jContentPane
629
630 **/
631 private JPanel getJContentPane() {
632 if (jContentPane == null) {
633 jContentPane = new JPanel();
634 jContentPane.setLayout(null);
635 jContentPane.setLocation(new java.awt.Point(0, 0));
636 jContentPane.setSize(new java.awt.Dimension(dialogWidth - 20 ,dialogHeight - 20));
637
638 jLabel = new JLabel();
639 jLabel.setBounds(new java.awt.Rectangle(labelColumn,rowSix,labelWidth,oneRowHeight));
640 jLabel.setText("URL");
641 jLabelAbstract = new JLabel();
642 jLabelAbstract.setBounds(new java.awt.Rectangle(labelColumn,rowSeven,labelWidth,oneRowHeight));
643 jLabelAbstract.setText("Abstract");
644 jLabelDescription = new JLabel();
645 jLabelDescription.setText("Description");
646 jLabelDescription.setBounds(new java.awt.Rectangle(labelColumn,rowEight,labelWidth,oneRowHeight));
647 jLabelCopyright = new JLabel();
648 jLabelCopyright.setText("Copyright");
649 jLabelCopyright.setBounds(new java.awt.Rectangle(labelColumn,rowFour,labelWidth,oneRowHeight));
650 jLabelLicense = new JLabel();
651 jLabelLicense.setText("License");
652 jLabelLicense.setBounds(new java.awt.Rectangle(labelColumn,rowFive,labelWidth,oneRowHeight));
653 jLabelVersion = new JLabel();
654 jLabelVersion.setText("Version");
655 jLabelVersion.setBounds(new java.awt.Rectangle(labelColumn, rowThree, labelWidth, oneRowHeight));
656 jLabelGuid = new JLabel();
657 jLabelGuid.setPreferredSize(new java.awt.Dimension(labelWidth, oneRowHeight));
658 jLabelGuid.setBounds(new java.awt.Rectangle(labelColumn, rowTwo, labelWidth, oneRowHeight));
659 jLabelGuid.setText("Guid");
660 jLabelBaseName = new JLabel();
661 jLabelBaseName.setText("Platform Name");
662 jLabelBaseName.setBounds(new java.awt.Rectangle(labelColumn, rowOne, labelWidth, oneRowHeight));
663 jStarLabel1 = new StarLabel();
664 jStarLabel1.setLocation(new java.awt.Point(0, rowOne));
665 jStarLabel2 = new StarLabel();
666 jStarLabel2.setLocation(new java.awt.Point(0, rowTwo));
667 jStarLabel3 = new StarLabel();
668 jStarLabel3.setLocation(new java.awt.Point(0, rowThree));
669 jStarLabel4 = new StarLabel();
670 jStarLabel4.setLocation(new java.awt.Point(0,rowFour));
671 jStarLabel5 = new StarLabel();
672 jStarLabel5.setLocation(new java.awt.Point(0,rowFive));
673 jStarLabel7 = new StarLabel();
674 jStarLabel7.setLocation(new java.awt.Point(0,rowSeven));
675 jStarLabel8 = new StarLabel();
676 jStarLabel8.setLocation(new java.awt.Point(0,rowEight));
677
678 jContentPane.add(jLabelBaseName, null);
679 jContentPane.add(getJTextFieldBaseName(), null);
680 jContentPane.add(jLabelGuid, null);
681 jContentPane.add(getJTextFieldGuid(), null);
682 jContentPane.add(jLabelVersion, null);
683 jContentPane.add(getJTextFieldVersion(), null);
684 jContentPane.add(getJButtonGenerateGuid(), null);
685 jContentPane.add(jLabelLicense, null);
686 jContentPane.add(jLabelCopyright, null);
687 jContentPane.add(jLabelDescription, null);
688 jContentPane.add(getJTextFieldSpecification(), null);
689 jContentPane.add(getJButtonOk(), null);
690 jContentPane.add(getJButtonCancel(), null);
691 jContentPane.add(getJScrollPaneLicense(), null);
692 jContentPane.add(getJScrollPaneDescription(), null);
693 jContentPane.add(jLabelAbstract, null);
694 jContentPane.add(getJTextFieldAbstract(), null);
695
696 jContentPane.add(jStarLabel1, null);
697 jContentPane.add(jStarLabel2, null);
698 jContentPane.add(jStarLabel3, null);
699 jContentPane.add(jStarLabel4, null);
700 jContentPane.add(jStarLabel5, null);
701 jContentPane.add(jStarLabel7, null);
702 jContentPane.add(jStarLabel8, null);
703 jContentPane.add(getCopyrightScrollPane(), null);
704
705 jContentPane.add(jLabel, null);
706 jContentPane.add(getJTextFieldUrl(), null);
707 }
708 return jContentPane;
709 }
710
711 /* (non-Javadoc)
712 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
713 *
714 * Override actionPerformed to listen all actions
715 *
716 */
717 public void actionPerformed(ActionEvent arg0) {
718
719 if (arg0.getSource() == jButtonGenerateGuid) {
720 docConsole.setSaved(false);
721 jTextFieldGuid.setText(Tools.generateUuidString());
722 ffc.setFpdHdrGuidValue(jTextFieldGuid.getText());
723 }
724 }
725
726
727 /**
728 This method initializes Package type and Compontent type
729
730 **/
731 private void initFrame() {
732
733
734 }
735
736 /* (non-Javadoc)
737 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
738 *
739 * Override componentResized to resize all components when frame's size is changed
740 */
741 public void componentResized(ComponentEvent arg0) {
742 int intPreferredWidth = dialogWidth;
743 int intCurrentWidth = this.getJContentPane().getWidth();
744
745 // Tools.resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);
746 // Tools.resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);
747 // Tools.relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);
748 // Tools.resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
749 // Tools.resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);
750 Tools.resizeComponentWidth(this.jScrollPaneLicense, intCurrentWidth, intPreferredWidth);
751 Tools.resizeComponentWidth(this.jTextFieldUrl, intCurrentWidth, intPreferredWidth);
752 Tools.resizeComponentWidth(this.jTextFieldAbstract, intCurrentWidth, intPreferredWidth);
753 Tools.resizeComponentWidth(this.jScrollPaneDescription, intCurrentWidth, intPreferredWidth);
754 // Tools.resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);
755
756
757
758 }
759 }