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;
172 This method initializes jTextFieldBaseName
174 @return javax.swing.JTextField jTextFieldBaseName
177 private JTextField
getJTextFieldBaseName() {
178 if (jTextFieldBaseName
== null) {
179 jTextFieldBaseName
= new JTextField();
180 jTextFieldBaseName
.setBounds(new java
.awt
.Rectangle(valueColumn
, rowOne
, valueWidth
, oneRowHeight
));
181 jTextFieldBaseName
.setPreferredSize(new java
.awt
.Dimension(valueWidth
,oneRowHeight
));
182 jTextFieldBaseName
.addFocusListener(new FocusAdapter(){
183 public void focusLost(FocusEvent e
) {
184 if (!DataValidation
.isUiNameType(jTextFieldBaseName
.getText())) {
185 JOptionPane
.showMessageDialog(frame
, "Package Name does not match the UiNameType datatype.");
188 if (jTextFieldBaseName
.getText().equals(ffc
.getFpdHdrPlatformName())) {
191 docConsole
.setSaved(false);
192 ffc
.setFpdHdrPlatformName(jTextFieldBaseName
.getText());
196 return jTextFieldBaseName
;
200 This method initializes jTextFieldGuid
202 @return javax.swing.JTextField jTextFieldGuid
205 private JTextField
getJTextFieldGuid() {
206 if (jTextFieldGuid
== null) {
207 jTextFieldGuid
= new JTextField();
208 jTextFieldGuid
.setBounds(new java
.awt
.Rectangle(valueColumn
, rowTwo
, shortValueWidth
, oneRowHeight
));
209 jTextFieldGuid
.setPreferredSize(new java
.awt
.Dimension(shortValueWidth
,oneRowHeight
));
210 jTextFieldGuid
.addFocusListener(new FocusAdapter(){
211 public void focusLost(FocusEvent e
) {
212 if (!DataValidation
.isGuid(jTextFieldGuid
.getText())) {
213 JOptionPane
.showMessageDialog(frame
, "Guid must be in registry (8-4-4-4-12) format.");
216 if (jTextFieldGuid
.getText().equals(ffc
.getFpdHdrGuidValue())) {
219 docConsole
.setSaved(false);
220 ffc
.setFpdHdrGuidValue(jTextFieldGuid
.getText());
224 return jTextFieldGuid
;
228 This method initializes jTextFieldVersion
230 @return javax.swing.JTextField jTextFieldVersion
233 private JTextField
getJTextFieldVersion() {
234 if (jTextFieldVersion
== null) {
235 jTextFieldVersion
= new JTextField();
236 jTextFieldVersion
.setBounds(new java
.awt
.Rectangle(valueColumn
, rowThree
, valueWidth
, oneRowHeight
));
237 jTextFieldVersion
.setPreferredSize(new java
.awt
.Dimension(valueWidth
,oneRowHeight
));
238 jTextFieldVersion
.addFocusListener(new FocusAdapter(){
239 public void focusLost(FocusEvent e
) {
240 if (!DataValidation
.isVersion(jTextFieldVersion
.getText())) {
241 JOptionPane
.showMessageDialog(frame
, "Version does not match the Version datatype.");
244 if (jTextFieldVersion
.getText().equals(ffc
.getFpdHdrVer())) {
247 docConsole
.setSaved(false);
248 ffc
.setFpdHdrVer(jTextFieldVersion
.getText());
252 return jTextFieldVersion
;
256 This method initializes jButtonGenerateGuid
258 @return javax.swing.JButton jButtonGenerateGuid
261 private JButton
getJButtonGenerateGuid() {
262 if (jButtonGenerateGuid
== null) {
263 jButtonGenerateGuid
= new JButton();
264 jButtonGenerateGuid
.setBounds(new java
.awt
.Rectangle(valueColumn
+ shortValueWidth
+ 5, rowTwo
, buttonWidth
, oneRowHeight
));
265 jButtonGenerateGuid
.setText("GEN");
266 jButtonGenerateGuid
.addActionListener(this);
268 return jButtonGenerateGuid
;
272 This method initializes jTextAreaLicense
274 @return javax.swing.JTextArea jTextAreaLicense
277 private JTextArea
getJTextAreaLicense() {
278 if (jTextAreaLicense
== null) {
279 jTextAreaLicense
= new JTextArea();
280 jTextAreaLicense
.setText("");
281 jTextAreaLicense
.setLineWrap(true);
282 jTextAreaLicense
.addFocusListener(new FocusAdapter(){
283 public void focusLost(FocusEvent e
) {
284 if (jTextAreaLicense
.getText().length() == 0) {
285 JOptionPane
.showMessageDialog(frame
, "License must be entered!");
288 if (jTextAreaLicense
.getText().equals(ffc
.getFpdHdrLicense())) {
291 docConsole
.setSaved(false);
292 ffc
.setFpdHdrLicense(jTextAreaLicense
.getText());
296 return jTextAreaLicense
;
300 This method initializes jTextAreaDescription
302 @return javax.swing.JTextArea jTextAreaDescription
305 private JTextArea
getJTextAreaDescription() {
306 if (jTextAreaDescription
== null) {
307 jTextAreaDescription
= new JTextArea();
308 jTextAreaDescription
.setLineWrap(true);
309 jTextAreaDescription
.addFocusListener(new FocusAdapter(){
310 public void focusLost(FocusEvent e
) {
311 if (jTextAreaDescription
.getText().length() == 0) {
312 JOptionPane
.showMessageDialog(frame
, "Description must be entered.");
315 if (jTextAreaDescription
.getText().equals(ffc
.getFpdHdrDescription())) {
318 docConsole
.setSaved(false);
319 ffc
.setFpdHdrDescription(jTextAreaDescription
.getText());
323 return jTextAreaDescription
;
327 This method initializes jTextFieldSpecification
329 @return javax.swing.JTextField jTextFieldSpecification
332 private JTextField
getJTextFieldSpecification() {
333 if (jTextFieldSpecification
== null) {
334 jTextFieldSpecification
= new JTextField();
335 jTextFieldSpecification
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowNine
,specWidth
,oneRowHeight
));
336 jTextFieldSpecification
.setEditable(false);
337 jTextFieldSpecification
.setPreferredSize(new java
.awt
.Dimension(specWidth
,oneRowHeight
));
338 jTextFieldSpecification
.setBorder(null);
339 jTextFieldSpecification
.addFocusListener(new FocusAdapter(){
340 public void focusLost(FocusEvent e
) {
341 ffc
.setFpdHdrSpec(jTextFieldSpecification
.getText());
345 return jTextFieldSpecification
;
349 This method initializes jButtonOk
351 @return javax.swing.JButton jButtonOk
354 private JButton
getJButtonOk() {
355 if (jButtonOk
== null) {
356 jButtonOk
= new JButton();
357 jButtonOk
.setText("OK");
358 jButtonOk
.setBounds(new java
.awt
.Rectangle(290,351,90,20));
359 jButtonOk
.setVisible(false);
360 jButtonOk
.addActionListener(this);
366 This method initializes jButtonCancel
368 @return javax.swing.JButton jButtonCancel
371 private JButton
getJButtonCancel() {
372 if (jButtonCancel
== null) {
373 jButtonCancel
= new JButton();
374 jButtonCancel
.setText("Cancel");
375 jButtonCancel
.setBounds(new java
.awt
.Rectangle(390,351,90,20));
376 jButtonCancel
.setVisible(false);
377 jButtonCancel
.addActionListener(this);
379 return jButtonCancel
;
383 This method initializes jScrollPaneLicense
385 @return javax.swing.JScrollPane jScrollPaneLicense
388 private JScrollPane
getJScrollPaneLicense() {
389 if (jScrollPaneLicense
== null) {
390 jScrollPaneLicense
= new JScrollPane();
391 jScrollPaneLicense
.setBounds(new java
.awt
.Rectangle(valueColumn
,rowFive
,valueWidth
,fourRowHeight
));
392 jScrollPaneLicense
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
393 jScrollPaneLicense
.setPreferredSize(new java
.awt
.Dimension(valueWidth
,fourRowHeight
));
394 jScrollPaneLicense
.setViewportView(getJTextAreaLicense());
396 return jScrollPaneLicense
;
400 This method initializes jScrollPaneDescription
402 @return javax.swing.JScrollPane jScrollPaneDescription
405 private JScrollPane
getJScrollPaneDescription() {
406 if (jScrollPaneDescription
== null) {
407 jScrollPaneDescription
= new JScrollPane();
408 jScrollPaneDescription
.setBounds(new java
.awt
.Rectangle(valueColumn
,rowEight
,valueWidth
,fourRowHeight
));
409 jScrollPaneDescription
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
410 jScrollPaneDescription
.setPreferredSize(new java
.awt
.Dimension(valueWidth
, fourRowHeight
));
411 jScrollPaneDescription
.setViewportView(getJTextAreaDescription());
413 return jScrollPaneDescription
;
417 This method initializes jTextFieldAbstract
419 @return javax.swing.JTextField jTextFieldAbstract
422 private JTextField
getJTextFieldAbstract() {
423 if (jTextFieldAbstract
== null) {
424 jTextFieldAbstract
= new JTextField();
425 jTextFieldAbstract
.setBounds(new java
.awt
.Rectangle(valueColumn
,rowSeven
,valueWidth
,oneRowHeight
));
426 jTextFieldAbstract
.setPreferredSize(new java
.awt
.Dimension(valueWidth
, oneRowHeight
));
427 jTextFieldAbstract
.addFocusListener(new FocusAdapter(){
428 public void focusLost(FocusEvent e
) {
429 if (!DataValidation
.isAbstract(jTextFieldAbstract
.getText())) {
430 JOptionPane
.showMessageDialog(frame
, "Abstract must be entered.");
433 if (jTextFieldAbstract
.getText().equals(ffc
.getFpdHdrAbs())) {
436 docConsole
.setSaved(false);
437 ffc
.setFpdHdrAbs(jTextFieldAbstract
.getText());
441 return jTextFieldAbstract
;
444 private JScrollPane
getCopyrightScrollPane() {
445 if (jCopyrightScrollPane
== null) {
446 jCopyrightScrollPane
= new JScrollPane();
447 jCopyrightScrollPane
.setBounds(new java
.awt
.Rectangle(valueColumn
, rowFour
, valueWidth
, threeRowHeight
));
448 jCopyrightScrollPane
.setHorizontalScrollBarPolicy(javax
.swing
.JScrollPane
.HORIZONTAL_SCROLLBAR_NEVER
);
449 jCopyrightScrollPane
.setPreferredSize(new java
.awt
.Dimension(valueWidth
, threeRowHeight
));
450 jCopyrightScrollPane
.setViewportView(getJCopyrightTextArea());
452 return jCopyrightScrollPane
;
455 This method initializes jTextFieldCopyright
457 @return javax.swing.JTextField jTextFieldCopyright
460 private JTextArea
getJCopyrightTextArea() {
461 if (jCopyrightTextArea
== null) {
462 jCopyrightTextArea
= new JTextArea();
463 jCopyrightTextArea
.setWrapStyleWord(true);
464 jCopyrightTextArea
.addFocusListener(new FocusAdapter(){
465 public void focusLost(FocusEvent e
) {
466 if (!DataValidation
.isCopyright(jCopyrightTextArea
.getText())) {
467 JOptionPane
.showMessageDialog(frame
, "Copyright must be entered.");
470 if (jCopyrightTextArea
.getText().equals(ffc
.getFpdHdrCopyright())) {
473 docConsole
.setSaved(false);
474 ffc
.setFpdHdrCopyright(jCopyrightTextArea
.getText());
478 return jCopyrightTextArea
;
482 * This method initializes jTextField
484 * @return javax.swing.JTextField
486 private JTextField
getJTextFieldUrl() {
487 if (jTextFieldUrl
== null) {
488 jTextFieldUrl
= new JTextField();
489 jTextFieldUrl
.setBounds(new java
.awt
.Rectangle(valueColumn
,rowSix
,valueWidth
,oneRowHeight
));
490 jTextFieldUrl
.setPreferredSize(new Dimension(valueWidth
, oneRowHeight
));
491 jTextFieldUrl
.addFocusListener(new FocusAdapter(){
492 public void focusLost(FocusEvent e
){
493 if (jTextFieldUrl
.getText().length() == 0 && ffc
.getFpdHdrUrl() == null) {
496 if (jTextFieldUrl
.getText().equals(ffc
.getFpdHdrUrl())) {
499 ffc
.setFpdHdrLicense(jTextAreaLicense
.getText());
500 ffc
.setFpdHdrUrl(jTextFieldUrl
.getText());
501 docConsole
.setSaved(false);
505 return jTextFieldUrl
;
508 public static void main(String
[] args
) {
509 new FpdHeader().setVisible(true);
513 This is the default constructor
519 this.setVisible(true);
523 This is the override edit constructor
525 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
528 public FpdHeader(PlatformSurfaceAreaDocument
.PlatformSurfaceArea inFpd
) {
530 ffc
= new FpdFileContents(inFpd
);
535 public FpdHeader(OpeningPlatformType opt
) {
536 this(opt
.getXmlFpd());
541 This method initializes this
544 private void init() {
545 //this.setSize(500, 515);
546 this.setContentPane(getJContentPane());
547 this.setTitle("Platform Surface Area Header");
553 This method initializes this
554 Fill values to all fields if these values are not empty
556 @param inFpdHeader The input data of FpdHeaderDocument.FpdHeader
559 private void init(FpdFileContents ffc
) {
561 if (ffc
.getFpdHdrPlatformName() != null) {
562 jTextFieldBaseName
.setText(ffc
.getFpdHdrPlatformName());
564 if (ffc
.getFpdHdrGuidValue() != null) {
565 jTextFieldGuid
.setText(ffc
.getFpdHdrGuidValue());
567 if (ffc
.getFpdHdrVer() != null) {
568 jTextFieldVersion
.setText(ffc
.getFpdHdrVer());
570 if (ffc
.getFpdHdrLicense() != null) {
571 jTextAreaLicense
.setText(ffc
.getFpdHdrLicense());
573 if (ffc
.getFpdHdrAbs() != null) {
574 jTextFieldAbstract
.setText(ffc
.getFpdHdrAbs());
576 if (ffc
.getFpdHdrUrl() != null) {
577 jTextFieldUrl
.setText(ffc
.getFpdHdrUrl());
579 if (ffc
.getFpdHdrCopyright() != null) {
580 jCopyrightTextArea
.setText(ffc
.getFpdHdrCopyright());
582 if (ffc
.getFpdHdrDescription() != null) {
583 jTextAreaDescription
.setText(ffc
.getFpdHdrDescription());
585 if (ffc
.getFpdHdrSpec() != null) {
586 jTextFieldSpecification
.setText(ffc
.getFpdHdrSpec());
588 ffc
.setFpdHdrSpec(jTextFieldSpecification
.getText());
590 ffc
.genPlatformDefsSkuInfo("0", "DEFAULT");
591 Vector
<Object
> v
= new Vector
<Object
>();
592 ffc
.getPlatformDefsSupportedArchs(v
);
595 ffc
.setPlatformDefsSupportedArchs(v
);
597 v
.removeAllElements();
598 ffc
.getPlatformDefsBuildTargets(v
);
601 ffc
.setPlatformDefsBuildTargets(v
);
603 if (ffc
.getPlatformDefsInterDir() == null) {
604 ffc
.setPlatformDefsInterDir("UNIFIED");
609 This method initializes jContentPane
611 @return javax.swing.JPanel jContentPane
614 private JPanel
getJContentPane() {
615 if (jContentPane
== null) {
616 jContentPane
= new JPanel();
617 jContentPane
.setLayout(null);
618 jContentPane
.setLocation(new java
.awt
.Point(0, 0));
619 jContentPane
.setSize(new java
.awt
.Dimension(dialogWidth
- 20 ,dialogHeight
- 20));
621 jLabel
= new JLabel();
622 jLabel
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowSix
,labelWidth
,oneRowHeight
));
623 jLabel
.setText("URL");
624 jLabelAbstract
= new JLabel();
625 jLabelAbstract
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowSeven
,labelWidth
,oneRowHeight
));
626 jLabelAbstract
.setText("Abstract");
627 jLabelDescription
= new JLabel();
628 jLabelDescription
.setText("Description");
629 jLabelDescription
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowEight
,labelWidth
,oneRowHeight
));
630 jLabelCopyright
= new JLabel();
631 jLabelCopyright
.setText("Copyright");
632 jLabelCopyright
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowFour
,labelWidth
,oneRowHeight
));
633 jLabelLicense
= new JLabel();
634 jLabelLicense
.setText("License");
635 jLabelLicense
.setBounds(new java
.awt
.Rectangle(labelColumn
,rowFive
,labelWidth
,oneRowHeight
));
636 jLabelVersion
= new JLabel();
637 jLabelVersion
.setText("Version");
638 jLabelVersion
.setBounds(new java
.awt
.Rectangle(labelColumn
, rowThree
, labelWidth
, oneRowHeight
));
639 jLabelGuid
= new JLabel();
640 jLabelGuid
.setPreferredSize(new java
.awt
.Dimension(labelWidth
, oneRowHeight
));
641 jLabelGuid
.setBounds(new java
.awt
.Rectangle(labelColumn
, rowTwo
, labelWidth
, oneRowHeight
));
642 jLabelGuid
.setText("Guid");
643 jLabelBaseName
= new JLabel();
644 jLabelBaseName
.setText("Platform Name");
645 jLabelBaseName
.setBounds(new java
.awt
.Rectangle(labelColumn
, rowOne
, labelWidth
, oneRowHeight
));
646 jStarLabel1
= new StarLabel();
647 jStarLabel1
.setLocation(new java
.awt
.Point(0, rowOne
));
648 jStarLabel2
= new StarLabel();
649 jStarLabel2
.setLocation(new java
.awt
.Point(0, rowTwo
));
650 jStarLabel3
= new StarLabel();
651 jStarLabel3
.setLocation(new java
.awt
.Point(0, rowThree
));
652 jStarLabel4
= new StarLabel();
653 jStarLabel4
.setLocation(new java
.awt
.Point(0,rowFour
));
654 jStarLabel5
= new StarLabel();
655 jStarLabel5
.setLocation(new java
.awt
.Point(0,rowFive
));
656 jStarLabel7
= new StarLabel();
657 jStarLabel7
.setLocation(new java
.awt
.Point(0,rowSeven
));
658 jStarLabel8
= new StarLabel();
659 jStarLabel8
.setLocation(new java
.awt
.Point(0,rowEight
));
661 jContentPane
.add(jLabelBaseName
, null);
662 jContentPane
.add(getJTextFieldBaseName(), null);
663 jContentPane
.add(jLabelGuid
, null);
664 jContentPane
.add(getJTextFieldGuid(), null);
665 jContentPane
.add(jLabelVersion
, null);
666 jContentPane
.add(getJTextFieldVersion(), null);
667 jContentPane
.add(getJButtonGenerateGuid(), null);
668 jContentPane
.add(jLabelLicense
, null);
669 jContentPane
.add(jLabelCopyright
, null);
670 jContentPane
.add(jLabelDescription
, null);
671 jContentPane
.add(getJTextFieldSpecification(), null);
672 jContentPane
.add(getJButtonOk(), null);
673 jContentPane
.add(getJButtonCancel(), null);
674 jContentPane
.add(getJScrollPaneLicense(), null);
675 jContentPane
.add(getJScrollPaneDescription(), null);
676 jContentPane
.add(jLabelAbstract
, null);
677 jContentPane
.add(getJTextFieldAbstract(), null);
679 jContentPane
.add(jStarLabel1
, null);
680 jContentPane
.add(jStarLabel2
, null);
681 jContentPane
.add(jStarLabel3
, null);
682 jContentPane
.add(jStarLabel4
, null);
683 jContentPane
.add(jStarLabel5
, null);
684 jContentPane
.add(jStarLabel7
, null);
685 jContentPane
.add(jStarLabel8
, null);
686 jContentPane
.add(getCopyrightScrollPane(), null);
688 jContentPane
.add(jLabel
, null);
689 jContentPane
.add(getJTextFieldUrl(), null);
695 * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
697 * Override actionPerformed to listen all actions
700 public void actionPerformed(ActionEvent arg0
) {
702 if (arg0
.getSource() == jButtonGenerateGuid
) {
703 docConsole
.setSaved(false);
704 jTextFieldGuid
.setText(Tools
.generateUuidString());
705 ffc
.setFpdHdrGuidValue(jTextFieldGuid
.getText());
711 This method initializes Package type and Compontent type
714 private void initFrame() {
720 * @see java.awt.event.ComponentListener#componentResized(java.awt.event.ComponentEvent)
722 * Override componentResized to resize all components when frame's size is changed
724 public void componentResized(ComponentEvent arg0
) {
725 int intPreferredWidth
= dialogWidth
;
726 int intCurrentWidth
= this.getJContentPane().getWidth();
728 // Tools.resizeComponentWidth(this.jTextFieldBaseName, this.getWidth(), intPreferredWidth);
729 // Tools.resizeComponentWidth(this.jTextFieldGuid, this.getWidth(), intPreferredWidth);
730 // Tools.relocateComponentX(this.jButtonGenerateGuid, this.getWidth(), jButtonGenerateGuid.getWidth(), 25);
731 // Tools.resizeComponentWidth(this.jTextFieldVersion, this.getWidth(), intPreferredWidth);
732 // Tools.resizeComponentWidth(this.jTextFieldCopyright, this.getWidth(), intPreferredWidth);
733 Tools
.resizeComponentWidth(this.jScrollPaneLicense
, intCurrentWidth
, intPreferredWidth
);
734 Tools
.resizeComponentWidth(this.jTextFieldUrl
, intCurrentWidth
, intPreferredWidth
);
735 Tools
.resizeComponentWidth(this.jTextFieldAbstract
, intCurrentWidth
, intPreferredWidth
);
736 Tools
.resizeComponentWidth(this.jScrollPaneDescription
, intCurrentWidth
, intPreferredWidth
);
737 // Tools.resizeComponentWidth(this.jTextFieldSpecification, this.getWidth(), intPreferredWidth);