Package cli_fmw.delegate.directory

Examples of cli_fmw.delegate.directory.DirectoryItemRecursive


        d.value = item.getID();
        d.title = item.toString();
        d.canBeSelected = true;
       
        if(item instanceof DirectoryItemRecursive) {
            DirectoryItemRecursive thisItem = (DirectoryItemRecursive)item;
            Selector ii = thisItem.getItems();
            if(ii.size() > 0) {
                LinkedList<ChoosePanelData> ll = new LinkedList<ChoosePanelData>();
                for(int j=0; j<ii.size(); j++) {
                    DirectoryItemRecursive it = (DirectoryItemRecursive) ii.get(j);
                    if(!it.isVisible()) {
                        continue;
                    }
                    ChoosePanelData d2 = buildData(it);
                    ll.add(d2);
                }
View Full Code Here


  DirectoryRecursive<?, ?> getDirectory() throws ClipsException{
    return dir;
  }
 
  public boolean isParentOf(int mkbID, int parentMkbID) throws ClipsException{
    DirectoryItemRecursive      itm = getDirectory().getItemFromID(parentMkbID);
    while (itm != null) {
      if (mkbID == itm.getID()) {
        return true;
      }
      itm = itm.getParent();
    }
    return false;
  }
View Full Code Here

    utils = new DirectorySellectUtil(this.dir);
    normal = getForeground();
  }
 
  boolean hericalFind(DirectoryItemRecursive item, int id) throws ClipsException{
    DirectoryItemRecursive cur = dir.getItemFromID(id);
    while (cur != null){
      if (cur.getID() == item.getID()) {
        return true;
      }
      cur = cur.getParent();
    }
    return false;
  }
View Full Code Here

                }
            }

            if (item instanceof DirectoryItemRecursive) {
                DirectoryItemRecursive par = (DirectoryItemRecursive) item;
                Selector ii = par.getItems();
                for (int i = 0; i < ii.size(); i++) {
                    Object child = ii.get(i);
                    List path = findMatch(child, pattern);
                    if (path != null) {
                        path.add(par);
View Full Code Here

            if (selectBtn.isEnabled()) {
                Selector sel = getSelectedItems();
                for (int i = 0; i < sel.size(); i++) {
                    Object item = sel.get(i);
                    if (item instanceof DirectoryItemRecursive) {
                        DirectoryItemRecursive mi = (DirectoryItemRecursive) item;
                        //  try {
                        if (mi.getItems().size() == 0) {
                            selectBtn.doClick();
                        } else {
                            if (doubleClicked == mi || evt.getClickCount() > 2) {
                                doubleClicked = null;
                                selectBtn.doClick();
View Full Code Here

    public Object getChild(Object parent, int index) {
       // try {
            if(parent instanceof DefaultMutableTreeNode) {
                return items[index];
            } else if(parent instanceof DirectoryItemRecursive) {
                DirectoryItemRecursive item = (DirectoryItemRecursive)parent;
                return item.getItems().get(index);
            }
      /*  } catch (ClipsException ex) {
            ex.printStackTrace();
        }*/
        throw new IllegalArgumentException();
View Full Code Here

                return 0;
            }
            if(parent instanceof DefaultMutableTreeNode) {
                return items.length;
            } else if(parent instanceof DirectoryItemRecursive) {
                DirectoryItemRecursive item = (DirectoryItemRecursive)parent;
                return item.getItems().size();
            }
       /* } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }*/
        return 0;
View Full Code Here

        if(node instanceof DefaultMutableTreeNode) {
            return false;
        } else {
          //  try {
                if(node instanceof DirectoryItemRecursive) {
                    DirectoryItemRecursive item = (DirectoryItemRecursive)node;
                    return (item.getItems().size() == 0);
                }
           /* } catch (ClipsException ex) {
                ex.printStackTrace();
            }*/
        }
View Full Code Here

                    if(curItem == item) {
                        return i;
                    }
                 }
            } else if(parent instanceof DirectoryItemRecursive) {
                DirectoryItemRecursive parentItem = (DirectoryItemRecursive)parent;
                for(int i=0; i<parentItem.getItems().size(); i++) {
                    DirectoryItem curItem = (DirectoryItem)parentItem.getItems().get(i);
                    if(curItem == item) {
                        return i;
                    }
                 }
            }
View Full Code Here

TOP

Related Classes of cli_fmw.delegate.directory.DirectoryItemRecursive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.