eas之修改类别时刷新当前结点的父结点,并定位到当前结点

KDTreeNode treeNode = (KDTreeNode) treeMain.getLastSelectedPathComponent();
if (treeNode != null && treeNode.getParent() != null)
{
TreePath oldPath = treeMain.getSelectionPath();

TreePath parentPath = treeMain.getSelectionPath().getParentPath();

KDTreeNode parentNode = (KDTreeNode) treeNode.getParent();

treeBuilder.refreshTreeNode(treeMain , parentNode ,this.getDefaultFilterForTree());

treeMain.setSelectionPath(TreePathUtil.getNewTreePath(treeMain ,treeMain.getModel() , oldPath));
}

posted @ 2019-06-26 08:06  一条有梦想的海洋咸鱼  阅读(264)  评论(0编辑  收藏  举报