當前位置: 首頁>>代碼示例>>Java>>正文


Java AbstractNode.setDisplayName方法代碼示例

本文整理匯總了Java中org.openide.nodes.AbstractNode.setDisplayName方法的典型用法代碼示例。如果您正苦於以下問題:Java AbstractNode.setDisplayName方法的具體用法?Java AbstractNode.setDisplayName怎麽用?Java AbstractNode.setDisplayName使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.openide.nodes.AbstractNode的用法示例。


在下文中一共展示了AbstractNode.setDisplayName方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: showFinishedInfo

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
public void showFinishedInfo() {
    final AbstractNode an = new AbstractNode(Children.LEAF);
    an.setIconBaseWithExtension(
            "org/netbeans/modules/search/res/info.png");            //NOI18N
    an.setDisplayName(NbBundle.getMessage(ResultView.class,
            "TEXT_INFO_REPLACE_FINISHED", //NOI18N
            resultModel.getSelectedMatchesCount()));
    Mutex.EVENT.writeAccess(new Runnable() {
        @Override
        public void run() {
            getOutlineView().getOutline().setRootVisible(true);
            getExplorerManager().setRootContext(an);
            getOutlineView().validate();
            getOutlineView().repaint();
            btnNext.setEnabled(false);
            btnPrev.setEnabled(false);
            btnTreeView.setEnabled(false);
            btnFlatView.setEnabled(false);
            btnExpand.setEnabled(false);
        }
    });
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:23,代碼來源:BasicReplaceResultsPanel.java

示例2: TestTreeView

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
TestTreeView() {
    super();
    tree.setAutoscrolls(true);

    setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
    vertScrollBar = getVerticalScrollBar();
    
    rootNode = new AbstractNode(new TreeChildren());
    rootNode.setDisplayName("Root node");
    
    tree.setRowHeight(20);
    
    Dimension prefSize = new Dimension(200, 6 * tree.getRowHeight() + 8);
    prefSize.width = (int) (prefSize.width * 1.25f)
                     + vertScrollBar.getWidth();
    setPreferredSize(prefSize);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:18,代碼來源:TreeViewTest.java

示例3: node

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Messages({"# {0} - label of source group", "# {1} - project name", "ERR_WrongSG={0} is owned by project {1}, cannot be used here, see issue #138310 for details."})
@Override
public Node node(SourceGroup group) {
    Project owner = FileOwnerQuery.getOwner(group.getRootFolder());
    if (owner != project) {
        if (owner == null) {
            //#152418 if project for folder is not found, just look the other way..
            Logger.getLogger(SourcesNodeFactory.class.getName()).log(Level.INFO, "Cannot find a project owner for folder {0}", group.getRootFolder()); //NOI18N
            return null;
        }
        AbstractNode erroNode = new AbstractNode(Children.LEAF);
        String prjText = ProjectUtils.getInformation(owner).getDisplayName();
        erroNode.setDisplayName(ERR_WrongSG(group.getDisplayName(), prjText));
        return erroNode;
    }
    return PackageView.createPackageView(group);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:18,代碼來源:SourcesNodeFactory.java

示例4: 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));
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:23,代碼來源:ShowExecutionPanel.java

示例5: createNodes

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Override
protected Node[] createNodes(StackTraceElement key) {
    AbstractNode an = new AbstractNode(Children.LEAF);
    an.setName(key.getClassName() + "." + key.getMethodName());
    an.setDisplayName(NbBundle.getMessage(UINode.class, "MSG_StackTraceElement", 
        new Object[] { 
            key.getFileName(),
            key.getClassName(),
            key.getMethodName(),
            key.getLineNumber(),
            afterLastDot(key.getClassName()),
        }
    ));
    an.setIconBaseWithExtension("org/netbeans/modules/uihandler/stackframe.gif"); // NOI18N
    return new Node[] { an };
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:17,代碼來源:UINode.java

示例6: initNodes

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
private void initNodes() {
    if (libChildren == null) {
        libChildren = new LibrariesChildren();
        realRoot = new AbstractNode(libChildren);
        realRoot.setName(getMessage("LBL_ModuleListClusters"));
        realRoot.setDisplayName(getMessage("LBL_ModuleListClustersModules"));
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:SuiteCustomizerLibraries.java

示例7: getRootNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
private Node getRootNode(FileObject fileInProject, Filter filter) {
    Children children = new Children.Array();
    children.add(createPackageRootNodes(fileInProject, choosingFolder, filter));
    AbstractNode root = new AbstractNode(children);
    root.setIconBaseWithExtension("org/netbeans/modules/form/editors2/iconResourceRoot.gif"); // NOI18N
    root.setDisplayName(NbBundle.getMessage(ClassPathFileChooser.class, "CTL_ClassPathName")); // NOI18N
    // ProjectUtils.getInformation(prj).getDisplayName()
    return root;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:10,代碼來源:ClassPathFileChooser.java

示例8: 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);
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:9,代碼來源:LazyProject.java

示例9: createPhaseNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
private Node createPhaseNode(Pair<String, List<ExecutionEventObject.Tree>> key) {
    Children childs;
    if (showOnlyErrors) {
        boolean atLeastOne = false;
        for (ExecutionEventObject.Tree ch : key.second()) {
            ExecutionEventObject end = ch.getEndEvent();
            if (end != null) {
                if (ExecutionEvent.Type.ProjectFailed.equals(end.type)
                        || ExecutionEvent.Type.MojoFailed.equals(end.type)
                        || ExecutionEvent.Type.ForkedProjectFailed.equals(end.type)
                        || ExecutionEvent.Type.ForkFailed.equals(end.type)) {
                    atLeastOne = true;
                    break;
                }
            }
        }
        if (atLeastOne) {
            childs = createChildren(key.second());
        } else {
            childs = Children.LEAF;
        }
    } else {
        childs = createChildren(key.second());
    }
    AbstractNode nd = new AbstractNode(childs, Lookup.EMPTY);
    nd.setName(key.first());
    nd.setDisplayName(key.first());
    nd.setIconBaseWithExtension(ICON_PHASE);
    return nd;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:31,代碼來源:ShowExecutionPanel.java

示例10: createWaitNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
@Messages("LBL_Wait=Please Wait...")
private static Node createWaitNode() {
    AbstractNode an = new AbstractNode(Children.LEAF);
    an.setIconBaseWithExtension(WAIT_GIF);
    an.setDisplayName(Bundle.LBL_Wait());
    return an;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:8,代碼來源:GoalsPanel.java

示例11: createNodes

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
protected Node[] createNodes(Variable var) {
    Children ch = Children.LEAF;
    AbstractNode n = new AbstractNode(ch, Lookups.singleton(var)) {
        @Override
        public Image getIcon(int type) {
            return iconDelegate.getIcon(type);
        }
    };
    n.setName(var.getName());
    n.setDisplayName(var.getName() + "("+var.getValue().getPath()+")"); // NOI18N
    n.setShortDescription(var.getName() + "("+var.getValue().getPath()+")"); // NOI18N
    return new Node[] {n};
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:14,代碼來源:VariablesPanel.java

示例12: createErrorNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
static Node createErrorNode(ModelBuildingException x) {
    AbstractNode an = new AbstractNode(Children.LEAF);
    StringBuilder b = new StringBuilder();
    for (ModelProblem p : x.getProblems()) {
        if (b.length() > 0) {
            b.append("; ");
        }
        b.append(p.getMessage());
    }
    an.setDisplayName(b.toString());
    return an;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:13,代碼來源:POMModelPanel.java

示例13: setRootNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
/**
 * Sets the given <code>rootNode</code> as the root
 * of this view and adds its associated section node 
 * panel as a section for this.
 */
public void setRootNode(SectionNode rootNode) {
    this.rootNode = rootNode;
    Children root = new Children.Array();
    root.add(new Node[]{rootNode});
    AbstractNode mainNode = new AbstractNode(root);
    mainNode.setDisplayName(rootNode.getDisplayName());
    mainNode.setIconBaseWithExtension(rootNode.getIconBase() + ".gif"); //NOI18N
    setRoot(mainNode);
    addSection(rootNode.getSectionNodePanel());
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:SectionNodeView.java

示例14: setUp

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
protected void setUp() throws Exception {
    n1 = new AbstractNode(Children.LEAF);
    n1.setName("n1");
    n1.setDisplayName("text");
    n2 = new AbstractNode(Children.LEAF);
    n2.setName("n2");
    n2.setDisplayName("text");
    n3 = new AbstractNode(Children.LEAF);
    n3.setName("n3");
    n3.setDisplayName("somethingelse");
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:12,代碼來源:NodeActionTest.java

示例15: createPartialNode

import org.openide.nodes.AbstractNode; //導入方法依賴的package包/類
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;
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:7,代碼來源:GroupListChildren.java


注:本文中的org.openide.nodes.AbstractNode.setDisplayName方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。