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


Java BeanTreeView.setSelectionMode方法代码示例

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


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

示例1: 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

示例2: 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

示例3: 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

示例4: 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

示例5: 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

示例6: 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

示例7: 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

示例8: Panel

import org.openide.explorer.view.BeanTreeView; //导入方法依赖的package包/类
public Panel() {
    setLayout(new BorderLayout());

    BeanTreeView view = new BeanTreeView();
    view.setRootVisible(true);
    view.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    add(view, BorderLayout.CENTER);
}
 
开发者ID:tunnelvisionlabs,项目名称:goworks,代码行数:9,代码来源:TreeNavigatorPanel.java


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