]> git.proxmox.com Git - mirror_edk2.git/blob - Tools/Source/ModuleEditor/src/org/tianocore/packaging/common/ui/IDefaultMutableTreeNode.java
Initial import.
[mirror_edk2.git] / Tools / Source / ModuleEditor / src / org / tianocore / packaging / 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.packaging.common.ui;
18
19 import javax.swing.tree.DefaultMutableTreeNode;
20
21 /**
22 The class is used to override DefaultMutableTreeNode to provides customized interfaces
23 It extends DefaultMutableTreeNode
24
25 @since ModuleEditor 1.0
26
27 **/
28 public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {
29 ///
30 /// Define class Serial Version UID
31 ///
32 private static final long serialVersionUID = -1947340717458069548L;
33
34 //
35 //Static final definitions for all kinds of node
36 //
37 public static final int MSA_HEADER = 0;
38
39 public static final int LIBRARYCLASSDEFINITIONS = 1;
40
41 public static final int SOURCEFILES = 2;
42
43 public static final int INCLUDES = 3;
44
45 public static final int PROTOCOLS = 4;
46
47 public static final int EVENTS = 5;
48
49 public static final int HOBS = 6;
50
51 public static final int PPIS = 7;
52
53 public static final int VARIABLES = 8;
54
55 public static final int BOOTMODES = 9;
56
57 public static final int SYSTEMTABLES = 10;
58
59 public static final int DATAHUBS = 11;
60
61 public static final int FORMSETS = 12;
62
63 public static final int GUIDS = 13;
64
65 public static final int EXTERNS = 14;
66
67 public static final int PCDS = 15;
68
69 public static final int MBD_HEADER = 20;
70
71 public static final int MLSA_HEADER = 21;
72
73 public static final int MLBD_HEADER = 22;
74
75 public static final int LIBRARIES = 23;
76
77 public static final int LIBRARY_CLASS_DEFINITION = 101;
78
79 public static final int SOURCEFILES_FILENAME = 210;
80
81 public static final int SOURCEFILES_FILENAME_ITEM = 211;
82
83 public static final int SOURCEFILES_ARCH = 220;
84
85 public static final int SOURCEFILES_ARCH_ITEM = 221;
86
87 public static final int INCLUDES_PACKAGENAME = 310;
88
89 public static final int INCLUDES_PACKAGENAME_ITEM = 311;
90
91 public static final int INCLUDES_ARCH = 320;
92
93 public static final int INCLUDES_ARCH_ITEM = 321;
94
95 public static final int PROTOCOLS_PROTOCOL = 410;
96
97 public static final int PROTOCOLS_PROTOCOL_ITEM = 411;
98
99 public static final int PROTOCOLS_PROTOCOLNOTIFY = 420;
100
101 public static final int PROTOCOLS_PROTOCOLNOTIFY_ITEM = 421;
102
103 public static final int EVENTS_CREATEEVENTS = 510;
104
105 public static final int EVENTS_CREATEEVENTS_ITEM = 511;
106
107 public static final int EVENTS_SIGNALEVENTS = 520;
108
109 public static final int EVENTS_SIGNALEVENTS_ITEM = 521;
110
111 public static final int HOBS_HOB_ITEM = 611;
112
113 public static final int PPIS_PPI = 710;
114
115 public static final int PPIS_PPI_ITEM = 711;
116
117 public static final int PPIS_PPINOTIFY = 720;
118
119 public static final int PPIS_PPINOTIFY_ITEM = 721;
120
121 public static final int VARIABLES_VARIABLE_ITEM = 811;
122
123 public static final int BOOTMODES_BOOTMODE_ITEM = 911;
124
125 public static final int SYSTEMTABLES_SYSTEMTABLE_ITEM = 1011;
126
127 public static final int DATAHUBS_DATAHUB_ITEM = 1111;
128
129 public static final int FORMSETS_FORMSET_ITEM = 1211;
130
131 public static final int GUIDS_GUIDENTRY_ITEM = 1311;
132
133 public static final int EXTERNS_EXTERN_ITEM = 1411;
134
135 public static final int PCDS_PCDDATA_ITEM = 1511;
136
137 public static final int LIBRARIES_LIBRARY = 2310;
138
139 public static final int LIBRARIES_LIBRARY_ITEM = 2311;
140
141 public static final int LIBRARIES_ARCH = 2320;
142
143 public static final int LIBRARIES_ARCH_ITEM = 2321;
144
145 //
146 //Static final definitions for operation
147 //
148 public static final int OPERATION_NULL = 0;
149
150 public static final int OPERATION_ADD = 1;
151
152 public static final int OPERATION_UPDATE = 2;
153
154 public static final int OPERATION_DELETE = 4;
155
156 public static final int OPERATION_ADD_UPDATE = 3;
157
158 public static final int OPERATION_ADD_DELETE = 5;
159
160 public static final int OPERATION_UPDATE_DELETE = 6;
161
162 public static final int OPERATION_ADD_UPDATE_DELETE = 7;
163
164 //
165 //Define 4 node attributes
166 //
167 private int category = 0;
168
169 private int operation = 0;
170
171 private int location = 0;
172
173 private String nodeName = "";
174
175 /**
176 Main class, reserved for test
177
178 @param args
179
180 **/
181 public static void main(String[] args) {
182 // TODO Auto-generated method stub
183
184 }
185
186 /**
187 This is the default constructor
188
189 **/
190 public IDefaultMutableTreeNode() {
191 super();
192 }
193
194 /**
195 This is the overrided constructor
196 Init clase members with input data
197
198 @param strNodeName The name of node
199 @param intCategory The category of node
200 @param intOperation The operation of node
201
202 **/
203 public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation) {
204 super(strNodeName);
205 this.nodeName = strNodeName;
206 this.category = intCategory;
207 this.operation = intOperation;
208 }
209
210 /**
211 This is the overrided constructor
212 Init clase members with input data
213
214 @param strNodeName The name of node
215 @param intCategory The category of node
216 @param intOperation The operation of node
217 @param intLocation The location of node
218
219 **/
220 public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation, int intLocation) {
221 super(strNodeName);
222 this.nodeName = strNodeName;
223 this.category = intCategory;
224 this.operation = intOperation;
225 this.location = intLocation;
226 }
227
228 /**
229 Get category of node
230
231 @return The category of node
232
233 **/
234 public int getCategory() {
235 return category;
236 }
237
238 /**
239 Set category of node
240
241 @param category The input data of node category
242
243 **/
244 public void setCategory(int category) {
245 this.category = category;
246 }
247
248 /**
249 Get name of node
250
251 @return The name of node
252
253 **/
254 public String getNodeName() {
255 return nodeName;
256 }
257
258 /**
259 Set name of node
260
261 @param nodeName The input data of node name
262
263 **/
264 public void setNodeName(String nodeName) {
265 this.nodeName = nodeName;
266 }
267
268 /**
269 Get operation of node
270
271 @return The operation of node
272
273 **/
274 public int getOperation() {
275 return operation;
276 }
277
278 /**
279 Set operation of node
280
281 @param operation The input data of node operation
282
283 **/
284 public void setOperation(int operation) {
285 this.operation = operation;
286 }
287
288 /**
289 Get location of node
290
291 @return The location of node
292
293 **/
294 public int getLocation() {
295 return location;
296 }
297
298 /**
299 Set location of node
300
301 @param location The input data of node location
302
303 **/
304 public void setLocation(int location) {
305 this.location = location;
306 }
307 }