|
What this is
Other links
The source code/* * Sun Public License Notice * * The contents of this file are subject to the Sun Public License * Version 1.0 (the "License"). You may not use this file except in * compliance with the License. A copy of the License is available at * http://www.sun.com/ * * The Original Code is NetBeans. The Initial Developer of the Original * Code is Sun Microsystems, Inc. Portions Copyright 1997-2003 Sun * Microsystems, Inc. All Rights Reserved. */ package org.netbeans.web.test.nodes; import javax.swing.tree.TreePath; import org.netbeans.jellytools.RepositoryTabOperator; import org.netbeans.jellytools.nodes.Node; import org.netbeans.jellytools.actions.*; import org.netbeans.jemmy.operators.JTreeOperator; import org.netbeans.web.test.actions.UnpackWarAction; import org.netbeans.web.test.actions.ViewContentWarAction; /** Node representing WAR file */ public class WARNode extends Node { /** creates new WARNode in Filesystems Repository * @param treePath String tree path */ public WARNode(String treePath) { super(new RepositoryTabOperator().tree(), treePath); } /** creates new WARNode * @param treeOperator JTreeOperator tree * @param treePath String tree path */ public WARNode(JTreeOperator treeOperator, String treePath) { super(treeOperator, treePath); } /** creates new WARNode * @param parent parent Node * @param treeSubPath String tree path from parent node */ public WARNode(Node parent, String treeSubPath) { super(parent, treeSubPath); } /** creates new WARNode * @param treeOperator JTreeOperator tree * @param path TreePath */ public WARNode(JTreeOperator treeOperator, TreePath path) { super(treeOperator, path); } static final CutAction cutAction = new CutAction(); static final CopyAction copyAction = new CopyAction(); static final PasteAction pasteAction = new PasteAction(); static final DeleteAction deleteAction = new DeleteAction(); static final RenameAction renameAction = new RenameAction(); static final UnpackWarAction unpackWarAction = new UnpackWarAction(); static final ViewContentWarAction viewContentWarAction = new ViewContentWarAction(); static final PropertiesAction propertiesAction = new PropertiesAction(); /** tests popup menu items for presence */ public void verifyPopup() { verifyPopup(new Action[]{ cutAction, copyAction, pasteAction, deleteAction, renameAction, unpackWarAction, viewContentWarAction, propertiesAction }); } /* protected static final Action[] javaActions = new Action[] { cutAction, copyAction, deleteAction, compileAction, buildAction, executeAction }; Action[] getActions() { return javaActions; }*/ /** performs CutAction with this node */ public void cut() { cutAction.perform(this); } /** performs CopyAction with this node */ public void copy() { copyAction.perform(this); } /** performs PasteAction with this node */ public void paste() { pasteAction.perform(this); } /** performs DeleteAction with this node */ public void delete() { deleteAction.perform(this); } /** performs RenameAction with this node */ public void rename() { renameAction.perform(this); } /** performs ViewWARContentAction with this node */ public void viewContent() { viewContentWarAction.perform(this); } /** performs ViewWARContentAction with this node */ public void unpack() { unpackWarAction.perform(this); } /** performs PropertiesAction with this node */ public void properties() { propertiesAction.perform(this); } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.