本文整理汇总了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);
}
示例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);
}
}
示例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);
}
}
示例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()));
}
}
示例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);
}
示例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( ) );
}
示例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( ) );
}
示例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" });
}
示例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" });
}
示例10: treeExpanded
import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
@Override
public void treeExpanded(TreeEvent event) {
perform(event, true);
}
示例11: treeCollapsed
import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
@Override
public void treeCollapsed(TreeEvent event) {
perform(event, false);
}
示例12: handleTreeExpand
import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @since 3.7
*/
@Override
protected void handleTreeExpand(TreeEvent event) {
super.handleTreeExpand(event);
expandConstructorNode();
}
示例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);
}
示例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);
}
示例15: treeCollapsed
import org.eclipse.swt.events.TreeEvent; //导入依赖的package包/类
public void treeCollapsed(TreeEvent e) {
update((Tree) e.widget);
}