Package cli_fmw.delegate.directory.complex

Examples of cli_fmw.delegate.directory.complex.DirectoryTextTemplate


    @SuppressWarnings("unchecked")
    private void onSearchFieldChanged(String value) throws ClipsException {
        if(value.isEmpty()) {
            return;
        }           
        DirectoryTextTemplate dva = DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);
        SelectorEditableExceptional<DirectoryTextTemplateItem> sel = dva.getItems();
        for(int i=0; i<sel.size(); i++) {
            DirectoryTextTemplateItem item = sel.get(i);
            List found = findMatch(item, value);
            if(found != null) {                   
                found.add(treeTextTemplates.getModel().getRoot());
View Full Code Here


        }

        DefaultListModel model = new DefaultListModel();
        if (item != null) {
            try {
                DirectoryTextTemplate dir = (DirectoryTextTemplate) DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);
                List<DirectoryTextTemplateItem> list = dir.getItems(item);
                for (int i = 0; i < list.size(); i++) {
                    DirectoryTextTemplateItem li = list.get(i);
                    System.out.println("Model + " + li);
                    model.add(i, li);
                }
View Full Code Here

        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();
View Full Code Here

        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();
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
View Full Code Here

private void delTemplateBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_delTemplateBtnActionPerformed
    try {
        DirectoryTextTemplateItem tmpl = (DirectoryTextTemplateItem) mainList.getSelectedValue();
        if (template != null) {
            DirectoryTextTemplate dir = (DirectoryTextTemplate) DirectoryLocator.getDirectory(DirectoryTextTemplate.class, false);
            dir.getItems().remove(tmpl);
            rebuldListModel();
        }
    } catch (ClipsException ex) {
        MessageBox.showException(ex);
    }
View Full Code Here

TOP

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

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.