Package org.apache.batik.apps.svgbrowser.NodeTemplates

Examples of org.apache.batik.apps.svgbrowser.NodeTemplates.NodeTemplateDescriptor


            // Sort the value list and then iterate through node templates
            ArrayList values =
                new ArrayList(templates.getNodeTemplatesMap().values());
            Collections.sort(values, new Comparator() {
                public int compare(Object o1, Object o2) {
                    NodeTemplateDescriptor n1 = (NodeTemplateDescriptor) o1;
                    NodeTemplateDescriptor n2 = (NodeTemplateDescriptor) o2;
                    return n1.getName().compareTo(n2.getName());
                }
            });
            Iterator iter = values.iterator();
            while (iter.hasNext()) {
                NodeTemplateDescriptor desc =
                    (NodeTemplateDescriptor) iter .next();
                String toParse = desc.getXmlValue();
                short nodeType = desc.getType();
                String nodeCategory = desc.getCategory();
                JMenuItem currentItem = new JMenuItem(desc.getName());
                currentItem.addActionListener
                    (new NodeTemplateParser(toParse, nodeType));
                JMenu currentSubmenu = (JMenu)menuMap.get(nodeCategory);
                currentSubmenu.add(currentItem);
            }
View Full Code Here

TOP

Related Classes of org.apache.batik.apps.svgbrowser.NodeTemplates.NodeTemplateDescriptor

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.