Package org.netbeans.swing.etable

Examples of org.netbeans.swing.etable.ETableColumn


        mdl.getTreePathSupport().addTreeWillExpandListener(expandingTreeListener);
       
        resultsOutline.setModel(mdl);
        TableColumnModel columnModel = resultsOutline.getColumnModel();

        ETableColumn nodeColumn0 = (ETableColumn) columnModel.getColumn(0);
        Color backColor = resultsOutline.getBackground();
        nodeColumn0.setNestedComparator(new DefaultMutableTreeNodeComparator(nodeColumn0));
        nodeColumn0.setCellRenderer(new NodeRenderer(backColor));
        resultsOutline.setDefaultRenderer(Object.class, new NodeRenderer(backColor));

        resultsOutline.setShowHorizontalLines(false);
        resultsOutline.setShowVerticalLines(true);
        resultsOutline.setGridColor(TreeUtils.getDarkerColor(backColor));
       
        OutlineColumn[] columns = OutlineColumn.values();
        for (int i = 0; i < columns.length; i++) {
            ETableColumn nodeColumn = (ETableColumn) columnModel.getColumn(i + 1);
            nodeColumn.setNestedComparator(new OutlineComparableComparator(nodeColumn));

            TableCellRenderer cellRenderer = OutlineColumn.values()[i].getRenderer(backColor);
            if (cellRenderer != null) {
                nodeColumn.setCellRenderer(cellRenderer);
            }
        }
       
        // VITAL! We do not want to recreate columns after we have set them up
        // with their comparators!
View Full Code Here

TOP

Related Classes of org.netbeans.swing.etable.ETableColumn

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.