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