org.eclipse.jface.viewers.TreeExpansionEvent Java Examples
The following examples show how to use
org.eclipse.jface.viewers.TreeExpansionEvent.
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 |
/** * @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: CheckboxTreeAndListGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
/** * 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)); } }
Example #3
Source File: PackageExplorerPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void treeCollapsed(TreeExpansionEvent event) { }
Example #4
Source File: PackageExplorerPart.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 4 votes |
public void treeExpanded(TreeExpansionEvent event) { Object element= event.getElement(); if (element instanceof ICompilationUnit || element instanceof IClassFile) expandMainType(element); }
Example #5
Source File: ExpansionListener.java From olca-app with Mozilla Public License 2.0 | 4 votes |
@Override public void treeExpanded(TreeExpansionEvent e) { Tree source = ((TreeViewer) e.getSource()).getTree(); setExpanded(source, e.getElement(), true); }
Example #6
Source File: ExpansionListener.java From olca-app with Mozilla Public License 2.0 | 4 votes |
@Override public void treeCollapsed(TreeExpansionEvent e) { Tree source = ((TreeViewer) e.getSource()).getTree(); setExpanded(source, e.getElement(), false); }
Example #7
Source File: CheckboxTreeAndListGroup.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 2 votes |
/** * Handle the collapsing of an element in a tree viewer * @param event */ public void treeCollapsed(TreeExpansionEvent event) { // We don't need to do anything with this }