|
What this is
Other links
The source code/* * PluginNode.java * * Created on December 21, 2003, 8:29 AM */ package org.netbeans.tests.j2eeserver.plugin.registry; import org.openide.nodes.*; import org.openide.util.actions.*; import java.util.*; import org.netbeans.tests.j2eeserver.plugin.jsr88.*; /** * * @author nn136682 */ public class PluginNode extends AbstractNode { static java.util.Collection bogusNodes = java.util.Arrays.asList(new Node[] { Node.EMPTY, Node.EMPTY }); // PENDING use Children.Keys() public PluginNode(DepFactory factory) { super(new MyChildren(bogusNodes)); setDisplayName("Original:"+factory.getDisplayName()); setIconBase("org/netbeans/tests/j2eeserver/plugin/registry/plugin"); } public javax.swing.Action[] getActions(boolean context) { return new javax.swing.Action[] { SystemAction.get(BogusAction.class) }; } public static class MyChildren extends Children.Array { public MyChildren(Collection nodes) { super(nodes); } } public static class BogusAction extends NodeAction { public String getName () { return "Bogus"; } protected boolean enable(Node[] activatedNodes) { return true; } public org.openide.util.HelpCtx getHelpCtx() { return org.openide.util.HelpCtx.DEFAULT_HELP; } protected void performAction(Node[] activatedNodes) { System.out.println("Some one called Bogus?"); } } } |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
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.