📄 jmnode.java
字号:
package jm.framework.gui.module.jmtree.model;
import java.awt.Color;
import javax.swing.tree.TreeCellEditor;
import javax.swing.tree.TreeCellRenderer;
import jm.util.JMCheck;
import jm.util.JMUtility;
public class JMNode {
public static final String NODE_PATH_ROOT = "ROOT";
public static final String NODE_PATH = "NPATH";
public static final String NODE_CODE = "NCODE";
public static final String NODE_NAME = "NNAME";
public static final String NODE_VALUE = "NVALUE";
public static final String CELL_RENDER = "RENDER";
public static final String CELL_EDITER = "EDITER";
public static final String NODE_BACKGROUND_COLOR = "BACK";
public static final String NODE_FOREGROUND_COLOR = "FORE";
public static final String NODE_RESERVE01 = "RESERVE01";
public static final String NODE_RESERVE02 = "RESERVE02";
public static final String NODE_RESERVE03 = "RESERVE03";
public static final String NODE_OBJECT = "OBJECT";
public static final String NODE_INDEX = "INDEX";
//////////////////////////////////////////////////////////
private boolean isActive = true;
private boolean isSetMe = false;
private String nodename = "";
private String nodeCode = "";
private TreeCellRenderer cellRender = null;
private TreeCellEditor cellEditer = null;
private String nodeValue = "";
private Color nodeBackgroundColor = null;
private Color nodeForegroundColor = null;
private String nodePath = "";
private String nodeReserve01 = "";
private String nodeReserve02 = "";
private String nodeReserve03 = "";
private int nodeIndex = -1;
private Object nodeObject = null;
public JMNode () {
this("JM");
}
public JMNode (String name) {
nodename = (JMCheck.isNull(name)) ? "JM" : JMUtility.changNvl(name);
}
public void setNodeName (String name) {
nodename = JMUtility.changNvl(name);
}
public String getNodeName () {
return nodename;
}
public void setCellRender (TreeCellRenderer iCellRender) {
cellRender = iCellRender;
}
public TreeCellRenderer getCellRender () {
return cellRender;
}
public void setCellEditer (TreeCellEditor iCellEditer) {
cellEditer = iCellEditer;
}
public TreeCellEditor getCellEditer () {
return cellEditer;
}
public Color getNodeBackgroundColor () {
return nodeBackgroundColor;
}
public void setNodeBackgroundColor (Color iNodeBackgroundColor) {
this.nodeBackgroundColor = iNodeBackgroundColor;
}
public Color getNodeForegroundColor () {
return nodeForegroundColor;
}
public void setNodeForeground (Color iNodeForegroundColor) {
this.nodeForegroundColor = iNodeForegroundColor;
}
public String getNodeCode() {
return nodeCode;
}
public void setNodeCode(String iNodeCode) {
this.nodeCode = iNodeCode;
}
public String getNodePath () {
return nodePath;
}
public void setNodePath (String iNodePath) {
this.nodePath = iNodePath;
}
public String getNodeReserve01 () {
return nodeReserve01;
}
public void setNodeReserve01 (String iNodeReserve01) {
this.nodeReserve01 = iNodeReserve01;
}
public String getNodeReserve02 () {
return nodeReserve02;
}
public void setNodeReserve02 (String iNodeReserve02) {
this.nodeReserve02 = iNodeReserve02;
}
public String getNodeReserve03 () {
return nodeReserve03;
}
public void setNodeReserve03 (String iNodeReserve03) {
this.nodeReserve03 = iNodeReserve03;
}
public String getNodeValue () {
return nodeValue;
}
public void setNodeValue (String iNodeValue) {
this.nodeValue = iNodeValue;
}
public Object getNodeObject () {
return nodeObject;
}
public void setNodeObject (Object iNodeObject) {
this.nodeObject = iNodeObject;
}
public boolean isActive () {
return isActive;
}
public void setActive (boolean canActive) {
this.isActive = canActive;
}
public boolean isMe () {
return isSetMe;
}
public void setMe (boolean me) {
this.isSetMe = me;
}
public int getNodeIndex() {
return nodeIndex;
}
public void setNodeIndex(int nodeIndex) {
this.nodeIndex = nodeIndex;
}
public void clear () {
isActive = true;
isSetMe = false;
nodeValue = "";
nodeBackgroundColor = null;
nodeForegroundColor = null;
nodeReserve01 = "";
nodeReserve02 = "";
nodeReserve03 = "";
nodeObject = null;
}
public String toString () {
return nodename;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -