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


Java Tree.setRedraw方法代码示例

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


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

示例1: reloadViewer

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void reloadViewer() {

	if (_isInReload) {
		return;
	}

	final Tree tree = _tourViewer.getTree();
	tree.setRedraw(false);
	_isInReload = true;
	{
		final Object[] expandedElements = _tourViewer.getExpandedElements();
		final ISelection selection = _tourViewer.getSelection();

		_tourViewer.setInput(_rootItem = new TVICollatedTour_Root(this));

		_tourViewer.setExpandedElements(expandedElements);
		_tourViewer.setSelection(selection, true);
	}
	_isInReload = false;
	tree.setRedraw(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:CollatedToursView.java

示例2: reloadViewer

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void reloadViewer() {

	final Tree tree = _tourViewer.getTree();
	tree.setRedraw(false);
	{
		final Object[] expandedElements = _tourViewer.getExpandedElements();
		final ISelection selection = _tourViewer.getSelection();

		_tourViewer.setInput(_rootItem = new TVICompareResultRootItem());

		_tourViewer.setExpandedElements(expandedElements);
		_tourViewer.setSelection(selection);
	}
	tree.setRedraw(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TourCompareResultView.java

示例3: reloadViewer

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void reloadViewer() {

	final Tree tree = _tourViewer.getTree();
	tree.setRedraw(false);
	{
		final Object[] expandedElements = _tourViewer.getExpandedElements();
		final ISelection selection = _tourViewer.getSelection();

		_tourViewer.setInput(_rootItem = new TVICatalogRootItem(this));

		_tourViewer.setExpandedElements(expandedElements);
		_tourViewer.setSelection(selection);
	}
	tree.setRedraw(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TourCatalogView.java

示例4: reloadViewer

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void reloadViewer() {

	if (_isInReload) {
		return;
	}

	final Tree tree = _tourViewer.getTree();
	tree.setRedraw(false);
	_isInReload = true;
	{
		final Object[] expandedElements = _tourViewer.getExpandedElements();
		final ISelection selection = _tourViewer.getSelection();

		_tourViewer.setInput(_rootItem = new TVITourBookRoot(this));

		_tourViewer.setExpandedElements(expandedElements);
		_tourViewer.setSelection(selection, true);
	}
	_isInReload = false;
	tree.setRedraw(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:TourBookView.java

示例5: run

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void run() {

	if (fTourViewer != null) {

		final ColumnViewer viewer = fTourViewer.getViewer();
		if (viewer instanceof TreeViewer) {

			final TreeViewer treeViewer = (TreeViewer) viewer;
			final Object firstElement = ((StructuredSelection) treeViewer.getSelection()).getFirstElement();

			if (firstElement != null) {

				final Tree tree = treeViewer.getTree();
				tree.setRedraw(false);
				{
					treeViewer.collapseAll();
					treeViewer.setExpandedElements(new Object[] { firstElement });
					treeViewer.setSelection(new StructuredSelection(firstElement), true);
				}
				tree.setRedraw(true);
			}
		}
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:26,代码来源:ActionCollapseOthers.java

示例6: run

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void run() {

	if (_tourViewer == null) {
		return;
	}

	final ColumnViewer viewer = _tourViewer.getViewer();
	if (viewer instanceof TreeViewer) {

		final TreeViewer treeViewer = (TreeViewer) viewer;
		final Tree tree = treeViewer.getTree();

		// disable redraw that the UI in not flickering
		tree.setRedraw(false);
		{
			treeViewer.expandAll();
		}
		tree.setRedraw(true);

	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:23,代码来源:ActionExpandAll.java

示例7: toggleExpansionState

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
private void toggleExpansionState(Object element) {
  Tree tree = fDropDownViewer.getTree();
  if (fDropDownViewer.getExpandedState(element))
    fDropDownViewer.collapseToLevel(element, 1);
  else {
    tree.setRedraw(false);
    try {
      fDropDownViewer.expandToLevel(element, 1);
      resizeShell(fShell);
    } finally {
      tree.setRedraw(true);
    }
  }
}
 
开发者ID:gwt-plugins,项目名称:gwt-eclipse-plugin,代码行数:15,代码来源:BreadcrumbItemDropDown.java

示例8: reloadViewer

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
/**
 * reload the content of the tag viewer
 */
@Override
public void reloadViewer() {

	final Tree tree = _tagViewer.getTree();
	tree.setRedraw(false);
	{
		final Object[] expandedElements = _tagViewer.getExpandedElements();

		_tagViewer.setInput(_rootItem = new TVITagViewRoot(this, _tagViewLayout));
		_tagViewer.setExpandedElements(expandedElements);
	}
	tree.setRedraw(true);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:17,代码来源:TaggingView.java

示例9: run

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
@Override
public void run() {

	if (_tourViewer == null) {
		return;
	}

	final ColumnViewer viewer = _tourViewer.getViewer();
	if (viewer instanceof TreeViewer) {

		final TreeViewer treeViewer = (TreeViewer) viewer;
		final ITreeSelection selection = (ITreeSelection) treeViewer.getSelection();

		if (selection.size() == 0) {
			return;
		}

		final Tree tree = treeViewer.getTree();
		tree.setRedraw(false);
		{
			for (final Iterator<?> iterator = selection.iterator(); iterator.hasNext();) {
				treeViewer.expandToLevel(iterator.next(), _expandLevels);
			}
		}
		tree.setRedraw(true);
	}
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:28,代码来源:ActionExpandSelection.java

示例10: onSelectFolder_10_AutoExpandCollapse_Runnable

import org.eclipse.swt.widgets.Tree; //导入方法依赖的package包/类
/**
 * This behavior is complex and still have possible problems.
 * 
 * @param selectedFolderItem
 * @param treeSelection
 * @param selectedTreePath
 * @param isFromNavigationHistory
 */
private void onSelectFolder_10_AutoExpandCollapse_Runnable(	final TVIFolderFolder selectedFolderItem,
															final ITreeSelection treeSelection,
															final TreePath selectedTreePath,
															final boolean isFromNavigationHistory) {
	_isExpandingSelection = true;
	{
		final Tree tree = _folderViewer.getTree();

		tree.setRedraw(false);
		{
			final TreeItem topItem = tree.getTopItem();

			final boolean isExpanded = _folderViewer.getExpandedState(selectedTreePath);

			/*
			 * collapse all tree paths
			 */
			final TreePath[] allExpandedTreePaths = _folderViewer.getExpandedTreePaths();
			for (final TreePath treePath : allExpandedTreePaths) {
				_folderViewer.setExpandedState(treePath, false);
			}

			/*
			 * expand and select selected folder
			 */
			_folderViewer.setExpandedTreePaths(new TreePath[] { selectedTreePath });
			_folderViewer.setSelection(treeSelection, true);

			if (_isBehaviourAutoExpandCollapse && isExpanded) {

				// auto collapse expanded folder
				_folderViewer.setExpandedState(selectedTreePath, false);
			}

			/**
			 * set top item to the previous top item, otherwise the expanded/collapse item is
			 * positioned at the bottom and the UI is jumping all the time
			 * <p>
			 * win behaviour: when an item is set to top which was collapsed bevore, it will be
			 * expanded
			 */
			if (topItem.isDisposed() == false) {
				tree.setTopItem(topItem);
			}
		}
		tree.setRedraw(true);
	}
	_isExpandingSelection = false;

	displayFolderImages(selectedFolderItem, isFromNavigationHistory, false);
}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:60,代码来源:PicDirFolder.java


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