本文整理匯總了Java中org.openide.nodes.AbstractNode.setName方法的典型用法代碼示例。如果您正苦於以下問題:Java AbstractNode.setName方法的具體用法?Java AbstractNode.setName怎麽用?Java AbstractNode.setName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.openide.nodes.AbstractNode
的用法示例。
在下文中一共展示了AbstractNode.setName方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
public Node[] createNodes (Object object) {
if (object == WAIT_KEY) {
AbstractNode n = new AbstractNode(Children.LEAF);
n.setName(NbBundle.getMessage(TreeModelNode.class, "WaitNode"));
n.setIconBaseWithExtension("org/netbeans/modules/viewmodel/wait.gif");
return new Node[] { n };
}
if (object instanceof Exception)
return new Node[] {
new ExceptionNode ((Exception) object)
};
TreeModelNode tmn = new TreeModelNode (
model,
columns,
treeModelRoot,
object
);
//System.err.println("created node for ("+object+") = "+tmn);
synchronized (objectToNode) {
objectToNode.put (object, new WeakReference<TreeModelNode>(tmn));
}
return new Node[] {tmn};
}
示例2: postInitComponents
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Messages("LBL_TemplatesPanel_PleaseWait=Please wait...")
private void postInitComponents () {
Mnemonics.setLocalizedText(jLabel1, this.firer.getCategoriesName());
Mnemonics.setLocalizedText(jLabel2, this.firer.getTemplatesName());
this.description.setEditorKit(new HTMLEditorKit());
description.putClientProperty( JEditorPane.HONOR_DISPLAY_PROPERTIES, Boolean.TRUE );
// please wait node, see issue 52900
pleaseWait = new AbstractNode (Children.LEAF) {
@Override
public Image getIcon (int ignore) {
return PLEASE_WAIT_ICON;
}
};
pleaseWait.setName(LBL_TemplatesPanel_PleaseWait());
Children ch = new Children.Array ();
ch.add (new Node[] {pleaseWait});
final Node root = new AbstractNode (ch);
SwingUtilities.invokeLater (new Runnable () {
@Override public void run() {
((ExplorerProviderPanel)categoriesPanel).setRootNode (root);
}
});
((ExplorerProviderPanel)projectsPanel).addDefaultActionListener( firer );
description.addHyperlinkListener(new ClickHyperlinks());
}
示例3: createNodeForExecutionEventTree
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
private Node createNodeForExecutionEventTree(ExecutionEventObject.Tree item) {
ExecutionEventObject se = item.getStartEvent();
if (se != null) {
//TODO
AbstractNode nd = new AbstractNode(createChildren(item.getChildrenNodes()), Lookups.fixed(item));
switch (se.type) {
case ProjectStarted :
return new ProjectNode(showPhases ? createPhasedChildren(item.getChildrenNodes()) : createChildren(item.getChildrenNodes()), Lookups.fixed(item));
case MojoStarted :
return new MojoNode(createChildren(item.getChildrenNodes()), Lookups.fixed(item, config));
case ForkStarted :
case ForkedProjectStarted :
default :
nd.setDisplayName(se.type.name());
nd.setName(se.type.name());
break;
}
return nd;
}
return new AbstractNode(createChildren(item.getChildrenNodes()), Lookups.fixed(item));
}
示例4: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Node[] createNodes(Object key) {
AbstractNode an = new AbstractNode(Children.LEAF);
an.setName((String)key);
an.setIconBaseWithExtension("org/netbeans/lib/uihandler/module.gif"); // NOI18N
return new Node[] { an };
}
示例5: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
/** Create nodes for a given key.
* @param key the key
* @return child nodes for this key or null if there should be no
* nodes for this key
*/
protected Node[] createNodes(Object key) {
AbstractNode an = new AbstractNode (Children.LEAF);
an.setName (key.toString ());
cnt++;
return new Node[] { an };
}
示例6: setUp
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected void setUp() {
size = getTestNumber();
chK = new MyKeys();
final AbstractNode root = new AbstractNode(chK);
root.setName("test root");
final String[] childrenNames = new String[size];
for (int i = 0; i < size; i++) {
childrenNames[i] = "test"+i;
}
chK.mySetKeys(childrenNames);
toCheck = Visualizer.findVisualizer(root);
}
示例7: setUp
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected void setUp() throws Exception {
a1 = SystemAction.get(SimpleCookieAction.class);
n1 = new CookieNode();
n1.setName("n1");
n2 = new CookieNode();
n2.setName("n2");
n3 = new AbstractNode(Children.LEAF);
n3.setName("n3");
SimpleCookieAction.runOn.clear();
}
示例8: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Node[] createNodes(String key) {
if (key.contains("Empty")) {
return null;
} else {
AbstractNode n = new AbstractNode(Children.LEAF);
n.setName(key);
return new Node[]{n};
}
}
示例9: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
/** Create nodes for a given key.
* @param key the key
* @return child nodes for this key or null if there should be no
* nodes for this key
*/
protected Node[] createNodes(Object key) {
if (key.toString().startsWith("-")) {
return null;
}
AbstractNode an = new AbstractNode (Children.LEAF);
an.setName (key.toString ());
return new Node[] { an };
}
示例10: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Node[] createNodes(String key) {
if (key.startsWith("-")) {
return null;
}
AbstractNode node = new AbstractNode(LEAF);
node.setName(key);
cnt++;
return new Node[] {node};
}
示例11: initCollection
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Collection<Node> initCollection() {
AbstractNode n = new AbstractNode(Children.LEAF);
n.setName("init"); // NOI18N
n.setDisplayName(NbBundle.getMessage(ProjCh.class, "MSG_ProjChInit"));
n.setIconBaseWithExtension("org/netbeans/modules/project/ui/resources/wait.gif");
return Collections.singletonList((Node)n);
}
示例12: getWaitNode
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
protected static Node[] getWaitNode() {
AbstractNode wait = new AbstractNode(Children.LEAF);
wait.setName(NbBundle.getMessage(WsdlSaasNodeChildren.class, "NODE_LOAD_MSG")); // NOI18N
wait.setIconBaseWithExtension("org/netbeans/modules/websvc/saas/ui/resources/wait.gif"); // NOI18N
return new Node[] { wait };
}
示例13: taskFinished
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
@NbBundle.Messages({
"LBL_NoModesFound=No layout definition found",
"MSG_NoModesFound=Is everything OK? Did your application compile and run?"
})
public void taskFinished(Task task) {
handle.finish();
FileObject modeDir = userDir.get().getFileObject("config/Windows2Local/Modes");
boolean one = false;
final Children ch = getExplorerManager().getRootContext().getChildren();
if (modeDir != null) {
try {
FileSystem layer = DesignSupport.findLayer(data.getProject());
if (layer == null) {
throw new IOException("Cannot find layer in " + data.getProject()); // NOI18N
}
data.setSFS(layer);
for (FileObject m : modeDir.getChildren()) {
if (m.isData() && "wsmode".equals(m.getExt())) {
ModeNode mn = new ModeNode(m, data);
ch.add(new Node[] { mn });
one = true;
}
}
} catch (IOException ex) {
Exceptions.printStackTrace(ex);
}
}
if (!one) {
AbstractNode empty = new AbstractNode(Children.LEAF);
empty.setName("empty"); // NOI18N
empty.setDisplayName(Bundle.LBL_NoModesFound());
empty.setShortDescription(Bundle.MSG_NoModesFound());
ch.add(new Node[] { empty });
markInvalid();
} else {
markValid();
}
EventQueue.invokeLater(this);
}
示例14: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Node[] createNodes(Object key) {
AbstractNode an = new AbstractNode(Children.LEAF);
an.setName(key.toString());
return new Node[] { an };
}
示例15: createNodes
import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
protected Node[] createNodes(Integer o) {
AbstractNode an = new CountingNode();
an.setName(Integer.toString(o));
return new Node[] { an };
}