/* Creates and returns the instance of the node * representing the status 'INFO' of the node. * It is used when it spent more time to create elements hierarchy. * @return the wait node. */ 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; }
@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}; } }
@Override public void destroy() throws IOException { super.destroy(); DeleteJavaEEModuleAction deleteModuleAction = SystemAction.get(DeleteJavaEEModuleAction.class); deleteModuleAction.performAction(new Node[] {this}); }
@Override public Action[] getActions(boolean context) { super.getActions(context); ArrayList<Action> actions = new ArrayList<Action>(); // A list of actions for this node if (m_hasEditor) actions.add(new TreeNodeAction(getLookup())); if (m_canRename) actions.add(new RenameAction(getLookup())); if (m_canDelete) actions.add(new DeleteAction(getLookup())); Action[] customActions = getCustomActions(context); if (customActions != null) { for (Action ca : customActions) { actions.add(ca); } } Action[] array = new Action[actions.size()]; return actions.toArray(array); }
@Override public void resultChanged(LookupEvent le) { Logger.getLogger(OscillogramNavigatorPanel.class.getName()) .log(Level.INFO, manager.getRootContext().getDisplayName()); Collection<? extends ChannelList> allInstances = this.result.allInstances(); if (!allInstances.isEmpty()) { ChannelList list = allInstances.iterator().next(); AbstractNode rn = new AbstractNode(Children.create(new ChannelChildFactory(list.getChannels()), false)); rn.setName(list.getName()); rn.setIconBaseWithExtension("tw/edu/sju/ee/eea/module/iepe/project/iepe_project.png"); manager.setRootContext(rn); return; } // manager.setRootContext(Node.EMPTY); }
/** * Sets the {@link Process} whose information to display * * @param processFullId * @param p */ public void setData(String processFullId, Process p) { this.processFullId = processFullId; process = p; setName(processFullId); Activities activities = ((Activities) p.getActivity().getValue()); AbstractNode root = new AbstractNode( Children.create(new ActivitiesChildFactory(activities), false), Lookups.singleton(p)); root.setDisplayName(processFullId); em.setRootContext(root); Node n = root.getChildren().getNodes()[0]; Property[] columnProperties = n.getPropertySets()[0].getProperties(); treeTableView.setProperties(columnProperties); treeTableView.setTreePreferredWidth(600); treeTableView.setTableColumnPreferredWidth(0, 75); treeTableView.setTableColumnPreferredWidth(1, 150); ((myTreeTableView) treeTableView).setRenderers(); openTreeToCurrentState(); }
@Override public void setName(String name) { String oldName = m_name; if (m_name.equals(name)) return; super.setName(name); m_name = name; onRename(oldName, m_name); if (m_topComponent != null) m_topComponent.setDisplayName(m_name); }
@Override public void destroy() throws IOException { super.destroy(); BookmarkUtils.removeBookmarkUnderLock(bookmarkInfo); }
/* Creates and returns the instance of the node * representing the status 'WAIT' of the node. * It is used when it spent more time to create elements hierarchy. * @return the wait node. */ 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; }
public ExtractedContentNode(SleuthkitCase skCase) { super(Children.create(new ExtractedContentChildren(skCase), true), Lookups.singleton(NAME)); super.setName(NAME); super.setDisplayName(NAME); this.setIconBaseWithExtension("org/sleuthkit/autopsy/images/extracted_content.png"); }
@Override protected Node createNodeDelegate() { AbstractNode n = new AbstractNode(Children.LEAF); n.setName("Ahoj"); return n; }