JCheckBoxTree.java 文件源码

java
阅读 27 收藏 0 点赞 0 评论 0

项目:Cognizant-Intelligent-Test-Scripter 作者:
/**
 * iterate through every child and do the action
 *
 * @param parent
 * @param expand
 */
private void expandAll(TreePath parent, boolean expand) {
    TreeNode node = (TreeNode) parent.getLastPathComponent();
    if (getChildCount(node) >= 0) {
        for (int i = 0; i < getChildCount(node); i++) {
            TreePath path = parent.pathByAddingChild(getChildAt(node, i));
            expandAll(path, expand);
        }
    }
    if (expand) {
        expandPath(parent);
    } else {
        collapsePath(parent);
    }

}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号