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


Java DefaultOutlineModel类代码示例

本文整理汇总了Java中org.netbeans.swing.outline.DefaultOutlineModel的典型用法代码示例。如果您正苦于以下问题:Java DefaultOutlineModel类的具体用法?Java DefaultOutlineModel怎么用?Java DefaultOutlineModel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DefaultOutlineModel类属于org.netbeans.swing.outline包,在下文中一共展示了DefaultOutlineModel类的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:13,代码来源:SystemPropertiesTopComponent.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:SelectEventsPanel.java

示例3: setNodesColumnName

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
void setNodesColumnName(String name, String description) {
    OutlineModel m = getOutline().getOutlineModel();
    if (m instanceof DefaultOutlineModel) {
        ((DefaultOutlineModel) m).setNodesColumnLabel(name);
    }
    setPropertyColumnDescription(name, description);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:OutlineTable.java

示例4: 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);
}
 
开发者ID:hypergraphdb,项目名称:viewer,代码行数:16,代码来源:ObjectInspector.java

示例5: setXSModel

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
public void setXSModel(XSModel model, MyNamespaceSupport nsSupport){
    Navigator navigator1 = new FilteredTreeNavigator(new XSNavigator(), new XSDisplayFilter());
    Navigator navigator = new PathNavigator(navigator1);
    XSPathDiplayFilter filter = new XSPathDiplayFilter(navigator1);
    navigator = new FilteredTreeNavigator(navigator, filter);
    
    TreeModel treeModel = new NavigatorTreeModel(new Path(model), navigator);
    RowModel rowModel = new DefaultRowModel(new DefaultColumn("Detail", String.class, new XSDisplayValueVisitor(nsSupport))/*, new ClassColumn()*/);

    outline.setModel(DefaultOutlineModel.createOutlineModel(treeModel, rowModel));
    outline.getColumnModel().getColumn(1).setMinWidth(150);

    DefaultRenderDataProvider dataProvider = new DefaultRenderDataProvider();
    dataProvider.setDisplayNameVisitor(new XSDisplayNameVisitor(nsSupport, filter));
    dataProvider.setForegroundVisitor(new XSColorVisitor(filter));
    dataProvider.setFontStyleVisitor(new XSFontStyleVisitor(filter));
    outline.setRenderDataProvider(dataProvider);
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:20,代码来源:XSDOutlinePanel.java

示例6: initTable

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
private void initTable() {
        Outline outline = outlineView1.getOutline();
        outline.setRootVisible(false);
//        outline.setAutoResizeMode(ETable.AUTO_RESIZE_OFF);
//        TableColumnModel columnModel = outline.getColumnModel();
//        ETableColumn column = (ETableColumn) columnModel.getColumn(0);
//        ((ETableColumnModel) columnModel).setColumnHidden(column, true);
        ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel(Bundle.COL_Attribute());
        OrderingAttributeNode.createTableColumns(outlineView1);
        outline.setFullyNonEditable(true);
    }
 
开发者ID:donatellosantoro,项目名称:Llunatic,代码行数:12,代码来源:OrderingAttributesTopComponent.java

示例7: initTable

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
private void initTable() {
        outlineView1.setNodePopupFactory(new TablePopupFactory());
        Outline outline = outlineView1.getOutline();
        outline.setRootVisible(false);
        outline.setCellSelectionEnabled(true);
//        outline.setAutoResizeMode(ETable.AUTO_RESIZE_OFF);
        outline.setAutoResizeMode(ETable.AUTO_RESIZE_ALL_COLUMNS);
        ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel("tid");
        outline.setFullyNonEditable(true);
    }
 
开发者ID:donatellosantoro,项目名称:Llunatic,代码行数:11,代码来源:DbPagedTableTopComponent.java

示例8: initTable

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
private void initTable() {
        outlineView1.setNodePopupFactory(new TablePopupFactory());
        Outline outline = outlineView1.getOutline();
        outline.setRootVisible(false);
        outline.setCellSelectionEnabled(true);
        outline.setAutoResizeMode(ETable.AUTO_RESIZE_OFF);
//        TableColumnModel columnModel = outline.getColumnModel();
//        ETableColumn column = (ETableColumn) columnModel.getColumn(0);
//        ((ETableColumnModel) columnModel).setColumnHidden(column, true);
        ((DefaultOutlineModel) outline.getOutlineModel()).setNodesColumnLabel("tid");
        outline.setFullyNonEditable(true);
    }
 
开发者ID:donatellosantoro,项目名称:Llunatic,代码行数:13,代码来源:DbTableTopComponent.java

示例9: onOpen

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
private void onOpen() {
    filterableEntries = new FilterableLabTreeModel(context);
    fileList.setModel(DefaultOutlineModel.createOutlineModel(filterableEntries, filterableEntries, false, "File"));
    searchField.setText("");
    searchPredicate = null;
    searchField.setEnabled(true);
    searchLabel.setEnabled(true);
}
 
开发者ID:jlaw90,项目名称:Grimja,代码行数:9,代码来源:MainWindow.java

示例10: 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);
}
 
