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


Java TreeEvent类代码示例

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


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

示例1: handleTreeExpand

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
protected void handleTreeExpand(TreeEvent event) {
    // Fix for Bug 271744 because windows expanding doesn't fire a focus lost
	if( isCellEditorActive() ) {
		applyEditorValue();
	}
	
	if (contentProviderIsLazy) {
		if (event.item.getData() != null) {
			Item[] children = getChildren(event.item);
			if (children.length == 1 && children[0].getData()==null) {
				// we have a dummy child node, ask for an updated child
				// count
				virtualLazyUpdateChildCount(event.item, children.length);
			}
			fireTreeExpanded(new TreeExpansionEvent(this, event.item
					.getData()));
		}
		return;
	}
	super.handleTreeExpand(event);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:22,代码来源:TreeViewer.java

示例2: perform

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
protected void perform(TreeEvent event, boolean expanded) {
	Object data = event.item.getData();
	if (data instanceof EPlanElement) {
		EPlanElement element = (EPlanElement) data;
		PlanUtils.executeExpansionOperation(element, expanded);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:PlanElementTreeListener.java

示例3: handleTreeExpand

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
@Override
protected void handleTreeExpand(TreeEvent event) {
	super.handleTreeExpand(event);
	Object parent = event.item.getData();
	Object[] children = getRawChildren(parent);
	for (Object child : children) {
		refresh(child, true);
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:10,代码来源:PlanRulesTreeViewer.java

示例4: handleTreeExpand

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
/**
 * Handles a tree expand event from the SWT widget.
 * 
 * @param event
 *            the SWT tree event
 */
protected void handleTreeExpand(TreeEvent event) {
	createChildren(event.item);
	if (event.item.getData() != null) {
		fireTreeExpanded(new TreeExpansionEvent(this, event.item.getData()));
	}
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:13,代码来源:AbstractTreeViewer.java

示例5: handleTreeCollapse

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
protected void handleTreeCollapse(TreeEvent event) {
	// Fix for Bug 271744 because windows is firing collapse before
	// focus lost event
	if( isCellEditorActive() ) {
		applyEditorValue();
	}
	
	super.handleTreeCollapse(event);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:10,代码来源:TreeViewer.java

示例6: treeCollapsed

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeCollapsed( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( groupBackup != null )
		groupBackup.updateCollapsedStatus( groupViewer, item.getData( ) );

}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:CubeGroupContent.java

示例7: treeExpanded

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeExpanded( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( dataBackup != null )
		dataBackup.updateExpandedStatus( dataFieldsViewer,
				item.getData( ) );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:8,代码来源:CubeGroupContent.java

示例8: treeCollapsed

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeCollapsed(TreeEvent e)
{
  // System.out.println(e.data);
  // TreeItem[]items = ((Tree)e.getSource()).getSelection();
  // for(int i = 0; i < items.length; i++)
  // treeViewer.refresh(treeViewer.getInput(), true);
  treeViewer.update(treeViewer.getInput(), new String[]
  { "changelabel" });

}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:11,代码来源:UASRManualTocView.java

示例9: treeExpanded

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeExpanded(TreeEvent e)
{

  // TreeItem[]items = ((Tree)e.getSource()).getSelection();
  // for(int i = 0; i < items.length; i++)
  // treeViewer.refresh(treeViewer.getInput(), true);
  // treeViewer.refresh(items[i].getData(), true);
  // treeViewer.update(items[i].getData(), new String[]{"changelabel"});
  treeViewer.update(treeViewer.getInput(), new String[]
  { "changelabel" });

}
 
开发者ID:matthias-wolff,项目名称:dLabPro-Plugin,代码行数:13,代码来源:UASRManualTocView.java

示例10: treeExpanded

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
@Override
public void treeExpanded(TreeEvent event) {
	perform(event, true);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:5,代码来源:PlanElementTreeListener.java

示例11: treeCollapsed

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
@Override
public void treeCollapsed(TreeEvent event) {
	perform(event, false);
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:5,代码来源:PlanElementTreeListener.java

示例12: handleTreeExpand

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
/**
 * {@inheritDoc}
 * 
 * @since 3.7
 */
@Override
protected void handleTreeExpand(TreeEvent event) {
	super.handleTreeExpand(event);
	expandConstructorNode();
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:11,代码来源:CallHierarchyViewer.java

示例13: selectedTreeCollapsed

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
private void selectedTreeCollapsed(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupCollapsed(columnGroupEntry);
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:6,代码来源:ColumnChooserDialog.java

示例14: selectedTreeExpanded

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
private void selectedTreeExpanded(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupExpanded(columnGroupEntry);
}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:6,代码来源:ColumnChooserDialog.java

示例15: treeCollapsed

import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeCollapsed(TreeEvent e) {
	update((Tree) e.widget);
}
 
开发者ID:ghillairet,项目名称:gef-gwt,代码行数:4,代码来源:TreeColumnLayout.java


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