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


Java TreeExpansionEvent类代码示例

本文整理汇总了Java中org.eclipse.jface.viewers.TreeExpansionEvent的典型用法代码示例。如果您正苦于以下问题:Java TreeExpansionEvent类的具体用法?Java TreeExpansionEvent怎么用?Java TreeExpansionEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: dialogTreeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
private void dialogTreeExpanded(TreeExpansionEvent event) {

		FJTree parent = (FJTree) event.getElement();
		if (parent != null) {
			Object[] children = parent.getChildren();
			for (int i = 0; i < children.length; i++) {
				FJTree child = (FJTree) children[i];
				int checkState = child.getCheckState();
				if (checkState == FJTree.CS_CHECKED) {
					fileTree.setChecked(child, true);
					fileTree.setGrayed(child, false);
				} else if (checkState == FJTree.CS_UNCHECKED)
					fileTree.setChecked(child, false);
				else if (checkState == FJTree.CS_GRAYED)
					fileTree.setGrayChecked(child, true);
			}
		}
		dialogChanged();
	}
 
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:20,代码来源:FJExportWizardFilesSelectPage.java

示例2: dialogTreeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
private void dialogTreeExpanded(TreeExpansionEvent event) {

        FJTree parent = (FJTree)event.getElement();
        if (parent != null) {
            Object[] children = parent.getChildren();
            for (int i=0; i<children.length; i++) {
                FJTree child = (FJTree)children[i];
                int checkState = child.getCheckState();
                if (checkState == FJTree.CS_CHECKED) {
                    fileTree.setChecked(child, true);
                    fileTree.setGrayed(child, false);
                }
                else if (checkState == FJTree.CS_UNCHECKED)
                    fileTree.setChecked(child, false);
                else if (checkState == FJTree.CS_GRAYED)
                    fileTree.setGrayChecked(child, true);
            }
        }
        dialogChanged();
    }
 
开发者ID:thahn0720,项目名称:agui_eclipse_plugin,代码行数:21,代码来源:FilesSelectPage.java

示例3: listServer

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
private void listServer(final TreeExpansionEvent event) {
	if (skipLazyLoad)
		return;
	Job job = new Job("Refreshing tree") {
		@Override
		protected IStatus run(IProgressMonitor monitor) {
			IStatus status = Status.OK_STATUS;
			try {
				status = listServer(event, monitor);
			} finally {
				monitor.done();
			}
			return status;
		}
	};
	job.setPriority(Job.SHORT);
	job.setSystem(false);
	job.setUser(true);
	job.schedule();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ServerProvider.java

示例4: lazyLoadResource

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
public IStatus lazyLoadResource(final TreeExpansionEvent event, IProgressMonitor monitor) {
	if (skipLazyLoad)
		return Status.OK_STATUS;
	MResource r = (MResource) event.getElement();
	try {
		WSClientHelper.refreshResource(r, monitor);
		Display.getDefault().asyncExec(new Runnable() {

			public void run() {
				event.getTreeViewer().refresh(true);
			}
		});
		return Status.OK_STATUS;
	} catch (final Throwable e) {
		Display.getDefault().syncExec(new Runnable() {

			public void run() {
				event.getTreeViewer().collapseToLevel(event.getElement(), 1);
				UIUtils.showErrorDialog(e.getMessage(), e);
			}
		});
	}
	return Status.CANCEL_STATUS;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:ServerProvider.java

示例5: setExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
protected void setExpanded(Item node, boolean expand) {
	TreeItem item = (TreeItem) node;
	boolean pre   = item.getExpanded();

	item.setExpanded(expand);

	/*
	 * See Eclipse Bugzilla Bug 177378 and JIRA MER-176. In summary, the
	 * collapseAll() and expandAll() methods filter through this
	 * setExpanded() method. However, this path through the system does not
	 * notify listeners of the expansion event. Therefore, we added code to
	 * notify the listeners if the expansion state changes as a result of a
	 * programmatic call (user clicks in the tree do notify the listeners
	 * since those expansions take a different path).
	 */

	// do not fire the event if the expansion state did not change
	if (pre == expand) return;
	TreeExpansionEvent e = new TreeExpansionEvent(this, node.getData());
	if (expand) fireTreeExpanded (e);
	else        fireTreeCollapsed(e);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:24,代码来源:TreeTableViewer.java

示例6: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
public void treeExpanded(TreeExpansionEvent event)
{
    Object item = event.getElement();
    if(!fExpandedTreeNodes.contains(item))
    {
        fExpandedTreeNodes.add(item);
        checkNewTreeElements(getTreeChildren(item));
    }
}
 
开发者ID:qxo,项目名称:eclipse-code-lines-plugin,代码行数:10,代码来源:CheckboxTreeAndListGroup.java

示例7: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
public void treeExpanded(TreeExpansionEvent event) {
  if (linkMonitor.isBlocked()) {
    return;
  }
  linkMonitor.block();
  try {
    oppositeViewer.expandToLevel(event.getElement(), 1);
  } finally {
    linkMonitor.unblock();
  }
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:12,代码来源:LiveEditDiffViewer.java

示例8: treeCollapsed

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
public void treeCollapsed(TreeExpansionEvent event) {
  if (linkMonitor.isBlocked()) {
    return;
  }
  linkMonitor.block();
  try {
    oppositeViewer.collapseToLevel(event.getElement(), 1);
  } finally {
    linkMonitor.unblock();
  }
}
 
开发者ID:jbosstools,项目名称:chromedevtools,代码行数:12,代码来源:LiveEditDiffViewer.java

示例9: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
/**
 *	Handles the expansionsion of an element in a tree viewer
 * @param event
 */
public void treeExpanded(TreeExpansionEvent event) {

	Object item= event.getElement();

	// First see if the children need to be given their checked state at all.  If they've
	// already been realized then this won't be necessary
	if (!fExpandedTreeNodes.contains(item)) {
		fExpandedTreeNodes.add(item);
		checkNewTreeElements(getTreeChildren(item));
	}
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:16,代码来源:CheckboxTreeAndListGroup.java

示例10: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeExpanded(TreeExpansionEvent event) {
    setCheckedGrayed((TreeElement) event.getElement(), true);
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:5,代码来源:DiffTableViewer.java

示例11: treeCollapsed

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeCollapsed(TreeExpansionEvent event) {
    setCheckedGrayed((TreeElement) event.getElement(), false);
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:5,代码来源:DiffTableViewer.java

示例12: treeCollapsed

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeCollapsed(final TreeExpansionEvent event) {
    reflow(event.getTreeViewer().getControl().getParent());
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:5,代码来源:SectionTreeViewerListener.java

示例13: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeExpanded(final TreeExpansionEvent event) {
    reflow(event.getTreeViewer().getControl().getParent());
}
 
开发者ID:Microsoft,项目名称:team-explorer-everywhere,代码行数:5,代码来源:SectionTreeViewerListener.java

示例14: treeCollapsed

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeCollapsed(TreeExpansionEvent event) {
	LogUtils.info(log, treeName , Mode.COLLAPSE_TREE_ELEMENT, getLabel(event.getElement()));
}
 
开发者ID:aroog,项目名称:code,代码行数:5,代码来源:SimpleLoggedTreeViewListener.java

示例15: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入依赖的package包/类
@Override
public void treeExpanded(TreeExpansionEvent event) {
	LogUtils.info(log, treeName , Mode.EXPAND_TREE_ELEMENT, getLabel(event.getElement()));

}
 
开发者ID:aroog,项目名称:code,代码行数:6,代码来源:SimpleLoggedTreeViewListener.java


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