]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/FrameworkWizard/src/org/tianocore/frameworkwizard/common/ui/IDefaultMutableTreeNode.java
Changed spelling to manifest
[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_HIIPACKAGES = 112;
64
65 public static final int MSA_GUIDS = 113;
66
67 public static final int MSA_EXTERNS = 114;
68
69 public static final int MSA_PCDS = 115;
70
71 public static final int MSA_BUILDOPTIONS = 117;
72
73 public static final int MSA_USEREXTENSIONS = 118;
74
75 public static final int MSA_MODULEDEFINITIONS = 119;
76
77 public static final int SPD_HEADER = 200;
78
79 public static final int SPD_LIBRARYCLASSDECLARATIONS = 201;
80
81 public static final int SPD_MSAFILES = 202;
82
83 public static final int SPD_PACKAGEHEADERS = 203;
84
85 public static final int SPD_GUIDDECLARATIONS = 204;
86
87 public static final int SPD_PROTOCOLDECLARATIONS = 205;
88
89 public static final int SPD_PPIDECLARATIONS = 206;
90
91 public static final int SPD_PCDDECLARATIONS = 207;
92
93 public static final int SPD_PACKAGEDEFINITIONS = 208;
94
95 public static final int SPD_INDUSTRYSTDINCLUDES = 209;
96
97 public static final int FPD_PLATFORMHEADER = 300;
98
99 public static final int FPD_FLASH = 301;
100
101 public static final int FPD_FRAMEWORKMODULES = 302;
102
103 public static final int FPD_PCDDYNAMICBUILDDECLARATIONS = 303;
104
105 public static final int FPD_BUILDOPTIONS = 304;
106
107 public static final int FPD_PLATFORMDEFINITIONS = 305;
108
109 public static final int WORKSPACE = 0;
110
111 public static final int MODULE_DESCRIPTION = 1;
112
113 public static final int PACKAGE_DESCRIPTION = 2;
114
115 public static final int PLATFORM_DESCRIPTION = 3;
116
117 public static final int MODULE = 4;
118
119 public static final int PACKAGE = 5;
120
121 public static final int PLATFORM = 6;
122
123 public static final int MODULE_PACKAGE = 7;
124
125 public static final int MODULE_PACKAGE_LIBRARY = 8;
126
127 public static final int MODULE_PACKAGE_MODULE = 9;
128
129 //
130 //Static final definitions for operation
131 //
132 public static final int OPERATION_NULL = 0;
133
134 public static final int OPERATION_ADD = 1;
135
136 public static final int OPERATION_UPDATE = 2;
137
138 public static final int OPERATION_DELETE = 4;
139
140 public static final int OPERATION_ADD_UPDATE = 3;
141
142 public static final int OPERATION_ADD_DELETE = 5;
143
144 public static final int OPERATION_UPDATE_DELETE = 6;
145
146 public static final int OPERATION_ADD_UPDATE_DELETE = 7;
147
148 //
149 //Define 4 node attributes
150 //
151 private int category = 0;
152
153 private String nodeName = "";
154
155 private boolean isOpening = false;
156
157 private Identification id = null;
158
159 private IDefaultMutableTreeNode belongNode = null;
160
161 /**
162 This is the default constructor
163
164 **/
165 public IDefaultMutableTreeNode() {
166 super();
167 }
168
169 /**
170 This is the overrided constructor
171 Init clase members with input data
172
173 @param strNodeName The name of node
174 @param intCategory The category of node
175 @param bolIsOpened to identify if the node is opening or not
176 @param identification The Identification of node
177
178 **/
179 public IDefaultMutableTreeNode(String strNodeName, int intCategory, boolean bolIsOpening,
180 Identification identification, IDefaultMutableTreeNode idmtBelongNode) {
181 super(strNodeName);
182 this.nodeName = strNodeName;
183 this.category = intCategory;
184 this.isOpening = bolIsOpening;
185 this.id = identification;
186 this.belongNode = idmtBelongNode;
187 }
188
189 /**
190 Get category of node
191
192 @return The category of node
193
194 **/
195 public int getCategory() {
196 return category;
197 }
198
199 /**
200 Set category of node
201
202 @param category The input data of node category
203
204 **/
205 public void setCategory(int category) {
206 this.category = category;
207 }
208
209 /**
210 Get name of node
211
212 @return The name of node
213
214 **/
215 public String getNodeName() {
216 return nodeName;
217 }
218
219 /**
220 Set name of node
221
222 @param nodeName The input data of node name
223
224 **/
225 public void setNodeName(String nodeName) {
226 this.nodeName = nodeName;
227 }
228
229 /**
230 Get identification of node
231
232 @return
233
234 **/
235 public Identification getId() {
236 return id;
237 }
238
239 /**
240 Set identification of node
241
242 @param id
243
244 **/
245 public void setId(Identification id) {
246 this.id = id;
247 }
248
249 /**
250 get isOpening of node
251
252 @return
253
254 **/
255 public boolean isOpening() {
256 return isOpening;
257 }
258
259 /**
260 Set isOpening of node
261
262 @param isOpening
263
264 **/
265 public void setOpening(boolean isOpening) {
266 this.isOpening = isOpening;
267 }
268
269 public String toString() {
270 return this.nodeName;
271 }
272
273 public IDefaultMutableTreeNode getBelongNode() {
274 return belongNode;
275 }
276
277 public void setBelongNode(IDefaultMutableTreeNode belongNode) {
278 this.belongNode = belongNode;
279 }
280 }