3 The file is used to create, update FpdHeader of Fpd file
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
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.
16 package org
.tianocore
.frameworkwizard
.platform
.ui
;
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
;
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
;
36 import org
.tianocore
.PlatformSurfaceAreaDocument
;
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
;
45 The class is used to create, update FpdHeader of Fpd file
46 It extends IInternalFrame
48 @since PackageEditor 1.0
51 public class FpdHeader
extends IInternalFrame
{
53 private int dialogWidth
= 560;
55 private int labelColumn
= 12;
57 private int labelWidth
= 155;
59 private int buttonWidth
= 60;
61 private final int valueColumn
= 168;
63 private final int valueWidth
= 320;
65 private final int specWidth
= 420;
67 private int shortValueWidth
= valueWidth
- (buttonWidth
+ 5);
69 private final int oneRowHeight
= 20;
71 private final int threeRowHeight
= 60;
73 private final int fourRowHeight
= 80;
75 private final int rowSep
= 5;
77 private final int rowOne
= 12;
79 private final int rowTwo
= rowOne
+ oneRowHeight
+ rowSep
;
81 private final int rowThree
= rowTwo
+ oneRowHeight
+ rowSep
;
83 private final int rowFour
= rowThree
+ oneRowHeight
+ rowSep
;
85 private final int rowFive
= rowFour
+ threeRowHeight
+ rowSep
;
87 private final int rowSix
= rowFive
+ fourRowHeight
+ rowSep
;
89 private final int rowSeven
= rowSix
+ oneRowHeight
+ rowSep
;
91 private final int rowEight
= rowSeven
+ oneRowHeight
+ rowSep
;
93 private final int rowNine
= rowEight
+ fourRowHeight
+ threeRowHeight
+rowSep
;
95 private int dialogHeight
= rowNine
+ threeRowHeight
;
97 /// Define class Serial Version UID
99 private static final long serialVersionUID
= -8152099582923006900L;
103 //Define class members
105 private JPanel jContentPane
= null; // @jve:decl-index=0:visual-constraint="10,53"
107 private JLabel jLabelBaseName
= null;
109 private JTextField jTextFieldBaseName
= null;
111 private JLabel jLabelGuid
= null;
113 private JTextField jTextFieldGuid
= null;
115 private JLabel jLabelVersion
= null;
117 private JTextField jTextFieldVersion
= null;
119 private JButton jButtonGenerateGuid
= null;
121 private JLabel jLabelLicense
= null;
123 private JTextArea jTextAreaLicense
= null;
125 private JLabel jLabelCopyright
= null;
127 private JLabel jLabelDescription
= null;
129 private JTextArea jTextAreaDescription
= null;
131 private JTextField jTextFieldSpecification
= null;
133 private JButton jButtonOk
= null;
135 private JButton jButtonCancel
= null;
137 private JScrollPane jScrollPaneLicense
= null;
139 private JScrollPane jScrollPaneDescription
= null;
141 private JScrollPane jCopyrightScrollPane
= null;
143 private JLabel jLabelAbstract
= null;
145 private JTextField jTextFieldAbstract
= null;
147 private StarLabel jStarLabel1
= null;
149 private StarLabel jStarLabel2
= null;
151 private StarLabel jStarLabel3
= null;
153 private StarLabel jStarLabel4
= null;
155 private StarLabel jStarLabel5
= null;
157 private StarLabel jStarLabel7
= null;
159 private StarLabel jStarLabel8
= null;
161 private JTextArea jCopyrightTextArea
= null;
163 private JLabel jLabel
= null;
165 private JTextField jTextFieldUrl
= null;
167 private FpdFileContents ffc
= null;
169 private OpeningPlatformType docConsole
= null;
171 private boolean amended
= false;
174 This method initializes jTextFieldBaseName
176 @return javax.swing.JTextField jTextFieldBaseName
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.");
190 if (jTextFieldBaseName
.getText().equals(ffc
.getFpdHdrPlatformName())) {
193 docConsole
.setSaved(false);
194 ffc
.setFpdHdrPlatformName(jTextFieldBaseName
.getText());
198 return jTextFieldBaseName
;
202 This method initializes jTextFieldGuid
204 @return javax.swing.JTextField jTextFieldGuid
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.");
218 if (jTextFieldGuid
.getText().equals(ffc
.getFpdHdrGuidValue())) {
221 docConsole
.setSaved(false);
222 ffc
.setFpdHdrGuidValue(jTextFieldGuid
.getText());
226 return jTextFieldGuid
;
230 This method initializes jTextFieldVersion
232 @return javax.swing.JTextField jTextFieldVersion
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.");
246 if (jTextFieldVersion
.getText().equals(ffc
.getFpdHdrVer())) {
249 docConsole
.setSaved(false);
250 ffc
.setFpdHdrVer(jTextFieldVersion
.getText());
254 return jTextFieldVersion
;
258 This method initializes jButtonGenerateGuid
260 @return javax.swing.JButton jButtonGenerateGuid
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);
270 return jButtonGenerateGuid
;
274 This method initializes jTextAreaLicense
276 @return javax.swing.JTextArea jTextAreaLicense
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!");
290 if (jTextAreaLicense
.getText().equals(ffc
.getFpdHdrLicense())) {
293 docConsole
.setSaved(false);
294 ffc
.setFpdHdrLicense(jTextAreaLicense
.getText());
298 return jTextAreaLicense
;
302 This method initializes jTextAreaDescription
304 @return javax.swing.JTextArea jTextAreaDescription
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.");
317 if (jTextAreaDescription
.getText().equals(ffc
.getFpdHdrDescription())) {
320 docConsole
.setSaved(false);
321 ffc
.setFpdHdrDescription(jTextAreaDescription
.getText());
325 return jTextAreaDescription
;
329 This method initializes jTextFieldSpecification
331 @return javax.swing.JTextField jTextFieldSpecification
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());
347 return jTextFieldSpecification
;
351 This method initializes jButtonOk
353 @return javax.swing.JButton jButtonOk
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);
368 This method initializes jButtonCancel
370 @return javax.swing.JButton jButtonCancel
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);
381 return jButtonCancel
;
385 This method initializes jScrollPaneLicense
387 @return javax.swing.JScrollPane jScrollPaneLicense
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());
398 return jScrollPaneLicense
;
402 This method initializes jScrollPaneDescription
404 @return javax.swing.JScrollPane jScrollPaneDescription
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());
415 return jScrollPaneDescription
;
419 This method initializes jTextFieldAbstract
421 @return javax.swing.JTextField jTextFieldAbstract
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.");
435 if (jTextFieldAbstract
.getText().equals(ffc
.getFpdHdrAbs())) {
438 docConsole
.setSaved(false);
439 ffc
.setFpdHdrAbs(jTextFieldAbstract
.getText());
443 return jTextFieldAbstract
;
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());
454 return jCopyrightScrollPane
;
457 This method initializes jTextFieldCopyright
459 @return javax.swing.JTextField jTextFieldCopyright
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.");
473 if (jCopyrightTextArea
.getText().equals(ffc
.getFpdHdrCopyright())) {
476 docConsole
.setSaved(false);
477 ffc
.setFpdHdrCopyright(jCopyrightTextArea
.getText());
481 return jCopyrightTextArea
;
485 * This method initializes jTextField
487 * @return javax.swing.JTextField
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) {
499 if (jTextFieldUrl
.getText().equals(ffc
.getFpdHdrUrl())) {
502 ffc
.setFpdHdrLicense(jTextAreaLicense
.getText());
503 ffc
.setFpdHdrUrl(jTextFieldUrl
.getText());
504 docConsole
.setSaved(false);
508 return jTextFieldUrl
;
511 public static void main(String
[] args
) {
512 new FpdHeader().setVisible(true);
516 This is the default constructor
522 this.setVisible(true);
526 This is the override edit constructor
528 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
531 public FpdHeader(PlatformSurfaceAreaDocument
.PlatformSurfaceArea inFpd
) {
533 ffc
= new FpdFileContents(inFpd
);
538 public FpdHeader(OpeningPlatformType opt
) {
539 this(opt
.getXmlFpd());
542 docConsole
.setSaved(false);
548 This method initializes this
551 private void init() {
552 //this.setSize(500, 515);
553 this.setContentPane(getJContentPane());
554 this.setTitle("Platform Surface Area Header");
560 This method initializes this
561 Fill values to all fields if these values are not empty
563 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
566 private void init(FpdFileContents ffc
) {
568 if (ffc
.getFpdHdrPlatformName() != null) {
569 jTextFieldBaseName
.setText(ffc
.getFpdHdrPlatformName());
571 if (ffc
.getFpdHdrGuidValue() != null) {
572 jTextFieldGuid
.setText(ffc
.getFpdHdrGuidValue());
574 if (ffc
.getFpdHdrVer() != null) {
575 jTextFieldVersion
.setText(ffc
.getFpdHdrVer());
577 if (ffc
.getFpdHdrLicense() != null) {
578 jTextAreaLicense
.setText(ffc
.getFpdHdrLicense());
580 if (ffc
.getFpdHdrAbs() != null) {
581 jTextFieldAbstract
.setText(ffc
.getFpdHdrAbs());
583 if (ffc
.getFpdHdrUrl() != null) {
584 jTextFieldUrl
.setText(ffc
.getFpdHdrUrl());
586 if (ffc
.getFpdHdrCopyright() != null) {
587 jCopyrightTextArea
.setText(ffc
.getFpdHdrCopyright());
589 if (ffc
.getFpdHdrDescription() != null) {
590 jTextAreaDescription
.setText(ffc
.getFpdHdrDescription());
592 if (ffc
.getFpdHdrSpec() != null) {
593 jTextFieldSpecification
.setText(ffc
.getFpdHdrSpec());
595 ffc
.setFpdHdrSpec(jTextFieldSpecification
.getText());
597 if (ffc
.getPlatformDefsSkuInfoCount() == 0) {
598 ffc
.genPlatformDefsSkuInfo("0", "DEFAULT");
600 JOptionPane
.showMessageDialog(this, "Default SKU set for this platform.");
602 Vector
<Object
> v
= new Vector
<Object
>();
603 ffc
.getPlatformDefsSupportedArchs(v
);
606 ffc
.setPlatformDefsSupportedArchs(v
);
608 JOptionPane
.showMessageDialog(this, "Supported Arch. IA32 added for this platform.");
610 v
.removeAllElements();
611 ffc
.getPlatformDefsBuildTargets(v
);
614 ffc
.setPlatformDefsBuildTargets(v
);
616 JOptionPane
.showMessageDialog(this, "Build target IA32 added for this platform.");
618 if (ffc
.getPlatformDefsInterDir() == null) {
619 ffc
.setPlatformDefsInterDir("UNIFIED");
621 JOptionPane
.showMessageDialog(this, "UNIFIED Intermediate Directory set for this platform.");
626 This method initializes jContentPane
628 @return javax.swing.JPanel jContentPane
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));
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
));
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);
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);
705 jContentPane
.add(jLabel
, null);
706 jContentPane
.add(getJTextFieldUrl(), null);
712 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
714 * Override actionPerformed to listen all actions
717 public void actionPerformed(ActionEvent arg0
) {
719 if (arg0
.getSource() == jButtonGenerateGuid
) {
720 docConsole
.setSaved(false);
721 jTextFieldGuid
.setText(Tools
.generateUuidString());
722 ffc
.setFpdHdrGuidValue(jTextFieldGuid
.getText());
728 This method initializes Package type and Compontent type
731 private void initFrame() {
737 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
739 * Override componentResized to resize all components when frame's size is changed
741 public void componentResized(ComponentEvent arg0
) {
742 int intPreferredWidth
= dialogWidth
;
743 int intCurrentWidth
= this.getJContentPane().getWidth();
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);