Пример #1
0
 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]));
 }
Пример #2
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;
 }
Пример #3
0
 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;
 }
Пример #4
0
 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;
 }
Пример #5
0
 public String getText(Object element) {
   FuncNodeVO vo = (FuncNodeVO) element;
   return "[" + vo.getFuncCode() + "]" + vo.getFuncName();
 }