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


Java JXTreeTable.expandAll方法代码示例

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


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

示例1: interactiveDropOnHierachicalColumnBlinks

import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
/**
 * Issue #766-swingx: drop image is blinking over hierarchical column.
 * 
 * Core bug: <a
 * href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6700748">#6700748</a>
 * 
 * Hacks around, use one or other: 
 * - the usual performance optimization (override validate etc to do nothing) 
 * - rendering component return false on isVisible
 */
public void interactiveDropOnHierachicalColumnBlinks() {
    JXTreeTable xTable = new JXTreeTable(new ComponentTreeTableModel(
            new JXFrame()));
    installTransferHandler(xTable);
    xTable.putClientProperty(JXTreeTable.DROP_HACK_FLAG_KEY, Boolean.TRUE);
    xTable.expandAll();
    xTable.setVisibleColumnCount(10);
    JXFrame frame = wrapWithScrollingInFrame(xTable,
            "TreeTable hierarchical: blink on drop over?");
    JTextField textField = new JTextField(
            "drag me over hierarchical column ..");
    textField.setDragEnabled(true);
    addStatusComponent(frame, textField);
    frame.setVisible(true);
}
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:26,代码来源:DNDRendererVisualCheck.java

示例2: interactiveTreeTableStringValueComponent

import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
/**
     * Issue ??-swingx: TreeTable doesn't return correct string value for hierarchical column.
     * 
     * This is probably a variant of not using the table's renderer (at least I expect it 
     * to be solved then at the latest). In the meantime, might want to do something special
     * for the hierarchical column?
     */
    public void interactiveTreeTableStringValueComponent() {
        TreeTableModel model = new ComponentTreeTableModel(new JXFrame());
        JXTreeTable treeTable = new JXTreeTable(model);
        treeTable.setRootVisible(true);
        treeTable.expandAll();
        LOG.info(treeTable.getStringAt(3, 0));
//        treeTable.setTreeCellRenderer(new DefaultTreeRenderer(sv));
        JXTree tree =  new JXTree(model);
//        tree.setCellRenderer(new DefaultTreeRenderer(sv));
        HighlightPredicate predicate = new PatternPredicate("null", 0, PatternPredicate.ALL);
        ColorHighlighter hl = new ColorHighlighter(predicate, null, Color.RED);
        treeTable.addHighlighter(hl);
        tree.addHighlighter(hl);
        JXFrame frame = wrapWithScrollingInFrame( treeTable, "string rep in hierarchical column");
        show(frame);
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:24,代码来源:ComponentAdapterIssues.java

示例3: interactiveTreeStringValueComponent

import org.jdesktop.swingx.JXTreeTable; //导入方法依赖的package包/类
/**
     * Issue ??-swingx: TreeTable doesn't return correct string value for hierarchical column.
     * 
     * This is probably a variant of not using the table's renderer (at least I expect it 
     * to be solved then at the latest). In the meantime, might want to do something special
     * for the hierarchical column?
     */
    public void interactiveTreeStringValueComponent() {
        TreeTableModel model = new ComponentTreeTableModel(new JXFrame());
        JXTreeTable treeTable = new JXTreeTable(model);
        treeTable.setRootVisible(true);
        treeTable.expandAll();
        LOG.info(treeTable.getStringAt(3, 0));
//        treeTable.setTreeCellRenderer(new DefaultTreeRenderer(sv));
        JXTree tree =  new JXTree(model);
//        tree.setCellRenderer(new DefaultTreeRenderer(sv));
        HighlightPredicate predicate = new PatternPredicate("null", 0, PatternPredicate.ALL);
        ColorHighlighter hl = new ColorHighlighter(predicate, null, Color.RED);
        treeTable.addHighlighter(hl);
        tree.addHighlighter(hl);
        JXFrame frame = wrapWithScrollingInFrame( tree, "string rep in hierarchical column");
        show(frame);
    }
 
开发者ID:RockManJoe64,项目名称:swingx,代码行数:24,代码来源:ComponentAdapterIssues.java


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