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


Java ETableColumn.setNestedComparator方法代码示例

本文整理汇总了Java中org.netbeans.swing.etable.ETableColumn.setNestedComparator方法的典型用法代码示例。如果您正苦于以下问题:Java ETableColumn.setNestedComparator方法的具体用法?Java ETableColumn.setNestedComparator怎么用?Java ETableColumn.setNestedComparator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.netbeans.swing.etable.ETableColumn的用法示例。


在下文中一共展示了ETableColumn.setNestedComparator方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testDescendingSortingTreeWithNaturallyStringOrdering

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testDescendingSortingTreeWithNaturallyStringOrdering () throws InterruptedException, IllegalAccessException, InvocationTargetException {
        ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
        ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
        etcm.setColumnSorted (etc, false, 1); // descending order
        etc.setNestedComparator (testComarator);
        view.expandNode (toExpand200_299);

//        org.openide.DialogDescriptor dd = new org.openide.DialogDescriptor (component, "", true, null);
//        java.awt.Dialog d = org.openide.DialogDisplayer.getDefault ().createDialog (dd);
//        d.setVisible (true);

        // should look like
        // - [2-index from 200 to 299]
        //   [299]
        //   [298]
        // + [10-index from 100 to 199]
        //   ....
        // + [1-index from 0 to 99]
        assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (1, 0).toString ());
        assertEquals ("[10-index from 100 to 199]", view.getOutline ().getValueAt (0, 0).toString ());
        assertEquals ("[299]", view.getOutline ().getValueAt (2, 0).toString ());
        assertEquals ("[298]", view.getOutline ().getValueAt (3, 0).toString ());
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:OutlineViewTest.java

示例2: testDescendingSortingTreeWithCustomComparator

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testDescendingSortingTreeWithCustomComparator () throws InterruptedException, IllegalAccessException, InvocationTargetException {
        ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
        ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
        etc.setNestedComparator (testComarator);
        etcm.setColumnSorted (etc, false, 1); // descending order
        view.expandNode (toExpand200_299);

//        org.openide.DialogDescriptor dd = new org.openide.DialogDescriptor (component, "", true, null);
//        java.awt.Dialog d = org.openide.DialogDisplayer.getDefault ().createDialog (dd);
//        d.setVisible (true);

        // should look like
        // + [10-index from 100 to 199]
        // - [2-index from 200 to 299]
        //   [299]
        //   [298]
        //   ....
        // + [1-index from 0 to 99]
        assertEquals ("[10-index from 100 to 199]", view.getOutline ().getValueAt (0, 0).toString ());
        assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (1, 0).toString ());
        assertEquals ("[299]", view.getOutline ().getValueAt (2, 0).toString ());
        assertEquals ("[298]", view.getOutline ().getValueAt (3, 0).toString ());
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:OutlineViewTest.java

示例3: testAscendingSortingTreeWithCustomComparator

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testAscendingSortingTreeWithCustomComparator () throws InterruptedException, IllegalAccessException, InvocationTargetException {
        ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
        ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
        etc.setNestedComparator (testComarator);
        etcm.setColumnSorted (etc, true, 1); // ascending order

//        org.openide.DialogDescriptor dd = new org.openide.DialogDescriptor (component, "", true, null);
//        java.awt.Dialog d = org.openide.DialogDisplayer.getDefault ().createDialog (dd);
//        d.setVisible (true);

        view.expandNode (toExpand0_99);

        // should look like
        // - [1-index from 0 to 99]
        //   [0]
        //   [1]
        //   [2]
        //   ....
        // + [2-index from 200 to 299]
        // + [10-index from 100 to 199]
        assertEquals ("[1-index from 0 to 99]", view.getOutline ().getValueAt (0, 0).toString ());
        assertEquals ("[0]", view.getOutline ().getValueAt (1, 0).toString ());
        assertEquals ("[1]", view.getOutline ().getValueAt (2, 0).toString ());
        assertEquals ("[2]", view.getOutline ().getValueAt (3, 0).toString ());
        assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (101, 0).toString ());
    }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:27,代码来源:OutlineViewTest.java

