?? enhancedtreenode.java
字號:
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 + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -