public Object[] getChildren(Object parentElement) { List<FuncNodeVO> list = new ArrayList<FuncNodeVO>(); FuncNodeVO vo = (FuncNodeVO) parentElement; String pk = vo.getPk_func(); for (int i = 0; i < funvosExfun.length; i++) { if (pk.equals(funvosExfun[i].getPk_parent())) list.add(funvosExfun[i]); } return list.toArray(list.toArray(new FuncNodeVO[0])); }
public Object getParent(Object element) { FuncNodeVO vo = (FuncNodeVO) element; String pk_parent = vo.getPk_parent(); if (pk_parent == null) return null; for (int i = 0; i < funvosExfun.length; i++) { if (pk_parent.equals(funvosExfun[i].getPk_func())) return funvosExfun[i]; } return null; }
public boolean hasChildren(Object element) { FuncNodeVO vo = (FuncNodeVO) element; String pk = vo.getPk_func(); for (int i = 0; i < funvosExfun.length; i++) { if (pk.equals(funvosExfun[i].getPk_parent())) { return true; } } return false; }
public FuncNodeVO[] getMainFunvos() { if (funvosExfun != null) { List<FuncNodeVO> list = new ArrayList<FuncNodeVO>(); for (int i = 0; i < funvosExfun.length; i++) { FuncNodeVO vo = funvosExfun[i]; if (vo.getPk_parent() == null) list.add(vo); } return list.toArray(new FuncNodeVO[0]); } return null; }
public String getText(Object element) { FuncNodeVO vo = (FuncNodeVO) element; return "[" + vo.getFuncCode() + "]" + vo.getFuncName(); }