Package org.apache.batik.apps.svgbrowser.DOMDocumentTree

Examples of org.apache.batik.apps.svgbrowser.DOMDocumentTree.DropCompletedInfo


            tree.putClientProperty("JTree.lineStyle", "Angled");
            // Add the listeners to DOMDocumentTree
            tree.addListener(new DOMDocumentTreeAdapter() {

                public void dropCompleted(DOMDocumentTreeEvent event) {
                    DropCompletedInfo info = (DropCompletedInfo) event
                            .getSource();

                    addChangesToHistory();

                    AbstractCompoundCommand cmd = historyBrowserInterface
                            .createNodesDroppedCommand(info.getChildren());

                    int n = info.getChildren().size();
                    for (int i = 0; i < n; i++) {
                        Node node = (Node) info.getChildren().get(i);
                        // If the node has its ancestor in selected nodes,
                        // it should stay as it's child
                        if (!DOMUtilities.isAnyNodeAncestorOf(info
                                .getChildren(), node)) {
                            cmd.addCommand(historyBrowserInterface
                                    .createInsertChildCommand(info.getParent(),
                                            info.getSibling(), node));
                        }
                    }
                    historyBrowserInterface.performCompoundUpdateCommand(cmd);
                }
            });
View Full Code Here

TOP

Related Classes of org.apache.batik.apps.svgbrowser.DOMDocumentTree.DropCompletedInfo

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.