/** Change the icon. * One need only specify the base resource name without extension; * the real name of the icon is obtained by the applying icon message * formats. * * The method effectively behaves as if it was just delegating * to {@link #setIconBaseWithExtension(java.lang.String)} * using <code>base + ".gif"</code> as parameter. * * @param base base resouce name (no initial slash) * @deprecated Use {@link #setIconBaseWithExtension(java.lang.String)} */ @Deprecated public void setIconBase(String base) { setIconBaseWithExtension(base, DEFAULT_ICON_EXTENSION); }
setIconBaseWithExtension(baseExt, ""); } else { String base = baseExt.substring(0, lastDot); String ext = baseExt.substring(lastDot); setIconBaseWithExtension(base, ext);
/** * Create the Node that should be shown while the keys are being computed * on a background thread. * This method will not be called if this ChildFactory is used for a * synchronous children which does not compute its keys on a background * thread. Whether an instance is synchronous or not is determined by a * parameter to * <a href="Children.html#create(ChildFactory, boolean)">Children.create()</a>. * <p> * To show no node at all when the Children object is initially expanded in * the UI, simply return null. * <p> * The default implementation returns a Node that shows an hourglass cursor * and the localized text "Please Wait...". * * @return A Node, or null if no wait node should be shown. */ protected Node createWaitNode() { AbstractNode n = new AbstractNode(Children.LEAF) { public @Override Action[] getActions(boolean context) { return new Action[0]; } }; n.setIconBaseWithExtension("org/openide/nodes/wait.gif"); //NOI18N n.setDisplayName(NbBundle.getMessage(ChildFactory.class, "LBL_WAIT")); //NOI18N return n; }
private LazyNode(AbstractNode an, Map<String,?> map) { super(an, new SwitchChildren(an)); ((SwitchChildren)getChildren()).node = this; this.map = map; an.setName((String) map.get("name")); // NOI18N an.setDisplayName((String) map.get("displayName")); // NOI18N an.setShortDescription((String) map.get("shortDescription")); // NOI18N String iconBase = (String) map.get("iconResource"); // NOI18N if (iconBase != null) { an.setIconBaseWithExtension(iconBase); } }
public CDCPlatformNode (CDCPlatform platform, DataObject definition) { super (Children.LEAF, Lookups.fixed(new Object[] {platform, definition})); this.platform = platform; super.setIconBaseWithExtension ("org/netbeans/modules/j2me/cdc/platform/resources/cdcPlatform.png"); }
public J2SEPlatformNode (J2SEPlatformImpl platform, DataObject definition) { super (Children.LEAF, Lookups.fixed(new Object[] {platform, definition})); this.platform = platform; super.setIconBaseWithExtension("org/netbeans/modules/scala/stdplatform/resources/platform.gif"); }
private Node noPlatformNode() { AbstractNode result = new AbstractNode(Children.LEAF); result.setIconBaseWithExtension("org/netbeans/modules/javacard/resources/empty.png"); //NOI18N result.setDisplayName(NbBundle.getMessage(DevicePanel.class, "LBL_NO_PLATFORM_SELECTED")); //NOI18N return result; }
public static Node createWaitNode() { AbstractNode n = new AbstractNode(Children.LEAF); n.setName(NbBundle.getMessage(JBItemNode.class, "LBL_WaitNode_DisplayName")); //NOI18N n.setIconBaseWithExtension("org/netbeans/modules/j2ee/jboss4/resources/wait.gif"); // NOI18N return n; }
private Node invalidPlatformNode() { AbstractNode result = new AbstractNode(Children.LEAF); result.setIconBaseWithExtension("org/netbeans/modules/javacard/resources/empty.png"); //NOI18N result.setDisplayName(NbBundle.getMessage(DevicePanel.class, "LBL_INVALID_PLATFORM_SELECTED")); //NOI18N return result; }
private Node createWaitNode() { AbstractNode n = new AbstractNode(Children.LEAF); n.setName(NbBundle.getMessage(JBApplicationsChildren.class, "LBL_WaitNode_DisplayName")); //NOI18N n.setIconBaseWithExtension("org/netbeans/modules/j2ee/jboss4/resources/wait.gif"); // NOI18N return n; } }
public static Node createInfoNode() { AbstractNode n = new AbstractNode(Children.LEAF); n.setName(NbBundle.getMessage(JBItemNode.class, "LBL_InfoNode_DisplayName")); //NOI18N n.setShortDescription(NbBundle.getMessage(JBItemNode.class, "LBL_InfoNode_ToolTip")); //NOI18N n.setIconBaseWithExtension("org/netbeans/core/resources/exception.gif"); // NOI18N return n; }
static Node createPartialNode() { AbstractNode node = new AbstractNode(Children.LEAF); node.setIconBaseWithExtension("org/netbeans/modules/maven/resources/wait.gif"); node.setDisplayName(TXT_Partial_result()); return node; }
protected Node[] createNodes(Key key) { Node node = nodesHash.get(key); if (!nodesHash.containsKey(key)){ node = null; if (key.ejbType == Key.EjbType.SESSION) { // do not create node for web service if (!key.isWebService && nodeFactory != null) { node = nodeFactory.createSessionNode(key.ejbClass, ejbModule, project); } } if (key.ejbType == Key.EjbType.ENTITY && nodeFactory != null) { node = nodeFactory.createEntityNode(key.ejbClass, ejbModule, project); } if (key.ejbType == Key.EjbType.MESSAGE_DRIVEN && nodeFactory != null) { node = nodeFactory.createMessageNode(key.ejbClass, ejbModule, project); } if (key == Key.SCANNING){ node = new AbstractNode(Children.LEAF); node.setDisplayName(NbBundle.getMessage(EjbContainerChildren.class, "MSG_Scanning_EJBs")); //NOI18N ((AbstractNode)node).setIconBaseWithExtension("org/netbeans/modules/j2ee/ejbjar/project/ui/wait.gif"); //NOI18N } nodesHash.put(key, node); } return node == null ? null : new Node[] { node }; }
private Node createWaitNode() { AbstractNode node = new AbstractNode(Children.LEAF); node.setName(NbBundle.getMessage(InstanceTargetXNode.class, "LBL_WaitNode_DisplayName")); node.setIconBaseWithExtension("org/netbeans/modules/j2ee/deployment/impl/ui/resources/wait.gif"); // NOI18N Children.Array children = new Children.Array(); children.add(new Node[]{node}); return new AbstractNode(children); } }
@Override protected Node[] createNodesForKey(String key) { AbstractNode node = new AbstractNode(Children.create(new PlatformChildFactory(key), false)); node.setIconBaseWithExtension("com/github/kayak/logging/icons/folder.svg"); node.setDisplayName(key); return new Node[] {node}; } }
@Override protected Node[] createNodesForKey(Folders key) { if(key == Folders.DIRECTORY) { AbstractNode node = new AbstractNode(Children.create(new LogDirectoryFactory(), true)); node.setDisplayName("Log directory"); node.setIconBaseWithExtension("com/github/kayak/logging/icons/folder.png"); return new Node[] {node}; } else if(key == Folders.FAVOURTIES) { AbstractNode node = new AbstractNode(Children.create(new LogFavouritesFactory(), true)); node.setDisplayName("Favourites"); node.setIconBaseWithExtension("com/github/kayak/logging/icons/bookmark-new.png"); return new Node[] {node}; } return null; }
@Override protected Node[] createNodesForKey(Object key) { if(key instanceof Folder) { Folder folder = (Folder) key; switch(folder) { case DISCOVERY: AbstractNode discoveryNode = new AbstractNode(new ConnectionChildrenFactory(BusURLNode.Type.DISCOVERY)); discoveryNode.setDisplayName("Auto discovery"); discoveryNode.setIconBaseWithExtension("com/github/kayak/ui/icons/network-wireless.png"); return new Node[] { discoveryNode }; case FAVOURITES: AbstractNode favouritesFolderNode = new AbstractNode(new ConnectionChildrenFactory(BusURLNode.Type.FAVOURITE)); favouritesFolderNode.setDisplayName("Favourites"); favouritesFolderNode.setIconBaseWithExtension("com/github/kayak/ui/icons/bookmark-new.png"); return new Node[] { favouritesFolderNode }; case RECENT: AbstractNode recentFolderNode = new AbstractNode(new ConnectionChildrenFactory(BusURLNode.Type.RECENT)); recentFolderNode.setDisplayName("Recent"); recentFolderNode.setIconBaseWithExtension("com/github/kayak/ui/icons/folder.png"); return new Node[] { recentFolderNode }; default: return null; } } return null; }
public MEDesignNode (MEDesignDataObject dataObject) { super (JavaDataSupport.createJavaNode (dataObject.getPrimaryFile ())); String projectType = IOSupport.resolveProjectType (IOSupport.getDataObjectContext (dataObject)); if (projectType == null || ProjectTypeInfo.getProjectTypeInfoFor (projectType) == null) return; String iconResource = ProjectTypeInfo.getProjectTypeInfoFor (projectType).getIconResource (); ((AbstractNode) getOriginal ()).setIconBaseWithExtension (iconResource); }
public static Node[] createNodes(Archetype arch, Children childs) { if (arch == LOADING_ARCHETYPE) { AbstractNode loading = new AbstractNode(Children.LEAF); loading.setName("loading"); //NOI18N loading.setDisplayName(NbBundle.getMessage(ChooseArchetypePanel.class, "LBL_Loading")); return new Node[] {loading}; } AbstractNode nd = new AbstractNode(childs); String dn = arch.getName() == null ? arch.getArtifactId() : arch.getName(); nd.setName(dn); nd.setDisplayName(dn); nd.setIconBaseWithExtension("org/codehaus/mevenide/netbeans/Maven2Icon.gif"); //NOI18N nd.setValue(PROP_ARCHETYPE, arch); return new Node[] { nd }; }
node.setIconBaseWithExtension("org/netbeans/modules/visualweb/dataconnectivity/resources/datasource.png"); //NOI18N