
cn.featherfly.common.structure.tree.component.MifTreeHelper Maven / Gradle / Ivy
/**
* @author 钟冀 - yufei
* Aug 25, 2009
*/
package cn.featherfly.common.structure.tree.component;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import cn.featherfly.common.structure.tree.Tree;
import cn.featherfly.common.structure.tree.TreeNode;
/**
*
*
* JavaScript 树形组件 MifTree 的帮助类,
* 以Tree或TreeNode为MifTree生成生成需要的JSON数据
*
*
* @author 钟冀
*/
public class MifTreeHelper {
private Tree> tree;
private TreeNode> treeNode;
/**
*
* @param tree tree
*/
public MifTreeHelper(Tree> tree) {
this.tree = tree;
}
/**
*
* @param treeNode treeNode
*/
public MifTreeHelper(TreeNode> treeNode) {
this.treeNode = treeNode;
}
/**
* 用list和map封装前台js树需要用到的json格式,包含根
* @param creator 节点生成器
* @return 用list和map封装前台js树需要用到的json格式
*/
public List
© 2015 - 2025 Weber Informatics LLC | Privacy Policy