本文整理汇总了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());
}
示例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;
}
示例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;
}
示例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);
}
示例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"));
}
示例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);
}
示例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);
}
示例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);
}