⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 treemodel.java

📁 这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用struts,hebinate,xml等技术,有丰富的tag,role,navigation,session,dictio
💻 JAVA
字号:
/*
 * Created on 2004-4-5
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package com.esimple.framework.web.taglib.rich;

import java.util.*;
/**
 * @author lijing
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class TreeModel {
	private String label;
	private String action;
	private String target;
	private boolean leaf;
	private ArrayList treeModels;

	public TreeModel() {
		treeModels = new ArrayList();
		label = "";
		action = "";
		target = "";
	}
	
	public TreeModel(String label,String action,String target){
		this.label = label;
		this.action = action;
		this.target = target;
		this.treeModels = new ArrayList();
	}

	public TreeModel getTreeModel(int index) {
		if (leaf)
			return null;
		if (treeModels == null)
			return null;
		return (TreeModel) treeModels.get(index);
	}

	public void addTreeModel(TreeModel treeModel) {
		if (treeModel != null) {
			treeModels.add(treeModel);
		}
	}

	public void removeTreeModel(int index) {
		if (treeModels != null) {
			treeModels.remove(index);
		}
	}

	/**
	 * @return
	 */
	public String getLabel() {
		return label;
	}

	/**
	 * @return
	 */
	public String getTarget() {
		return target;
	}

	/**
	 * @param string
	 */
	public void setLabel(String string) {
		label = string;
	}

	/**
	 * @param string
	 */
	public void setTarget(String string) {
		target = string;
	}

	/**
	 * @return
	 */
	public String getAction() {
		return action;
	}

	/**
	 * @return
	 */
	public ArrayList getTreeModels() {
		return treeModels;
	}

	/**
	 * @param string
	 */
	public void setAction(String string) {
		action = string;
	}

	/**
	 * @param list
	 */
	public void setTreeModels(ArrayList list) {
		treeModels = list;
	}

	/**
	 * @return
	 */
	public boolean isLeaf() {
		return leaf;
	}

	/**
	 * @param b
	 */
	public void setLeaf(boolean b) {
		leaf = b;
	}
}

⌨️ 快捷键说明

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