本文整理汇总了Java中org.netbeans.swing.outline.DefaultOutlineModel.createOutlineModel方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultOutlineModel.createOutlineModel方法的具体用法?Java DefaultOutlineModel.createOutlineModel怎么用?Java DefaultOutlineModel.createOutlineModel使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.swing.outline.DefaultOutlineModel
的用法示例。
在下文中一共展示了DefaultOutlineModel.createOutlineModel方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initList
import org.netbeans.swing.outline.DefaultOutlineModel; //导入方法依赖的package包/类
private void initList(PropertyItem root) {
listModel = new PropertyListModel(root);
RowModel rowModel = new PropertyRowModel();
OutlineModel model = DefaultOutlineModel.createOutlineModel(listModel, rowModel, false, "Property");
Outline outline = new Outline(model);
outline.setRootVisible(false);
outline.setFillsViewportHeight(true);
outline.setShowHorizontalLines(true);
outline.setRenderDataProvider(new RenderData());
JScrollPane scroll = new JScrollPane(outline);
contentPanel.add(scroll, LIST);
}
示例2: setData
import org.netbeans.swing.outline.DefaultOutlineModel; //导入方法依赖的package包/类
public void setData(String[] names, boolean[] logging) {
int n = names.length;
for (int i = 0; i < n; i++) {
Event e = new Event(names[i], logging[i]);
events.add(e);
}
OutlineModel om = DefaultOutlineModel.createOutlineModel(new EventsTreeModel(events), new EventsRowModel(events));
table.setModel(om);
((Outline) table).setRenderDataProvider(new EventsDataProvider(events));
table.setShowHorizontalLines(false);
table.setTableHeader(null);
((Outline) table).setRootVisible(false);
}
示例3: setModelObject
import org.netbeans.swing.outline.DefaultOutlineModel; //导入方法依赖的package包/类
/**
* Sets the object to be inspected
* @param obj The Object to be inspected
*/
public void setModelObject(Object obj)
{
if(obj == null) return;
TreeModel treeMdl = new PropsTreeModel(obj);
DefaultOutlineModel mdl = (DefaultOutlineModel)
DefaultOutlineModel.createOutlineModel(treeMdl,
new PropsRowModel(), true);
mdl.setNodesColumnLabel("Property");
setModel(mdl);
}
示例4: initTree
import org.netbeans.swing.outline.DefaultOutlineModel; //导入方法依赖的package包/类
private void initTree(PropertyItem root) {
treeModel = new PropertyTableModel(root);
RowModel rowModel = new PropertyRowModel();
OutlineModel model = DefaultOutlineModel.createOutlineModel(treeModel, rowModel, false, "Property");
Outline outline = new Outline(model);
outline.setRootVisible(false);
outline.setFillsViewportHeight(true);
outline.setShowHorizontalLines(true);
outline.setRenderDataProvider(new RenderData());
JScrollPane scroll = new JScrollPane(outline);
contentPanel.add(scroll, TREE);
}
示例5: updateTreeTable
import org.netbeans.swing.outline.DefaultOutlineModel; //导入方法依赖的package包/类
/**
* Set the tree-table panel to show the data specified in the
* provided treeModel.
* @param treeModel
*/
private void updateTreeTable() {
TridasRepresentationTreeModel treeModel = model.getTreeModel();
OutlineModel mdl = DefaultOutlineModel.createOutlineModel(
treeModel, treeModel, true, "TRiDaS Entities");
this.treeTable.setModel(mdl);
ExpandImportTreeEvent e2 = new ExpandImportTreeEvent(true, model.getTreeModel(), treeTable);
e2.dispatch();
}