]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java
1. Restructure module description on main UI
[mirror_edk2.git] / Tools / Source / FrameworkWizard / src / org / tianocore / frameworkwizard / common / ui / IDefaultMutableTreeNode.java
CommitLineData
a13899c5 1/** @file\r
2 \r
3 \r
4 The file is used to override DefaultMutableTreeNode to provides customized interfaces \r
5 \r
6 Copyright (c) 2006, Intel Corporation\r
7 All rights reserved. This program and the accompanying materials\r
8 are licensed and made available under the terms and conditions of the BSD License\r
9 which accompanies this distribution. The full text of the license may be found at\r
10 http://opensource.org/licenses/bsd-license.php\r
11 \r
12 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14 \r
15 **/\r
16\r
17package org.tianocore.frameworkwizard.common.ui;\r
18\r
19import javax.swing.tree.DefaultMutableTreeNode;\r
20\r
79cb6fdb 21import org.tianocore.frameworkwizard.common.Identifications.Identification;\r
a13899c5 22\r
23/**\r
24 The class is used to override DefaultMutableTreeNode to provides customized interfaces\r
25 It extends DefaultMutableTreeNode\r
26 \r
27\r
28 \r
29 **/\r
30public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {\r
31 ///\r
32 /// Define class Serial Version UID\r
33 ///\r
34 private static final long serialVersionUID = -1947340717458069548L;\r
35\r
36 //\r
37 // Static final definitions for all kinds of node\r
38 //\r
39 public static final int MSA_HEADER = 100;\r
40\r
41 public static final int MSA_LIBRARYCLASSDEFINITIONS = 101;\r
42 \r
43 public static final int MSA_PACKAGEDEPENDENCIES = 102;\r
44 \r
45 public static final int MSA_SOURCEFILES = 103;\r
46\r
47 public static final int MSA_PROTOCOLS = 104;\r
48\r
49 public static final int MSA_EVENTS = 105;\r
50\r
51 public static final int MSA_HOBS = 106;\r
52\r
53 public static final int MSA_PPIS = 107;\r
54\r
55 public static final int MSA_VARIABLES = 108;\r
56\r
57 public static final int MSA_BOOTMODES = 109;\r
58\r
59 public static final int MSA_SYSTEMTABLES = 110;\r
60\r
61 public static final int MSA_DATAHUBS = 111;\r
62\r
63 //public static final int MSA_FORMSETS = 112;\r
64 \r
65 public static final int MSA_HIIPACKAGES = 112;\r
66\r
67 public static final int MSA_GUIDS = 113;\r
68\r
69 public static final int MSA_EXTERNS = 114;\r
70\r
71 public static final int MSA_PCDS = 115;\r
72 \r
73 public static final int MSA_BUILDOPTIONS = 117;\r
74 \r
75 public static final int MSA_USEREXTENSIONS = 118;\r
76 \r
77 public static final int MSA_MODULEDEFINITIONS = 119;\r
78 \r
79 public static final int SPD_HEADER = 200;\r
80 \r
81 public static final int SPD_LIBRARYCLASSDECLARATIONS = 201;\r
82 \r
83 public static final int SPD_MSAFILES = 202;\r
84 \r
85 public static final int SPD_PACKAGEHEADERS = 203;\r
86 \r
87 public static final int SPD_GUIDDECLARATIONS = 204;\r
88 \r
89 public static final int SPD_PROTOCOLDECLARATIONS = 205;\r
90 \r
91 public static final int SPD_PPIDECLARATIONS = 206;\r
92 \r
93 public static final int SPD_PCDDECLARATIONS = 207;\r
94 \r
95 public static final int SPD_PACKAGEDEFINITIONS = 208;\r
96 \r
97 public static final int SPD_INDUSTRYSTDINCLUDES = 209;\r
98 \r
99 public static final int FPD_PLATFORMHEADER = 300;\r
100 \r
101 public static final int FPD_FLASH = 301;\r
102 \r
103 public static final int FPD_FRAMEWORKMODULES = 302;\r
104 \r
105 public static final int FPD_PCDDYNAMICBUILDDECLARATIONS = 303;\r
106 \r
107 public static final int FPD_BUILDOPTIONS = 304;\r
108 \r
109 public static final int FPD_PLATFORMDEFINITIONS = 305;\r
110 \r
111 public static final int WORKSPACE = 0;\r
112 \r
113 public static final int MODULE = 1;\r
114\r
115 public static final int PACKAGE = 2;\r
116\r
117 public static final int PLATFORM = 3;\r
92e29378 118 \r
119 public static final int MODULE_PACKAGE = 4;\r
120 \r
121 public static final int MODULE_PACKAGE_LIBRARY = 5;\r
122 \r
123 public static final int MODULE_PACKAGE_MODULE = 6;\r
a13899c5 124\r
125 //\r
126 //Static final definitions for operation\r
127 //\r
128 public static final int OPERATION_NULL = 0;\r
129\r
130 public static final int OPERATION_ADD = 1;\r
131\r
132 public static final int OPERATION_UPDATE = 2;\r
133\r
134 public static final int OPERATION_DELETE = 4;\r
135\r
136 public static final int OPERATION_ADD_UPDATE = 3;\r
137\r
138 public static final int OPERATION_ADD_DELETE = 5;\r
139\r
140 public static final int OPERATION_UPDATE_DELETE = 6;\r
141\r
142 public static final int OPERATION_ADD_UPDATE_DELETE = 7;\r
143\r
144 //\r
145 //Define 4 node attributes\r
146 //\r
147 private int category = 0;\r
148\r
149 private int operation = 0;\r
150\r
151 private int location = 0;\r
152\r
153 private String nodeName = "";\r
154\r
155 private boolean isOpening = false;\r
156\r
157 private Identification id = null;\r
158\r
159 /**\r
160 Main class, reserved for test\r
161 \r
162 @param args\r
163 \r
164 **/\r
165 public static void main(String[] args) {\r
166 // TODO Auto-generated method stub\r
167\r
168 }\r
169\r
170 /**\r
171 This is the default constructor\r
172 \r
173 **/\r
174 public IDefaultMutableTreeNode() {\r
175 super();\r
176 }\r
177\r
178 /**\r
179 This is the overrided constructor\r
180 Init clase members with input data\r
181 \r
182 @param strNodeName The name of node\r
183 @param intCategory The category of node\r
184 @param bolIsOpened to identify if the node is opening or not\r
185 @param identification The Identification of node\r
186 \r
187 **/\r
188 public IDefaultMutableTreeNode(String strNodeName, int intCategory, boolean bolIsOpening,\r
189 Identification identification) {\r
190 super(strNodeName);\r
191 this.nodeName = strNodeName;\r
192 this.category = intCategory;\r
193 this.isOpening = bolIsOpening;\r
194 this.id = identification;\r
195 }\r
196\r
197 /**\r
198 This is the overrided constructor\r
199 Init clase members with input data\r
200 \r
201 @param strNodeName The name of node\r
202 @param intCategory The category of node\r
203 @param intOperation The operation of node\r
204 \r
205 **/\r
206 public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation) {\r
207 super(strNodeName);\r
208 this.nodeName = strNodeName;\r
209 this.category = intCategory;\r
210 this.operation = intOperation;\r
211 }\r
212\r
213 /**\r
214 This is the overrided constructor\r
215 Init clase members with input data\r
216 \r
217 @param strNodeName The name of node\r
218 @param intCategory The category of node\r
219 @param intOperation The operation of node\r
220 @param intLocation The location of node\r
221 \r
222 **/\r
223 public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation, int intLocation) {\r
224 super(strNodeName);\r
225 this.nodeName = strNodeName;\r
226 this.category = intCategory;\r
227 this.operation = intOperation;\r
228 this.location = intLocation;\r
229 }\r
230\r
231 /**\r
232 Get category of node \r
233 \r
234 @return The category of node\r
235 \r
236 **/\r
237 public int getCategory() {\r
238 return category;\r
239 }\r
240\r
241 /**\r
242 Set category of node\r
243 \r
244 @param category The input data of node category\r
245 \r
246 **/\r
247 public void setCategory(int category) {\r
248 this.category = category;\r
249 }\r
250\r
251 /**\r
252 Get name of node\r
253 \r
254 @return The name of node\r
255 \r
256 **/\r
257 public String getNodeName() {\r
258 return nodeName;\r
259 }\r
260\r
261 /**\r
262 Set name of node\r
263 \r
264 @param nodeName The input data of node name\r
265 \r
266 **/\r
267 public void setNodeName(String nodeName) {\r
268 this.nodeName = nodeName;\r
269 }\r
270\r
271 /**\r
272 Get operation of node\r
273 \r
274 @return The operation of node\r
275 \r
276 **/\r
277 public int getOperation() {\r
278 return operation;\r
279 }\r
280\r
281 /**\r
282 Set operation of node\r
283 \r
284 @param operation The input data of node operation\r
285 \r
286 **/\r
287 public void setOperation(int operation) {\r
288 this.operation = operation;\r
289 }\r
290\r
291 /**\r
292 Get location of node\r
293 \r
294 @return The location of node\r
295 \r
296 **/\r
297 public int getLocation() {\r
298 return location;\r
299 }\r
300\r
301 /**\r
302 Set location of node\r
303 \r
304 @param location The input data of node location\r
305 \r
306 **/\r
307 public void setLocation(int location) {\r
308 this.location = location;\r
309 }\r
310\r
311 /**\r
312 Get identification of node\r
313 \r
314 @return\r
315 \r
316 **/\r
317 public Identification getId() {\r
318 return id;\r
319 }\r
320\r
321 /**\r
322 Set identification of node\r
323 \r
324 @param id\r
325 \r
326 **/\r
327 public void setId(Identification id) {\r
328 this.id = id;\r
329 }\r
330\r
331 /**\r
332 get isOpening of node\r
333 \r
334 @return\r
335 \r
336 **/\r
337 public boolean isOpening() {\r
338 return isOpening;\r
339 }\r
340\r
341 /**\r
342 Set isOpening of node\r
343 \r
344 @param isOpening\r
345 \r
346 **/\r
347 public void setOpening(boolean isOpening) {\r
348 this.isOpening = isOpening;\r
349 }\r
350}\r