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