1 19 package org.netbeans.jellytools.modules.xml.catalog.nodes; 20 21 26 27 import org.netbeans.jellytools.actions.*; 28 import org.netbeans.jellytools.modules.jndi.actions.RefreshAction; 29 import org.netbeans.jellytools.modules.xml.catalog.actions.UnmountCatalogAction; 30 import org.netbeans.jellytools.nodes.Node; 31 import org.netbeans.jellytools.Bundle; 32 import javax.swing.tree.TreePath ; 33 import java.awt.event.KeyEvent ; 34 import org.netbeans.jemmy.operators.JTreeOperator; 35 36 38 public class CatalogNode extends AbstractNode { 39 40 private static final Action refreshAction = new RefreshAction(); 41 private static final Action unmountCatalogAction = new UnmountCatalogAction(); 42 private static final Action customizeAction = new CustomizeAction(); 43 private static final Action propertiesAction = new PropertiesAction(); 44 45 48 public CatalogNode(JTreeOperator tree, String treePath) { 49 super(tree, treePath); 50 } 51 52 55 public CatalogNode(JTreeOperator tree, TreePath treePath) { 56 super(tree, treePath); 57 } 58 59 62 public CatalogNode(Node parent, String treePath) { 63 super(parent, treePath); 64 } 65 66 67 public void verifyPopup() { 68 verifyPopup(new Action[]{ 69 refreshAction, 70 unmountCatalogAction, 71 customizeAction, 72 propertiesAction 73 }); 74 } 75 76 77 public void refresh() { 78 refreshAction.perform(this); 79 } 80 81 82 public void unmountCatalog() { 83 unmountCatalogAction.perform(this); 84 } 85 86 87 public void customize() { 88 customizeAction.perform(this); 89 } 90 91 92 public void properties() { 93 propertiesAction.perform(this); 94 } 95 96 98 99 public CatalogEntryNode getCatalogEntry(String displayName) { 100 return (CatalogEntryNode) getChild(displayName, CatalogEntryNode.class); 101 } 102 } 103 104 | Popular Tags |