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