treemodel.java

来自「这是一个轻便的j2ee的web应用框架,是一个在多个项目中运用的实际框架,采用s」· Java 代码 · 共 127 行

JAVA
127
字号
/*
 * 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 + =
减小字号Ctrl + -
显示快捷键?