]>
Commit | Line | Data |
---|---|---|
8f9acbd7 | 1 | package org.tianocore.frameworkwizard;\r |
2 | \r | |
3 | import java.awt.event.ActionEvent;\r | |
4 | import java.awt.event.ActionListener;\r | |
5 | \r | |
6 | import javax.swing.JFrame;\r | |
7 | import javax.swing.JPanel;\r | |
8 | import javax.swing.JTextPane;\r | |
9 | \r | |
10 | import org.tianocore.frameworkwizard.common.DataType;\r | |
11 | import javax.swing.JButton;\r | |
12 | \r | |
13 | \r | |
14 | public class ToolChainConfigHelp extends JFrame implements ActionListener {\r | |
15 | \r | |
16 | ///\r | |
17 | ///\r | |
18 | ///\r | |
19 | private static final long serialVersionUID = -6315081029366587222L;\r | |
20 | \r | |
21 | private JPanel jContentPane = null;\r | |
22 | \r | |
23 | private String helpContent = "";\r | |
24 | \r | |
25 | private JTextPane jTextPane = null;\r | |
26 | \r | |
27 | private JButton jButtonClose = null;\r | |
8f4f211c | 28 | \r |
29 | private static ToolChainConfigHelp tcch = null;\r | |
8f9acbd7 | 30 | \r |
31 | /**\r | |
32 | * This method initializes jTextPane \r | |
33 | * \r | |
34 | * @return javax.swing.JTextPane \r | |
35 | */\r | |
36 | private JTextPane getJTextPane() {\r | |
37 | if (jTextPane == null) {\r | |
38 | jTextPane = new JTextPane();\r | |
39 | jTextPane.setBounds(new java.awt.Rectangle(10,10,600,420));\r | |
40 | jTextPane.setBackground(new java.awt.Color(238,238,238));\r | |
41 | jTextPane.setEditable(false);\r | |
42 | helpContent = helpContent\r | |
ea7f8a93 | 43 | + "The template for the Property is: TARGET_TAGNAME_ARCH_COMMAND_ATTR" + DataType.UNIX_LINE_SEPARATOR\r |
44 | + "The Value, is either a full path, full path and filename or a reserved word." + DataType.UNIX_LINE_SEPARATOR\r | |
8f9acbd7 | 45 | + DataType.UNIX_LINE_SEPARATOR\r |
46 | + DataType.UNIX_LINE_SEPARATOR\r | |
47 | + "TARGET - DEBUG and RELEASE are predefined, however the user may define one or more of their own TARGET types in this file." + DataType.UNIX_LINE_SEPARATOR\r | |
48 | + DataType.UNIX_LINE_SEPARATOR\r | |
49 | + "TAGNAME - HOST, MSFT, GCC, INTC are predefined, however the user may define one or more of their own TAGNAME keywords in this file." + DataType.UNIX_LINE_SEPARATOR\r | |
50 | + DataType.UNIX_LINE_SEPARATOR\r | |
51 | + "ARCH - EDK II supports IA32, X64, IPF and EBC at this time." + DataType.UNIX_LINE_SEPARATOR\r | |
52 | + DataType.UNIX_LINE_SEPARATOR\r | |
53 | + "COMMAND - Predefined command codes are listed in the tools_def.txt file, however the user can specify additional command codes for their one, non-standard tools." + DataType.UNIX_LINE_SEPARATOR\r | |
54 | + DataType.UNIX_LINE_SEPARATOR\r | |
55 | + "ATTR - Predefined Attributes are listed in the tools_def.txt file." + DataType.UNIX_LINE_SEPARATOR\r | |
56 | + DataType.UNIX_LINE_SEPARATOR\r | |
57 | + "NOTE: The TAGNAME: HOST is reserved and MUST be defined in order to build the included Tiano tools from their C source files. These tools have been built and tested using both Microsoft and GCC tool chains." + DataType.UNIX_LINE_SEPARATOR\r | |
58 | + DataType.UNIX_LINE_SEPARATOR\r | |
59 | + "NOTE: The \"*\" symbol may be used as a wildcard character in most of these fields, refer to the tools_def.txt and the \"EDK II Build and Packaging Architecture Specification\" for more details." + DataType.UNIX_LINE_SEPARATOR\r | |
60 | + DataType.UNIX_LINE_SEPARATOR;\r | |
61 | \r | |
8f9acbd7 | 62 | jTextPane.setText(helpContent);\r |
63 | }\r | |
64 | return jTextPane;\r | |
65 | }\r | |
66 | \r | |
67 | /**\r | |
68 | * This method initializes jButtonClose \r | |
69 | * \r | |
70 | * @return javax.swing.JButton \r | |
71 | */\r | |
72 | private JButton getJButtonClose() {\r | |
73 | if (jButtonClose == null) {\r | |
74 | jButtonClose = new JButton();\r | |
75 | jButtonClose.setBounds(new java.awt.Rectangle(480,450,80,20));\r | |
76 | jButtonClose.setText("Close");\r | |
77 | jButtonClose.addActionListener(this);\r | |
78 | }\r | |
79 | return jButtonClose;\r | |
80 | }\r | |
81 | \r | |
8f4f211c | 82 | public static ToolChainConfigHelp getInstance() {\r |
83 | if (tcch == null) {\r | |
84 | tcch = new ToolChainConfigHelp();\r | |
85 | }\r | |
86 | return tcch;\r | |
87 | }\r | |
88 | \r | |
8f9acbd7 | 89 | /**\r |
90 | \r | |
91 | @param args\r | |
92 | \r | |
93 | **/\r | |
94 | public static void main(String[] args) {\r | |
95 | ToolChainConfigHelp tcch = new ToolChainConfigHelp();\r | |
96 | tcch.setVisible(true);\r | |
97 | }\r | |
98 | \r | |
99 | /**\r | |
100 | * This is the default constructor\r | |
101 | */\r | |
102 | public ToolChainConfigHelp() {\r | |
103 | super();\r | |
104 | initialize();\r | |
105 | }\r | |
106 | \r | |
107 | /**\r | |
108 | * This method initializes this\r | |
109 | * \r | |
110 | * @return void\r | |
111 | */\r | |
112 | private void initialize() {\r | |
113 | this.setSize(625, 520);\r | |
8f4f211c | 114 | this.setResizable(false);\r |
ea7f8a93 | 115 | this.setTitle("How to Modify a Tool Chain Configuration");\r |
8f9acbd7 | 116 | this.setContentPane(getJContentPane());\r |
117 | }\r | |
118 | \r | |
119 | /**\r | |
120 | * This method initializes jContentPane\r | |
121 | * \r | |
122 | * @return javax.swing.JPanel\r | |
123 | */\r | |
124 | private JPanel getJContentPane() {\r | |
125 | if (jContentPane == null) {\r | |
126 | jContentPane = new JPanel();\r | |
127 | jContentPane.setLayout(null);\r | |
128 | jContentPane.add(getJTextPane(), null);\r | |
129 | jContentPane.add(getJButtonClose(), null);\r | |
130 | }\r | |
131 | return jContentPane;\r | |
132 | }\r | |
133 | \r | |
134 | public void actionPerformed(ActionEvent arg0) {\r | |
135 | if (arg0.getSource() == jButtonClose) {\r | |
136 | this.dispose();\r | |
137 | }\r | |
8f9acbd7 | 138 | }\r |
8f9acbd7 | 139 | }\r |