Package framework.beans.directory.writer.tree

Examples of framework.beans.directory.writer.tree.TextTemplateTreeDetails


            if (res == JOptionPane.OK_OPTION) {
                if (tfName.getText().isEmpty()) {
                    MessageBox.showWarning(MessageBox.W_INCORRECT_DATA);
                    return;
                } else {
                    TextTemplateTreeDetails details = new TextTemplateTreeDetails();
                    details.title = tfName.getText();
                    details.parentItem = selected.getID();
                    DirectoryTextTemplateTreeItem newItem = new DirectoryTextTemplateTreeItem(details);
                    selected.getItems().append(newItem);
                }
                updateTree();
            }
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
        }
    }else{
        try {
            tfName.setText("");
            int res = JOptionPane.showConfirmDialog(
                    null, pnlNewNode, "Заполните поля", JOptionPane.OK_CANCEL_OPTION, -1);
            if (res == JOptionPane.OK_OPTION) {
                if (tfName.getText().isEmpty()) {
                    MessageBox.showWarning(MessageBox.W_INCORRECT_DATA);
                    return;
                } else {
                    TextTemplateTreeDetails details = new TextTemplateTreeDetails();
                    details.title = tfName.getText();
                    DirectoryTextTemplateTreeItem newItem = new DirectoryTextTemplateTreeItem(details);
                    templateTree.getItems().append(newItem);
                }
                updateTree();
View Full Code Here


    }

    @Override
    protected DirectoryTextTemplateTreeItem createFromLoadedDetails(DirectoryItemDetails details) {
        try {
            TextTemplateTreeDetails d = (TextTemplateTreeDetails) details;
            return new DirectoryTextTemplateTreeItem(d);
        } catch (ClipsException ex) {
            MessageBox.showException(ex);
            return null;
        }
View Full Code Here

private void addGroupBtnActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addGroupBtnActionPerformed
    TreePath path = mainTree.getSelectionPath();
    Object treeItem = (path == null) ? null : path.getLastPathComponent();
    if (treeItem != null) {
        TextTemplateTreeDetails d = new TextTemplateTreeDetails();
        d.title = "new item";
        d.type = type.getID();

        try {
            //add to DB
View Full Code Here

TOP

Related Classes of framework.beans.directory.writer.tree.TextTemplateTreeDetails

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.