enhancedtreenode.java

来自「WAP ide 代码」· Java 代码 · 共 47 行

JAVA
47
字号
package wapide;import javax.swing.tree.DefaultMutableTreeNode;/** * This class enhances the DefaultMutableTreeNode class by providing * it with a new member variable, type.  This allows a tree node to know * what type of node it is. it can be a <do>, <go> or <prev> type for example. * The types are not pre-defined and as such the class is re-usable. * * Copyright:    Copyright (c) 2003 * @author Mark Busman * @version 1.0 * * For License and contact information see WAPIDE.java */public class EnhancedTreeNode extends DefaultMutableTreeNode {  private String Type = "";  /**   * Constructor for EnhancedTreeNode.   * @param String s - the String to be used as the UserObject.   */  public EnhancedTreeNode(String s) {    super(s);  }  /**   * Constructor for EnhancedTreeNode.   * @param String s - the String to be used as the UserObject.   * @param String type - the type of the Node.   */  public EnhancedTreeNode(String s, String type) {    super(s);    Type = type;  }  /**   * Returns the type of the Node   * return String type - the Node type.   */  public String getNodeType() {    return Type;  }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?