alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

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.ViewContentWarAction;
import org.netbeans.web.test.actions.ExportWarAction;

/** Node representing WebInf folder */
public class WebInfNode extends Node {
static final ExploreFromHereAction exploreFromHereAction = new ExploreFromHereAction();
    static final FindAction findAction = new FindAction();
    static final RefreshFolderAction refreshFolderAction = new RefreshFolderAction();
    static final CompileAction compileAction = new CompileAction();
    static final CompileAllAction compileAllAction = new CompileAllAction();
    static final BuildAction buildAction = new BuildAction();
    static final BuildAllAction buildAllAction = new BuildAllAction();
    static final CleanAction cleanAction = new CleanAction();
    static final CleanAllAction cleanAllAction = new CleanAllAction();
    static final PasteAction pasteAction = new PasteAction();
    static final PasteCopyAction pasteCopyAction = new PasteCopyAction();
    static final PasteLinkAction pasteLinkAction = new PasteLinkAction();
    static final DeleteAction deleteAction = new DeleteAction();
    static final PropertiesAction propertiesAction = new PropertiesAction();
    static final NewTemplateAction newTemplateAction = new NewTemplateAction();
    static final ExportWarAction exportWarAction  = new ExportWarAction();
    static final ViewContentWarAction viewContentWarAction = new ViewContentWarAction();

    /*   protected static final Action[] folderActions = new Action[] {
        copyAction
    };*/
    
    /** creates new WebInfNode
     * @param treePath String tree path inside Filesystems Repository */    
    public WebInfNode(String treePath) {
        super(new RepositoryTabOperator().tree(), treePath);
    }

    /** creates new WebInfNode
     * @param tree JTreeOperator of tree
     * @param treePath String tree path */    
    public WebInfNode(JTreeOperator tree, String treePath) {
        super(tree, treePath);
    }

    /** creates new WebInfNode
     * @param tree JTreeOperator of tree
     * @param treePath TreePath of node */    
    public WebInfNode(JTreeOperator tree, TreePath treePath) {
        super(tree, treePath);
    }
    
    /** creates new WebInfNode
     * @param parent parent Node
     * @param treePath String tree path from parent Node */    
    public WebInfNode(Node parent, String treePath) {
        super(parent, treePath);
    }
   
    
    /** performs ExploreFromHereAction with this node */    
    public void exploreFromHere() {
        exploreFromHereAction.perform(this);
    }
    
    /** performs FindAction with this node */    
    public void find() {
        findAction.perform(this);
    }
    
    /** performs RefreshFolderAction with this node */    
    public void refreshFolder() {
        refreshFolderAction.perform(this);
    }
    
    /** performs CompileAction with this node */    
    public void compile() {
        compileAction.perform(this);
    }

    /** performs CompileAllAction with this node */    
    public void compileAll() {
        compileAllAction.perform(this);
    }
    
    /** performs BuildAction with this node */    
    public void build() {
        buildAction.perform(this);
    }
    
    /** performs BuildAllAction with this node */    
    public void buildAll() {
        buildAllAction.perform(this);
    }
    
    /** performs CleanAction with this node */    
    public void clean() {
        cleanAction.perform(this);
    }
    
    /** performs CleanAllAction with this node */    
    public void cleanAll() {
        cleanAllAction.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 PasteCopyAction with this node */    
    public void pasteCopy() {
        pasteCopyAction.perform(this);
    }
    
    /** performs PasteLinkAction with this node */    
    public void pasteLink() {
        pasteLinkAction.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 PropertiesAction with this node */    
    public void properties() {
        propertiesAction.perform(this);
    }
    
    /** performs NewTemplateAction with this node */    
    public void newFromTemplate() {
        newTemplateAction.perform(this);
    }

    /** performs NewTemplateAction with this node
     * @param templateName template name from sub menu
     */    
    public void newFromTemplate(String templateName) {
        new NewTemplateAction(templateName).perform(this);
    }

    /** performs ViewContentAction with this node */    
    public void viewContent() {
        viewContentWarAction.perform(this);
    }

    /** performs ExportWARAction with this node */    
    public void export() {
        exportWarAction.perform(this);
    }

    /** tests popup menu items for presence */    
    public void verifyPopup() {
        verifyPopup(new Action[]{
             exploreFromHereAction,
	     findAction,
	     refreshFolderAction,
	     deleteAction,
	     propertiesAction,
	     exportWarAction,
	     viewContentWarAction
        });
    }
}





... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2021 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.