grouptreenode.java
来自「采用tapestry的简单OA系统」· Java 代码 · 共 48 行
JAVA
48 行
package com.ejsun.entapps.presentation.pages.organization;
import org.apache.tapestry.contrib.tree.simple.TreeNode;
import com.ejsun.entapps.domain.organization.Group;
public class GroupTreeNode extends TreeNode {
private Group group;
private String m_strValue;
public GroupTreeNode(Group group) {
super(null);
this.m_strValue = group.getName();
this.group = group;
}
public Group getGroup() {
return group;
}
public String toString(){
return m_strValue;
}
public int hashCode(){
return m_strValue.hashCode();
}
public boolean equals(Object objTarget){
if(objTarget == this)
return true;
if(! (objTarget instanceof GroupTreeNode))
return false;
GroupTreeNode objTargetNode = (GroupTreeNode)objTarget;
return this.getValue().equals(objTargetNode.getValue());
}
/**
* Returns the value.
* @return String
*/
public String getValue() {
return m_strValue;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?