开发者ID:Depter,项目名称:JRLib,代码行数:13,代码来源:SystemPropertiesTopComponent.java

示例11: getOutline

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
/** Returns outline view for displaying options for export/import. */
private Outline getOutline(TreeModel treeModel) {
    Outline outline = new Outline();
    outline.setModel(DefaultOutlineModel.createOutlineModel(
            treeModel,
            new OptionsRowModel(),
            true,
            NbBundle.getMessage(OptionsChooserPanel.class, "OptionsChooserPanel.outline.header.tree")));
    treeDataProvider = new OptionsTreeDataProvider();
    outline.setRenderDataProvider(treeDataProvider);
    //outline.setRootVisible(false);
    outline.getTableHeader().setReorderingAllowed(false);
    outline.setColumnHidingAllowed(false);
    // a11y
    outline.getAccessibleContext().setAccessibleName(NbBundle.getMessage(OptionsChooserPanel.class, "OptionsChooserPanel.outline.AN"));
    outline.getAccessibleContext().setAccessibleDescription(NbBundle.getMessage(OptionsChooserPanel.class, "OptionsChooserPanel.outline.AD"));
    lblHint.setLabelFor(outline);

    final Outline out = outline;
    outline.addKeyListener(new java.awt.event.KeyAdapter() {
        @Override
        public void keyPressed(KeyEvent evt) {
            if (evt.getKeyCode() == KeyEvent.VK_SPACE) {
                int[] rows = out.getSelectedRows();
                for (int row : rows) {
                    if (row >= 0) {
                        Object node = out.getValueAt(row, 0);
                        Boolean isSelected = treeDataProvider.isSelected(node);
                        if(isSelected == null) { // node is Category or Root and is partially selected
                            treeDataProvider.setSelected(node, Boolean.FALSE);
                        } else if (treeDataProvider.isCheckEnabled(node)) {
                            treeDataProvider.setSelected(node, !isSelected);
                        }
                    }
                }
            }
        }
    });

    return outline;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:42,代码来源:OptionsChooserPanel.java

示例12: main

import org.netbeans.swing.outline.DefaultOutlineModel; //导入依赖的package包/类
@SuppressWarnings({"unchecked"})
public static void main(String[] args) throws Exception{
    String url = JOptionPane.showInputDialog("File/URL", "http://schemas.xmlsoap.org/wsdl/");
    if(url==null)
        return;
    XSModel model = new XSParser().parse(url);
    MyNamespaceSupport nsSupport = XSUtil.createNamespaceSupport(model);

    Navigator navigator1 = new FilteredTreeNavigator(new XSNavigator(), new XSDisplayFilter());
    Navigator navigator = new PathNavigator(navigator1);
    XSPathDiplayFilter filter = new XSPathDiplayFilter(navigator1);
    navigator = new FilteredTreeNavigator(navigator, filter);
    TreeModel treeModel = new NavigatorTreeModel(new Path(model), navigator);
    RowModel rowModel = new DefaultRowModel(new DefaultColumn("Detail", String.class, new XSDisplayValueVisitor(nsSupport))/*, new ClassColumn()*/);
    
    OutlineNavigatorTest test = new OutlineNavigatorTest("Navigator Test");
    Outline outline = test.getOutline();
    outline.setShowGrid(false);
    outline.setFont(new Font(Font.MONOSPACED, Font.PLAIN, 14));
    outline.setModel(DefaultOutlineModel.createOutlineModel(treeModel, rowModel));
    outline.getColumnModel().getColumn(1).setMinWidth(150);

    DefaultRenderDataProvider dataProvider = new DefaultRenderDataProvider();
    dataProvider.setDisplayNameVisitor(new XSDisplayNameVisitor(nsSupport, filter));
    dataProvider.setForegroundVisitor(new XSColorVisitor(filter));
    dataProvider.setFontStyleVisitor(new XSFontStyleVisitor(filter));
    outline.setRenderDataProvider(dataProvider);
    
    test.setVisible(true);
}
 
开发者ID:santhosh-tekuri,项目名称:jlibs,代码行数:31,代码来源:OutlineNavigatorTest.java

示例13: 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();
}
 
开发者ID:ltrr-arizona-edu,项目名称:tellervo,代码行数:18,代码来源:ImportView.java


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