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