1 19 package org.netbeans.jellytools.modules.xml.catalog.nodes; 20 21 import javax.swing.tree.TreePath ; 22 import org.netbeans.jellytools.Bundle; 23 import org.netbeans.jellytools.actions.Action; 24 import org.netbeans.jellytools.actions.PropertiesAction; 25 import org.netbeans.jellytools.modules.xml.catalog.actions.MountCatalogAction; 26 import org.netbeans.jellytools.nodes.Node; 27 import org.netbeans.jemmy.operators.JTreeOperator; 28 29 31 public class XMLEntityCatalogsNode extends AbstractNode { 32 private static final String MY_PATH = Bundle 33 .getString("org.netbeans.modules.xml.catalog.Bundle", "TEXT_catalog_root"); 35 private static final Action mountCatalogAction = new MountCatalogAction(); 36 private static final Action propertiesAction = new PropertiesAction(); 37 38 41 public XMLEntityCatalogsNode(JTreeOperator tree, String treePath) { 42 super(tree, treePath); 43 } 44 45 48 public XMLEntityCatalogsNode(JTreeOperator tree, TreePath treePath) { 49 super(tree, treePath); 50 } 51 52 55 public XMLEntityCatalogsNode(Node parent, String treePath) { 56 super(parent, treePath); 57 } 58 59 60 public void verifyPopup() { 61 verifyPopup(new Action[]{ 62 mountCatalogAction, 63 propertiesAction 64 }); 65 } 66 67 68 public void mountCatalog() { 69 mountCatalogAction.perform(this); 70 } 71 72 73 public void properties() { 74 propertiesAction.perform(this); 75 } 76 77 79 80 public static XMLEntityCatalogsNode getInstance() { 81 return new XMLEntityCatalogsNode(AbstractNode.getRuntimeTab().tree(), MY_PATH); 82 } 83 84 85 public CatalogNode getCatalog(String displayName) { 86 return (CatalogNode) getChild(displayName, CatalogNode.class); 87 } 88 } 89 90 | Popular Tags |