org.eclipse.swt.events.TreeEvent Java Examples

The following examples show how to use org.eclipse.swt.events.TreeEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CTreeComboViewer.java    From nebula with Eclipse Public License 2.0 6 votes vote down vote up
/** 
 * @see org.eclipse.jface.viewers.AbstractTreeViewer#handleTreeExpand(org.eclipse.swt.events.TreeEvent)
 */
protected void handleTreeExpand(TreeEvent event) {
	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);
}
 
Example #2
Source File: CTreeCombo.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void treeCollapsed(TreeEvent e) {
	e.item = (Widget) e.item.getData(CTreeComboItem.DATA_ID);
	e.widget = CTreeCombo.this;
	for (final TreeListener l : treeListeners) {
		l.treeCollapsed(e);
	}
}
 
Example #3
Source File: CTreeCombo.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void treeExpanded(TreeEvent e) {
	e.item = (Widget) e.item.getData(CTreeComboItem.DATA_ID);
	e.widget = CTreeCombo.this;
	for (final TreeListener l : treeListeners) {
		l.treeExpanded(e);
	}
}
 
Example #4
Source File: CubeGroupContent.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void treeCollapsed( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( groupBackup != null )
		groupBackup.updateCollapsedStatus( groupViewer, item.getData( ) );

}
 
Example #5
Source File: CubeGroupContent.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void treeCollapsed( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( dataBackup != null )
		dataBackup.updateCollapsedStatus( dataFieldsViewer,
				item.getData( ) );

}
 
Example #6
Source File: CubeGroupContent.java    From birt with Eclipse Public License 1.0 5 votes vote down vote up
public void treeExpanded( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( dataBackup != null )
		dataBackup.updateExpandedStatus( dataFieldsViewer,
				item.getData( ) );
}
 
Example #7
Source File: CallHierarchyViewer.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 * 
 * @since 3.7
 */
@Override
protected void handleTreeExpand(TreeEvent event) {
	super.handleTreeExpand(event);
	expandConstructorNode();
}
 
Example #8
Source File: ColumnChooserDialog.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
private void selectedTreeCollapsed(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupCollapsed(columnGroupEntry);
}
 
Example #9
Source File: ColumnChooserDialog.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
private void selectedTreeExpanded(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupExpanded(columnGroupEntry);
}
 
Example #10
Source File: ColumnChooserDialog.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
private void selectedTreeCollapsed(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupCollapsed(columnGroupEntry);
}
 
Example #11
Source File: ColumnChooserDialog.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
private void selectedTreeExpanded(TreeEvent event) {
	TreeItem item = (TreeItem) event.item;
	ColumnGroupEntry columnGroupEntry = (ColumnGroupEntry) item.getData();
	fireGroupExpanded(columnGroupEntry);
}
 
Example #12
Source File: CubeGroupContent.java    From birt with Eclipse Public License 1.0 4 votes vote down vote up
public void treeExpanded( TreeEvent e )
{
	Item item = (Item) e.item;
	if ( groupBackup != null )
		groupBackup.updateExpandedStatus( groupViewer, item.getData( ) );
}