示例4: setupColumns

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
private void setupColumns() {
    // create colomns
    ResourceBundle loc = NbBundle.getBundle(FileTablePanel.class);            
    if(versioningSystem != null) {
        addPropertyColumn(RevisionNode.PROPERTY_NAME_VERSION, loc.getString("LBL_LocalHistory_Column_Version"));                    // NOI18N            
        setPropertyColumnDescription(RevisionNode.PROPERTY_NAME_VERSION, loc.getString("LBL_LocalHistory_Column_Version_Desc"));    // NOI18N            
        addPropertyColumn(RevisionNode.PROPERTY_NAME_USER, loc.getString("LBL_LocalHistory_Column_User"));                          // NOI18N            
        setPropertyColumnDescription(RevisionNode.PROPERTY_NAME_USER, loc.getString("LBL_LocalHistory_Column_User_Desc"));          // NOI18N            
    } 
    addPropertyColumn(RevisionNode.PROPERTY_NAME_LABEL, loc.getString("LBL_LocalHistory_Column_Label"));                            // NOI18N            
    setPropertyColumnDescription(RevisionNode.PROPERTY_NAME_LABEL, loc.getString("LBL_LocalHistory_Column_Label_Desc"));            // NOI18N            

    // comparators
    ETableColumnModel m = (ETableColumnModel) getOutline().getColumnModel();
    ETableColumn etc = (ETableColumn) m.getColumn(0);
    etc.setNestedComparator(new NodeComparator(etc));
    m.setColumnSorted(etc, false, 1);                
    int idx = 1;
    if(versioningSystem != null) {
        setPropertyComparator(idx++);                    
        setPropertyComparator(idx++);
    }
    setPropertyComparator(idx++);                
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:25,代码来源:HistoryFileView.java

示例5: testDescendingSortingTreeWithNaturallyStringOrderingViaETable

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testDescendingSortingTreeWithNaturallyStringOrderingViaETable () throws InterruptedException, IllegalAccessException, InvocationTargetException {
    ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
    ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
    etc.setNestedComparator (testComarator);
    view.getOutline ().setColumnSorted (0, false, 1); // descending order
    view.expandNode (toExpand200_299);

    assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (1, 0).toString ());
    assertEquals ("[10-index from 100 to 199]", view.getOutline ().getValueAt (0, 0).toString ());
    assertEquals ("[299]", view.getOutline ().getValueAt (2, 0).toString ());
    assertEquals ("[298]", view.getOutline ().getValueAt (3, 0).toString ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:OutlineViewTest.java

示例6: testDescendingSortingTreeWithCustomComparatorViaETable

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testDescendingSortingTreeWithCustomComparatorViaETable() throws InterruptedException, IllegalAccessException, InvocationTargetException {
    ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
    ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
    etc.setNestedComparator (testComarator);
    view.getOutline().setColumnSorted (0, false, 1); // descending order
    view.expandNode (toExpand200_299);

    assertEquals ("[10-index from 100 to 199]", view.getOutline ().getValueAt (0, 0).toString ());
    assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (1, 0).toString ());
    assertEquals ("[299]", view.getOutline ().getValueAt (2, 0).toString ());
    assertEquals ("[298]", view.getOutline ().getValueAt (3, 0).toString ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:OutlineViewTest.java

示例7: testAscendingSortingTreeWithCustomComparatorViaETable

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
public void testAscendingSortingTreeWithCustomComparatorViaETable() throws InterruptedException, IllegalAccessException, InvocationTargetException {
    ETableColumnModel etcm = (ETableColumnModel) view.getOutline ().getColumnModel ();
    ETableColumn etc = (ETableColumn) etcm.getColumn (0); // tree column
    etc.setNestedComparator (testComarator);
    view.getOutline().setColumnSorted (0, true, 1); // ascending order
    view.expandNode (toExpand0_99);

    assertEquals ("[1-index from 0 to 99]", view.getOutline ().getValueAt (0, 0).toString ());
    assertEquals ("[0]", view.getOutline ().getValueAt (1, 0).toString ());
    assertEquals ("[1]", view.getOutline ().getValueAt (2, 0).toString ());
    assertEquals ("[2]", view.getOutline ().getValueAt (3, 0).toString ());
    assertEquals ("[2-index from 200 to 299]", view.getOutline ().getValueAt (101, 0).toString ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:OutlineViewTest.java

示例8: setPropertyComparator

import org.netbeans.swing.etable.ETableColumn; //导入方法依赖的package包/类
private void setPropertyComparator(int idx) {
    ETableColumn etc1 = (ETableColumn) getOutline().getColumnModel().getColumn(idx++);
    etc1.setNestedComparator(new PropertyComparator(etc1));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:HistoryFileView.java


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