當前位置: 首頁>>代碼示例>>Java>>正文


Java CheckboxTreeViewer.addFilter方法代碼示例

本文整理匯總了Java中org.eclipse.jface.viewers.CheckboxTreeViewer.addFilter方法的典型用法代碼示例。如果您正苦於以下問題:Java CheckboxTreeViewer.addFilter方法的具體用法?Java CheckboxTreeViewer.addFilter怎麽用?Java CheckboxTreeViewer.addFilter使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.jface.viewers.CheckboxTreeViewer的用法示例。


在下文中一共展示了CheckboxTreeViewer.addFilter方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createTreeViewer

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
/**
 * Creates the tree viewer.
 *
 * @param parent the parent composite
 * @return the tree viewer
 */
protected CheckboxTreeViewer createTreeViewer(Composite parent) {
    fViewer = new CheckboxTreeViewer(parent, SWT.BORDER);

    fViewer.setContentProvider(fContentProvider);
    fViewer.setLabelProvider(fLabelProvider);
    fViewer.addCheckStateListener(new ICheckStateListener() {
        @Override
        public void checkStateChanged(CheckStateChangedEvent event) {
            updateOKStatus();
        }
    });

    fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
    if (fFilters != null) {
        for (int i = 0; i != fFilters.size(); i++) {
            fViewer.addFilter((ViewerFilter) fFilters.get(i));
        }
    }

    fViewer.setInput(fInput);

    return fViewer;
}
 
開發者ID:iloveeclipse,項目名稱:filesync4eclipse,代碼行數:30,代碼來源:MultipleFolderSelectionDialog.java

示例2: createTreeViewer

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
/**
 * Creates the tree viewer.
 *
 * @param parent the parent composite
 * @return the tree viewer
 */
protected CheckboxTreeViewer createTreeViewer(Composite parent) {
	fViewer = new CheckboxTreeViewer(parent, SWT.BORDER);

	fViewer.setContentProvider(fContentProvider);
	fViewer.setLabelProvider(fLabelProvider);
	fViewer.addCheckStateListener(new ICheckStateListener() {
		public void checkStateChanged(CheckStateChangedEvent event) {
			updateOKStatus();
		}
	});

	fViewer.setComparator(new ResourceComparator(ResourceComparator.NAME));
	if (fFilters != null) {
		for (int i = 0; i != fFilters.size(); i++)
			fViewer.addFilter(fFilters.get(i));
	}

	fViewer.setInput(fInput);

	return fViewer;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:28,代碼來源:MultipleFolderSelectionDialog.java

示例3: configureTreeViewer

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
/**
 * 트리 뷰어 설정
 * 
 * @param viewer
 *            void
 */
protected void configureTreeViewer(CheckboxTreeViewer viewer) {
    viewer.setUseHashlookup(true);
    viewer.addCheckStateListener(new ICheckStateListener() {
        /**
         * @see org.eclipse.jface.viewers.ICheckStateListener#checkStateChanged(org.eclipse.jface.viewers.CheckStateChangedEvent)
         */
        public void checkStateChanged(CheckStateChangedEvent event) {
            treeViewer.setSubtreeChecked(event.getElement(), event.getChecked());
        }
    });

    viewer.setContentProvider(new ProjectItemTreeContentProvider(2));
    viewer.setLabelProvider(new ProjectItemLabelProvider());

    // 트리 뷰어의 경우 탐색기의 최상위 요소인 Model을 입력으로 설정하면
    // Model의 자식 요소부터 트리에 보여 주므로
    // 트리에 최상위 요소인 Model을 보여 주기 위해서는
    // Model을 자식으로 가지는 새로운 요소에다 Model을 설정해서
    // 그 요소를 트리의 입력으로 설정해 줘야 한다.
    ContainerElement container = new ContainerElement();
    container.addChild(rootElement);

    viewer.setInput(container);

    ViewerFilter viewerFilter = new ElementViewerFilter(filterType);
    viewer.addFilter(viewerFilter);
    viewer.setSorter(new NameSorter());
}
 
開發者ID:SK-HOLDINGS-CC,項目名稱:NEXCORE-UML-Modeler,代碼行數:35,代碼來源:ProjectItemSelectionDialog.java

示例4: createTreeViewer

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
@Override
protected CheckboxTreeViewer createTreeViewer(Composite parent) {
	CheckboxTreeViewer treeViewer= super.createTreeViewer(parent);
	if (!fAllowSettersForFinals) {
		treeViewer.addFilter(fSettersForFinalFieldsFilter);
	}
	return treeViewer;
}
 
開發者ID:trylimits,項目名稱:Eclipse-Postfix-Code-Completion,代碼行數:9,代碼來源:AddGetterSetterAction.java

示例5: createProcessTree

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
private void createProcessTree(Composite container) {
	Composite composite = new Composite(container, SWT.NONE);
	composite.setLayout(new FillLayout());
	UI.gridData(composite, true, true);
	viewer = new CheckboxTreeViewer(composite, SWT.MULTI | SWT.BORDER);
	viewer.setUseHashlookup(true);
	viewer.setContentProvider(new NavigationContentProvider());
	viewer.setLabelProvider(new NavigationLabelProvider(false));
	viewer.setInput(Navigator.getNavigationRoot());
	viewer.addCheckStateListener(new NavigationTreeCheck(viewer));
	viewer.addCheckStateListener(this);
	viewer.addFilter(new NavigationTreeFilter());
	viewer.setSorter(new NavigationSorter());
}
 
開發者ID:GreenDelta,項目名稱:olca-app,代碼行數:15,代碼來源:ExportWizardPage.java

示例6: createViewer

import org.eclipse.jface.viewers.CheckboxTreeViewer; //導入方法依賴的package包/類
private void createViewer(Composite composite) {
	viewer = new CheckboxTreeViewer(composite, SWT.VIRTUAL | SWT.MULTI
			| SWT.BORDER);
	viewer.setUseHashlookup(true);
	viewer.getTree().setLayoutData(
			new GridData(SWT.FILL, SWT.FILL, true, true));
	viewer.setContentProvider(new NavigationContentProvider());
	viewer.setLabelProvider(new NavigationLabelProvider(false));
	viewer.setSorter(new NavigationSorter());
	viewer.addFilter(new ModelTypeFilter(types));
	viewer.addCheckStateListener(new ModelSelectionState(this, viewer));
	registerInputHandler(composite);
	ColumnViewerToolTipSupport.enableFor(viewer);
}
 
開發者ID:GreenDelta,項目名稱:olca-app,代碼行數:15,代碼來源:ModelSelectionPage.java


注:本文中的org.eclipse.jface.viewers.CheckboxTreeViewer.addFilter方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。