当前位置: 首页>>代码示例>>Java>>正文


Java BeanTreeView.setRootVisible方法代码示例

本文整理汇总了Java中org.openide.explorer.view.BeanTreeView.setRootVisible方法的典型用法代码示例。如果您正苦于以下问题:Java BeanTreeView.setRootVisible方法的具体用法?Java BeanTreeView.setRootVisible怎么用?Java BeanTreeView.setRootVisible使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.openide.explorer.view.BeanTreeView的用法示例。


在下文中一共展示了BeanTreeView.setRootVisible方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ServicesTab

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
private ServicesTab() {
    manager = new ExplorerManager();
    manager.setRootContext(new ServicesNode());
    ActionMap map = getActionMap();
    map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(manager));
    map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager));
    map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager));
    map.put("delete", ExplorerUtils.actionDelete(manager, false));
    associateLookup(ExplorerUtils.createLookup(manager, map));
    view = new BeanTreeView();
    view.setRootVisible(false);
    setLayout(new BorderLayout());
    add(view);
    setName(ID);
    setDisplayName(NbBundle.getMessage(ServicesTab.class, "LBL_Services"));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:ServicesTab.java

示例2: BrowseFolders

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
/** Creates new form BrowseFolders */
public BrowseFolders( SourceGroup[] folders, Project project, String preselectedFileName ) {
    initComponents();
    this.folders = folders;
    this.project = project;
    
    manager = new ExplorerManager();        
    AbstractNode rootNode = new AbstractNode( new SourceGroupsChildren( folders, project ) );
    manager.setRootContext( rootNode );
    
    // Create the templates view
    btv = new BeanTreeView();
    btv.setRootVisible( false );
    btv.setSelectionMode( javax.swing.tree.TreeSelectionModel.SINGLE_TREE_SELECTION );
    btv.setBorder( SAMPLE_SCROLL_PANE.getBorder() );        
    btv.setPopupAllowed( false );
    btv.getAccessibleContext ().setAccessibleName (NbBundle.getMessage(BrowseFolders.class, "ACSN_BrowseFolders_folderPanel"));
    btv.getAccessibleContext ().setAccessibleDescription (NbBundle.getMessage(BrowseFolders.class, "ACSD_BrowseFolders_folderPanel"));
    expandSelection( preselectedFileName );
    //expandAllNodes( btv, manager.getRootContext() );
    folderPanel.add( btv, java.awt.BorderLayout.CENTER );      
    jLabel1.setLabelFor(btv.getViewport().getView());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:BrowseFolders.java

示例3: DMListPanel

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public DMListPanel(MavenProject project) {
    this.project = project;
    btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setDefaultActionAllowed(true);
    //lv.setDefaultProcessor(this);
    manager = new ExplorerManager();
    manager.addPropertyChangeListener(this);
    setLayout(new BorderLayout());
    add(btv, BorderLayout.CENTER);
    addAncestorListener(this);
    AddDependencyPanel.this.artifactsLabel.setLabelFor(btv);

    // disable tab if DM section not defined
    RPofDMListPanel.post(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:17,代码来源:AddDependencyPanel.java

示例4: getComponent

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public JComponent getComponent() {
    if (panel == null) {
        final BeanTreeView view = new BeanTreeView();
        view.setRootVisible(false);
        view.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        class Panel extends JPanel implements ExplorerManager.Provider, Lookup.Provider {
            // Make sure action context works correctly:
            private final Lookup lookup = ExplorerUtils.createLookup(manager, new ActionMap());
            {
                setLayout(new BorderLayout());
                add(view, BorderLayout.CENTER);
            }
            public ExplorerManager getExplorerManager() {
                return manager;
            }
            public Lookup getLookup() {
                return lookup;
            }
        }
        panel = new Panel();
    }
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:ErrorNavigatorProviderImpl.java

示例5: getComponent

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public JComponent getComponent() {
    if (panel == null) {
        final BeanTreeView view = new BeanTreeView();
        view.setRootVisible(true);
        view.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        class Panel extends JPanel implements ExplorerManager.Provider, Lookup.Provider {
            // Make sure action context works correctly:
            private final Lookup lookup = ExplorerUtils.createLookup(manager, new ActionMap());
            {
                setLayout(new BorderLayout());
                add(view, BorderLayout.CENTER);
            }
            public ExplorerManager getExplorerManager() {
                return manager;
            }
            public Lookup getLookup() {
                return lookup;
            }
        }
        panel = new Panel();
    }
    return panel;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:ElementNavigatorProviderImpl.java

示例6: BrowseFolders

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
/**
 * Creates new form BrowseFolders
 */
public BrowseFolders(SourceGroup[] folders, FileFilter filter) {
    initComponents();
    
    this.filter = filter;
    if (this.filter == null) {
        this.filter = new FileFilter() {
            public boolean accept(File pathname) {
                return true;
            }
        };
    }
    
    manager = new ExplorerManager();
    AbstractNode rootNode = new AbstractNode(new SourceGroupsChildren(folders));
    manager.setRootContext(rootNode);
    
    // Create the templates view
    BeanTreeView btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setSelectionMode(javax.swing.tree.TreeSelectionModel.SINGLE_TREE_SELECTION);
    btv.setBorder(SAMPLE_SCROLL_PANE.getBorder());
    btv.setDefaultActionAllowed(false);
    expandFirstLevel(btv);
    folderPanel.add(btv, java.awt.BorderLayout.CENTER);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:29,代码来源:BrowseFolders.java

示例7: BytecodeViewTopComponent

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
private BytecodeViewTopComponent() {
    initComponents();
    setName(NbBundle.getMessage(BytecodeViewTopComponent.class, "CTL_BytecodeViewTopComponent"));
    setToolTipText(NbBundle.getMessage(BytecodeViewTopComponent.class, "HINT_BytecodeViewTopComponent"));

    manager = new ExplorerManager();
    rootNode = new MethodNode(null, null, "");
    manager.setRootContext(rootNode);

    setLayout(new BorderLayout());

    treeView = new BeanTreeView();
    treeView.setRootVisible(false);
    this.add(BorderLayout.CENTER, treeView);
    associateLookup(ExplorerUtils.createLookup(manager, getActionMap()));
}
 
开发者ID:arodchen,项目名称:MaxSim,代码行数:17,代码来源:BytecodeViewTopComponent.java

示例8: RepositoryTopComponent

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
private RepositoryTopComponent() {
        initComponents();
        setName(NbBundle.getMessage(RepositoryTopComponent.class, "CTL_RepositoryTopComponent"));
        setToolTipText(NbBundle.getMessage(RepositoryTopComponent.class, "HINT_RepositoryTopComponent"));
//        setIcon(Utilities.loadImage(ICON_PATH, true));
        
        ActionMap map = this.getActionMap ();
        map.put(DefaultEditorKit.copyAction, ExplorerUtils.actionCopy(manager));
        map.put(DefaultEditorKit.cutAction, ExplorerUtils.actionCut(manager));
        map.put(DefaultEditorKit.pasteAction, ExplorerUtils.actionPaste(manager));
        associateLookup (ExplorerUtils.createLookup (manager, map));
        BeanTreeView view = new BeanTreeView();
        view.setRootVisible(false);
        manager.setRootContext(new AbstractNode(new ServerChildren()));
        add (view, BorderLayout.CENTER);
        //if ((Utilities.getOperatingSystem() & Utilities.OS_WINDOWS_MASK) != 0) {
        //    view.getViewport().getView().setFont(new Font ("SansSerif", Font.PLAIN, 12));
        //}
        
        jToolBar1.add(SystemAction.get(PublishReportUnitAction.class));
        jToolBar1.add(SystemAction.get(RunReportUnitButton.class).createContextAwareInstance(Utilities.actionsGlobalContext()));
    
        
    
    }
 
开发者ID:JockiHendry,项目名称:ireport-fork,代码行数:26,代码来源:RepositoryTopComponent.java

示例9: AddDependencyUI

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public AddDependencyUI(String libDef) {
    initComponents();
    lblDescription.setText(NbBundle.getMessage(AddDependencyUI.class, "LBL_Description", libDef));//NOI18N
    addButton = new JButton(NbBundle.getMessage(AddDependencyUI.class, "BTN_Add"));//NOI18N
    addButton.setEnabled(false);
    Node openProjectsNode = new AbstractNode(Children.create(new ChildFactory<Project>() {
        protected @Override boolean createKeys(List<Project> toPopulate) {
            for (Project project : OpenProjects.getDefault().getOpenProjects()) {
                if (project.getLookup().lookup(NbMavenProject.class) != null) {
                    toPopulate.add(project);
                }
            }
            return true;
        }
        protected @Override Node createNodeForKey(Project key) {
            return new OpenProjectNode(key);
        }
    }, true));
    explorerManager.setRootContext(openProjectsNode);
    BeanTreeView beanTreeView = (BeanTreeView) jScrollPane1;
    beanTreeView.setPopupAllowed(false);
    beanTreeView.setRootVisible(false);
    explorerManager.addPropertyChangeListener(new PropertyChangeListener() {
        public @Override void propertyChange(PropertyChangeEvent event) {
            if (event.getPropertyName().equals("selectedNodes")) {//NOI18N
                Node[] selectedNodes = explorerManager.getSelectedNodes();
                boolean enable=false;
                for (Node node : selectedNodes) {
                    if (node instanceof OpenProjectNode) {
                      enable=true;
                      break;

                    }
                }
                addButton.setEnabled(enable);
               
            }
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:41,代码来源:AddDependencyUI.java

示例10: CategoryView

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public CategoryView( CategoryModel categoryModel ) {

        this.categoryModel = categoryModel;

        // See #36315
        manager = new ExplorerManager();

        setLayout( new BorderLayout() );

        Dimension size = new Dimension( 220, 4 );
        btv = new BeanTreeView();    // Add the BeanTreeView
        btv.setSelectionMode( TreeSelectionModel.SINGLE_TREE_SELECTION );
        btv.setPopupAllowed( false );
        btv.setRootVisible( false );
        btv.setDefaultActionAllowed( false );
        btv.setMinimumSize( size );
        btv.setPreferredSize( size );
        btv.setMaximumSize( size );
        btv.setDragSource (false);
        this.add( btv, BorderLayout.CENTER );
        manager.setRootContext( createRootNode( categoryModel ) );
        manager.addPropertyChangeListener( this );
        categoryModel.addPropertyChangeListener( this );
        btv.expandAll();
        selectNode( categoryModel.getCurrentCategory() );

        btv.getAccessibleContext().setAccessibleName(NbBundle.getMessage(CategoryView.class,"AN_CatgoryView"));
        btv.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(CategoryView.class,"AD_CategoryView"));

    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:31,代码来源:CategoryView.java

示例11: QueryPanel

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
private QueryPanel() {
    btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setDefaultActionAllowed(true);
    btv.setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
    manager = new ExplorerManager();
    setLayout(new BorderLayout());
    add(btv, BorderLayout.CENTER);
    defSearchC = AddDependencyPanel.this.searchField.getForeground();
    manager.addPropertyChangeListener(this);
    AddDependencyPanel.this.resultsLabel.setLabelFor(btv);
    btv.getAccessibleContext().setAccessibleDescription(AddDependencyPanel.this.resultsLabel.getAccessibleContext().getAccessibleDescription());
    resultsRootNode = new ResultsRootNode();
    manager.setRootContext(resultsRootNode);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:AddDependencyPanel.java

示例12: OpenListPanel

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public OpenListPanel(Project project) {
    this.project = project;
    btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setDefaultActionAllowed(true);
    manager = new ExplorerManager();
    manager.addPropertyChangeListener(this);
    setLayout(new BorderLayout());
    add(btv, BorderLayout.CENTER);

    RPofOpenListPanel.post(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:AddDependencyPanel.java

示例13: QueryPanel

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
/** Creates new form FindResultsPanel */
private QueryPanel(NewPluginPanel plugPanel) {
    this.pluginPanel = plugPanel;
    btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setDefaultActionAllowed(false);
    manager = new ExplorerManager();
    manager.setRootContext(getNoResultsRoot());
    setLayout(new BorderLayout());
    add(btv, BorderLayout.CENTER);
    manager.addPropertyChangeListener(this);
    pluginPanel.lblPlugins.setLabelFor(btv);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:NewPluginPanel.java

示例14: SnippetPanelUI

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
/**
 * Creates new form SnippetPanelUI
 */
public SnippetPanelUI() {
    treeView = new BeanTreeView();

    initComponents();
    treeView.setRootVisible(false);
    
    manager.addPropertyChangeListener(this);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:SnippetPanelUI.java

示例15: BrowseFolders

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
/** Creates new form BrowseFolders */
public BrowseFolders(SourceGroup[] folders) {
    initComponents();
    this.folders = folders;
    manager = new ExplorerManager();
    AbstractNode rootNode = new AbstractNode(new SourceGroupsChildren(folders));
    manager.setRootContext(rootNode);

    // Create the templates view
    BeanTreeView btv = new BeanTreeView();
    btv.setRootVisible(false);
    btv.setSelectionMode(javax.swing.tree.TreeSelectionModel.SINGLE_TREE_SELECTION);
    btv.setBorder(SAMPLE_SCROLL_PANE.getBorder());
    folderPanel.add(btv, java.awt.BorderLayout.CENTER);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:16,代码来源:BrowseFolders.java


注:本文中的org.openide.explorer.view.BeanTreeView.setRootVisible方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。