+++ /dev/null
-/** @file\r
- \r
- \r
- The file is used to override DefaultMutableTreeNode to provides customized interfaces \r
- \r
- Copyright (c) 2006, Intel Corporation\r
- All rights reserved. This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
- \r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
- \r
- **/\r
-\r
-package org.tianocore.packaging.common.ui;\r
-\r
-import javax.swing.tree.DefaultMutableTreeNode;\r
-\r
-/**\r
- The class is used to override DefaultMutableTreeNode to provides customized interfaces\r
- It extends DefaultMutableTreeNode\r
- \r
- @since ModuleEditor 1.0\r
- \r
- **/\r
-public class IDefaultMutableTreeNode extends DefaultMutableTreeNode {\r
- ///\r
- /// Define class Serial Version UID\r
- ///\r
- private static final long serialVersionUID = -1947340717458069548L;\r
-\r
- //\r
- //Static final definitions for all kinds of node\r
- //\r
- public static final int MSA_HEADER = 0;\r
-\r
- public static final int LIBRARYCLASSDEFINITIONS = 1;\r
-\r
- public static final int SOURCEFILES = 2;\r
-\r
- public static final int INCLUDES = 3;\r
-\r
- public static final int PROTOCOLS = 4;\r
-\r
- public static final int EVENTS = 5;\r
-\r
- public static final int HOBS = 6;\r
-\r
- public static final int PPIS = 7;\r
-\r
- public static final int VARIABLES = 8;\r
-\r
- public static final int BOOTMODES = 9;\r
-\r
- public static final int SYSTEMTABLES = 10;\r
-\r
- public static final int DATAHUBS = 11;\r
-\r
- public static final int FORMSETS = 12;\r
-\r
- public static final int GUIDS = 13;\r
-\r
- public static final int EXTERNS = 14;\r
-\r
- public static final int PCDS = 15;\r
-\r
- public static final int MBD_HEADER = 20;\r
-\r
- public static final int MLSA_HEADER = 21;\r
-\r
- public static final int MLBD_HEADER = 22;\r
-\r
- public static final int LIBRARIES = 23;\r
-\r
- public static final int LIBRARY_CLASS_DEFINITION = 101;\r
-\r
- public static final int SOURCEFILES_FILENAME = 210;\r
-\r
- public static final int SOURCEFILES_FILENAME_ITEM = 211;\r
-\r
- public static final int SOURCEFILES_ARCH = 220;\r
-\r
- public static final int SOURCEFILES_ARCH_ITEM = 221;\r
-\r
- public static final int INCLUDES_PACKAGENAME = 310;\r
-\r
- public static final int INCLUDES_PACKAGENAME_ITEM = 311;\r
-\r
- public static final int INCLUDES_ARCH = 320;\r
-\r
- public static final int INCLUDES_ARCH_ITEM = 321;\r
-\r
- public static final int PROTOCOLS_PROTOCOL = 410;\r
-\r
- public static final int PROTOCOLS_PROTOCOL_ITEM = 411;\r
-\r
- public static final int PROTOCOLS_PROTOCOLNOTIFY = 420;\r
-\r
- public static final int PROTOCOLS_PROTOCOLNOTIFY_ITEM = 421;\r
-\r
- public static final int EVENTS_CREATEEVENTS = 510;\r
-\r
- public static final int EVENTS_CREATEEVENTS_ITEM = 511;\r
-\r
- public static final int EVENTS_SIGNALEVENTS = 520;\r
-\r
- public static final int EVENTS_SIGNALEVENTS_ITEM = 521;\r
-\r
- public static final int HOBS_HOB_ITEM = 611;\r
-\r
- public static final int PPIS_PPI = 710;\r
-\r
- public static final int PPIS_PPI_ITEM = 711;\r
-\r
- public static final int PPIS_PPINOTIFY = 720;\r
-\r
- public static final int PPIS_PPINOTIFY_ITEM = 721;\r
-\r
- public static final int VARIABLES_VARIABLE_ITEM = 811;\r
-\r
- public static final int BOOTMODES_BOOTMODE_ITEM = 911;\r
-\r
- public static final int SYSTEMTABLES_SYSTEMTABLE_ITEM = 1011;\r
-\r
- public static final int DATAHUBS_DATAHUB_ITEM = 1111;\r
-\r
- public static final int FORMSETS_FORMSET_ITEM = 1211;\r
-\r
- public static final int GUIDS_GUIDENTRY_ITEM = 1311;\r
-\r
- public static final int EXTERNS_EXTERN_ITEM = 1411;\r
-\r
- public static final int PCDS_PCDDATA_ITEM = 1511;\r
-\r
- public static final int LIBRARIES_LIBRARY = 2310;\r
-\r
- public static final int LIBRARIES_LIBRARY_ITEM = 2311;\r
-\r
- public static final int LIBRARIES_ARCH = 2320;\r
-\r
- public static final int LIBRARIES_ARCH_ITEM = 2321;\r
-\r
- //\r
- //Static final definitions for operation\r
- //\r
- public static final int OPERATION_NULL = 0;\r
-\r
- public static final int OPERATION_ADD = 1;\r
-\r
- public static final int OPERATION_UPDATE = 2;\r
-\r
- public static final int OPERATION_DELETE = 4;\r
-\r
- public static final int OPERATION_ADD_UPDATE = 3;\r
-\r
- public static final int OPERATION_ADD_DELETE = 5;\r
-\r
- public static final int OPERATION_UPDATE_DELETE = 6;\r
-\r
- public static final int OPERATION_ADD_UPDATE_DELETE = 7;\r
-\r
- //\r
- //Define 4 node attributes\r
- //\r
- private int category = 0;\r
-\r
- private int operation = 0;\r
-\r
- private int location = 0;\r
-\r
- private String nodeName = "";\r
-\r
- /**\r
- Main class, reserved for test\r
- \r
- @param args\r
- \r
- **/\r
- public static void main(String[] args) {\r
- // TODO Auto-generated method stub\r
-\r
- }\r
-\r
- /**\r
- This is the default constructor\r
- \r
- **/\r
- public IDefaultMutableTreeNode() {\r
- super();\r
- }\r
-\r
- /**\r
- This is the overrided constructor\r
- Init clase members with input data\r
- \r
- @param strNodeName The name of node\r
- @param intCategory The category of node\r
- @param intOperation The operation of node\r
- \r
- **/\r
- public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation) {\r
- super(strNodeName);\r
- this.nodeName = strNodeName;\r
- this.category = intCategory;\r
- this.operation = intOperation;\r
- }\r
-\r
- /**\r
- This is the overrided constructor\r
- Init clase members with input data\r
- \r
- @param strNodeName The name of node\r
- @param intCategory The category of node\r
- @param intOperation The operation of node\r
- @param intLocation The location of node\r
- \r
- **/\r
- public IDefaultMutableTreeNode(String strNodeName, int intCategory, int intOperation, int intLocation) {\r
- super(strNodeName);\r
- this.nodeName = strNodeName;\r
- this.category = intCategory;\r
- this.operation = intOperation;\r
- this.location = intLocation;\r
- }\r
-\r
- /**\r
- Get category of node \r
- \r
- @return The category of node\r
- \r
- **/\r
- public int getCategory() {\r
- return category;\r
- }\r
-\r
- /**\r
- Set category of node\r
- \r
- @param category The input data of node category\r
- \r
- **/\r
- public void setCategory(int category) {\r
- this.category = category;\r
- }\r
-\r
- /**\r
- Get name of node\r
- \r
- @return The name of node\r
- \r
- **/\r
- public String getNodeName() {\r
- return nodeName;\r
- }\r
-\r
- /**\r
- Set name of node\r
- \r
- @param nodeName The input data of node name\r
- \r
- **/\r
- public void setNodeName(String nodeName) {\r
- this.nodeName = nodeName;\r
- }\r
-\r
- /**\r
- Get operation of node\r
- \r
- @return The operation of node\r
- \r
- **/\r
- public int getOperation() {\r
- return operation;\r
- }\r
-\r
- /**\r
- Set operation of node\r
- \r
- @param operation The input data of node operation\r
- \r
- **/\r
- public void setOperation(int operation) {\r
- this.operation = operation;\r
- }\r
-\r
- /**\r
- Get location of node\r
- \r
- @return The location of node\r
- \r
- **/\r
- public int getLocation() {\r
- return location;\r
- }\r
-\r
- /**\r
- Set location of node\r
- \r
- @param location The input data of node location\r
- \r
- **/\r
- public void setLocation(int location) {\r
- this.location = location;\r
- }\r
-}\r