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


Java JTree.isLargeModel方法代码示例

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


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

示例1: updateStyle

import javax.swing.JTree; //导入方法依赖的package包/类
private void updateStyle(JTree tree) {
    SynthContext context = getContext(tree, ENABLED);
    SynthStyle oldStyle = style;

    style = SynthLookAndFeel.updateStyle(context, this);
    if (style != oldStyle) {
        Object value;

        setExpandedIcon(style.getIcon(context, "Tree.expandedIcon"));
        setCollapsedIcon(style.getIcon(context, "Tree.collapsedIcon"));

        setLeftChildIndent(style.getInt(context, "Tree.leftChildIndent",
                                        0));
        setRightChildIndent(style.getInt(context, "Tree.rightChildIndent",
                                         0));

        drawHorizontalLines = style.getBoolean(
                      context, "Tree.drawHorizontalLines",true);
        drawVerticalLines = style.getBoolean(
                    context, "Tree.drawVerticalLines", true);
        linesStyle = style.get(context, "Tree.linesStyle");

            value = style.get(context, "Tree.rowHeight");
            if (value != null) {
                LookAndFeel.installProperty(tree, "rowHeight", value);
            }

            value = style.get(context, "Tree.scrollsOnExpand");
            LookAndFeel.installProperty(tree, "scrollsOnExpand",
                                                value != null? value : Boolean.TRUE);

        padding = style.getInt(context, "Tree.padding", 0);

        largeModel = (tree.isLargeModel() && tree.getRowHeight() > 0);

        useTreeColors = style.getBoolean(context,
                              "Tree.rendererUseTreeColors", true);

        Boolean showsRootHandles = style.getBoolean(
                context, "Tree.showsRootHandles", Boolean.TRUE);
        LookAndFeel.installProperty(
                tree, JTree.SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles);

        if (oldStyle != null) {
            uninstallKeyboardActions();
            installKeyboardActions();
        }
    }
    context.dispose();

    context = getContext(tree, Region.TREE_CELL, ENABLED);
    cellStyle = SynthLookAndFeel.updateStyle(context, this);
    context.dispose();
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:55,代码来源:SynthTreeUI.java

示例2: updateStyle

import javax.swing.JTree; //导入方法依赖的package包/类
private void updateStyle(JTree tree) {
    SynthContext context = getContext(tree, ENABLED);
    SynthStyle oldStyle = style;

    style = SynthLookAndFeel.updateStyle(context, this);
    if (style != oldStyle) {
        Object value;

        setExpandedIcon(style.getIcon(context, "Tree.expandedIcon"));
        setCollapsedIcon(style.getIcon(context, "Tree.collapsedIcon"));

        setLeftChildIndent(style.getInt(context, "Tree.leftChildIndent",
                                        0));
        setRightChildIndent(style.getInt(context, "Tree.rightChildIndent",
                                         0));

        drawHorizontalLines = style.getBoolean(
                      context, "Tree.drawHorizontalLines",true);
        drawVerticalLines = style.getBoolean(
                    context, "Tree.drawVerticalLines", true);
        linesStyle = style.get(context, "Tree.linesStyle");

            value = style.get(context, "Tree.rowHeight");
            if (value != null) {
                LookAndFeel.installProperty(tree, "rowHeight", value);
            }

            value = style.get(context, "Tree.scrollsOnExpand");
            LookAndFeel.installProperty(tree, "scrollsOnExpand",
                                                value != null? value : Boolean.TRUE);

        padding = style.getInt(context, "Tree.padding", 0);

        largeModel = (tree.isLargeModel() && tree.getRowHeight() > 0);

        useTreeColors = style.getBoolean(context,
                              "Tree.rendererUseTreeColors", true);

        Boolean showsRootHandles = style.getBoolean(
                context, "Tree.showsRootHandles", Boolean.TRUE);
        LookAndFeel.installProperty(
                tree, JTree.SHOWS_ROOT_HANDLES_PROPERTY, showsRootHandles);

        if (oldStyle != null) {
            uninstallKeyboardActions();
            installKeyboardActions();
        }
    }

    context = getContext(tree, Region.TREE_CELL, ENABLED);
    cellStyle = SynthLookAndFeel.updateStyle(context, this);
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:53,代码来源:SynthTreeUI.java


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