本文整理汇总了Java中org.openide.explorer.view.NodeListModel类的典型用法代码示例。如果您正苦于以下问题:Java NodeListModel类的具体用法?Java NodeListModel怎么用?Java NodeListModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
NodeListModel类属于org.openide.explorer.view包,在下文中一共展示了NodeListModel类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ToolBarView
import org.openide.explorer.view.NodeListModel; //导入依赖的package包/类
ToolBarView(final ExplorerManager manager, org.openide.nodes.Node root, javax.swing.Action helpAction) {
super();
this.manager=manager;
this.helpAction=helpAction;
// same as before...
setLayout(new java.awt.GridBagLayout());
ActionMap map = getActionMap();
// ...and initialization of lookup variable
lookup = ExplorerUtils.createLookup (manager, map);
ChoiceView cView = new ChoiceView();
((NodeListModel)(cView.getModel())).setNode(root);
setFloatable(false);
((NodeListModel)(cView.getModel())).setDepth(5);
java.awt.GridBagConstraints gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 0;
gridBagConstraints.gridy = 0;
gridBagConstraints.insets = new java.awt.Insets(0, 2, 4, 0);
add(cView,gridBagConstraints);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 1;
gridBagConstraints.gridy = 0;
gridBagConstraints.weightx = 1.0;
JPanel filler = new JPanel();
add(filler,gridBagConstraints);
javax.swing.JButton helpButton = new javax.swing.JButton(helpAction);
helpButton.setText("");
helpButton.setContentAreaFilled(false);
helpButton.setFocusPainted(false);
helpButton.setBorderPainted(false);
gridBagConstraints = new java.awt.GridBagConstraints();
gridBagConstraints.gridx = 2;
gridBagConstraints.gridy = 0;
//gridBagConstraints.weightx = 1.0;
add(helpButton,gridBagConstraints);
}
示例2: createModel
import org.openide.explorer.view.NodeListModel; //导入依赖的package包/类
@Override
protected NodeListModel createModel() {
return new CheckNodeListModel();
}