Package cli_fmw.delegate.directory.complex

Examples of cli_fmw.delegate.directory.complex.DirectoryTextTemplateTreeItem


        d.type = type.getID();

        try {
            //add to DB
            if (treeItem instanceof DirectoryTextTemplateTreeItem) {
                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);
View Full Code Here


    try {
        TreePath path = mainTree.getSelectionPath();
        Object treeItem = (path == null) ? null : path.getLastPathComponent();
        if (treeItem != null &&
                treeItem instanceof DirectoryTextTemplateTreeItem) {
            DirectoryTextTemplateTreeItem item = (DirectoryTextTemplateTreeItem) treeItem;
            DirectoryTextTemplate dir = (DirectoryTextTemplate) DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);
            List<DirectoryTextTemplateItem> list = dir.getItems(item);
            if (list.size() > 0) {
                throw new ClipsException("Сначала удалите все шаблоны из группы");
            }
            //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
View Full Code Here

    try {
        TreePath path = mainTree.getSelectionPath();
        Object treePathEnd = (path == null) ? null : path.getLastPathComponent();
        if (treePathEnd != null &&
                treePathEnd instanceof DirectoryTextTemplateTreeItem) {
            DirectoryTextTemplateTreeItem treeItem = (DirectoryTextTemplateTreeItem) treePathEnd;
            DirectoryTextTemplate dir = (DirectoryTextTemplate) DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);

            TextTemplateDetails details = new TextTemplateDetails();
            details.title = template;
            details.groupId = treeItem.getID();
            DirectoryTextTemplateItem newItem = new DirectoryTextTemplateItem(details);

            dir.getItems().append(newItem);
            rebuldListModel();
        }
View Full Code Here

TOP

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

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.