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


Java TreeExpansionEvent.getElement方法代码示例

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


在下文中一共展示了TreeExpansionEvent.getElement方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例4: listServer

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入方法依赖的package包/类
private IStatus listServer(final TreeExpansionEvent event, final IProgressMonitor monitor) {
	final TreeViewer tv = (TreeViewer) event.getTreeViewer();
	final MServerProfile r = (MServerProfile) event.getElement();
	try {
		WSClientHelper.connectGetData(r, monitor);
		UIUtils.getDisplay().asyncExec(new Runnable() {

			public void run() {
				tv.refresh(r, true);
			}
		});

		return Status.OK_STATUS;
	} catch (final Throwable e) {
		UIUtils.getDisplay().syncExec(new Runnable() {

			public void run() {
				tv.collapseToLevel(r, 1);
				if (!monitor.isCanceled())
					UIUtils.showErrorDialog(e.getMessage(), e);
			}
		});
	}
	return Status.CANCEL_STATUS;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:ServerProvider.java

示例5: 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

示例6: 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

示例7: handleTreeEvent

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入方法依赖的package包/类
public void handleTreeEvent(TreeExpansionEvent event) {
	if (event.getElement() instanceof MServerProfile)
		listServer(event);
	else if (event.getElement() instanceof MResource)
		lazyLoadResource(event);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:7,代码来源:ServerProvider.java

示例8: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入方法依赖的package包/类
public void treeExpanded(TreeExpansionEvent event) {
	Object element= event.getElement();
	if (element instanceof ICompilationUnit ||
		element instanceof IClassFile)
		expandMainType(element);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:7,代码来源:PackageExplorerPart.java

示例9: treeCollapsed

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入方法依赖的package包/类
@Override
public void treeCollapsed(TreeExpansionEvent event) {
    if (event.getElement() instanceof IResource) {
        evaluateProject(((IResource) event.getElement()).getProject());
    }
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:7,代码来源:UpgradeNotifier.java

示例10: treeExpanded

import org.eclipse.jface.viewers.TreeExpansionEvent; //导入方法依赖的package包/类
@Override
public void treeExpanded(TreeExpansionEvent event) {
    if (event.getElement() instanceof IResource) {
        evaluateProject(((IResource) event.getElement()).getProject());
    }
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:7,代码来源:UpgradeNotifier.java


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