Package cli_fmw.delegate.directory.complex

Examples of cli_fmw.delegate.directory.complex.DirectoryTextTemplateTree


        dirTextTemplate = (DirectoryTextTemplate) DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);
    StateSaver.attachTo(this);
    }
   
    private void updateTree() throws ClipsException{
        DirectoryTextTemplateTree vdls = (DirectoryTextTemplateTree)
                DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
        TreeModelTextTemplates model = new TreeModelTextTemplates(vdls);
        treeTextTemplates.setRootVisible(true);
        treeTextTemplates.setModel(model);
        treeTextTemplates.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
View Full Code Here


    @Override
    public Object getChild(Object parent, int index) {
        if(parent == root) {
            try {
                DirectoryTextTemplateTree dir = (DirectoryTextTemplateTree)
                        DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
                List<DirectoryTextTemplateTreeItem> items = dir.getItems(type);
                return items.get(index);
            } catch (ClipsException ex) {
                ex.printStackTrace();
            }
        } else if(parent instanceof DirectoryTextTemplateTreeItem) {
View Full Code Here

    @Override
    public int getChildCount(Object parent) {
        if(parent == root) {
            try {
                DirectoryTextTemplateTree dir = (DirectoryTextTemplateTree)
                        DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
                List<DirectoryTextTemplateTreeItem> items = dir.getItems(type);
                return items.size();
            } catch (ClipsException ex) {
                ex.printStackTrace();
            }
        } else if(parent instanceof DirectoryTextTemplateTreeItem) {
View Full Code Here

    @Override
    public int getIndexOfChild(Object parent, Object child) {
        if(child != null && parent != null) {
            if(parent == root) {
                try {
                    DirectoryTextTemplateTree dir = (DirectoryTextTemplateTree)
                            DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
                    List<DirectoryTextTemplateTreeItem> items = dir.getItems(type);
                    return items.indexOf(child);
                } catch (ClipsException ex) {
                    ex.printStackTrace();
                }
            } else if(parent instanceof DirectoryTextTemplateTreeItem) {
View Full Code Here

                DirectoryTextTemplateTreeItem item = (DirectoryTextTemplateTreeItem) treeItem;
                d.parentItem = item.getID();
                DirectoryTextTemplateTreeItem newItem = new DirectoryTextTemplateTreeItem(d);
                item.getItems().append(newItem);
            } else {
                DirectoryTextTemplateTree treedir = (DirectoryTextTemplateTree) DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
                DirectoryTextTemplateTreeItem newItem = new DirectoryTextTemplateTreeItem(d);
                treedir.getItems().append(newItem);
            }
            //updating structure
            IntelliTemplateTreeModel model = (IntelliTemplateTreeModel) mainTree.getModel();
            model.structureChanged(path);
            //update gui
View Full Code Here

            //remove from DB
            DirectoryTextTemplateTreeItem parent = item.getParent();
            if (parent != null) {
                parent.getItems().remove(item);
            } else {
                DirectoryTextTemplateTree treedir = (DirectoryTextTemplateTree) DirectoryLocator.getDirectory(DirectoryTextTemplateTree.class, false);
                treedir.getItems().remove(item);
            }
            //updating structure
            IntelliTemplateTreeModel model = (IntelliTemplateTreeModel) mainTree.getModel();
            model.structureChanged(path.getParentPath());
            rebuldListModel();
View Full Code Here

TOP

Related Classes of cli_fmw.delegate.directory.complex.DirectoryTextTemplateTree

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.