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


Java FilteredTree类代码示例

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


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

示例1: createPartControl

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {
	FeatureModelManager featureModelManager = FeatureSupport.getManager();
	ProductModelManager productModelManager = ProductSupport.getManager();
	FeatureAndProductInput input = new FeatureAndProductInput(featureModelManager, productModelManager);
	this.featureIndex = new FeatureIndex(featureModelManager, productModelManager);

	FilteredTree filteredTree = createFilteredTree(parent);
	this.viewer = filteredTree.getViewer();
	this.patternFilter = filteredTree.getPatternFilter();
	this.viewerFilters.add(patternFilter);

	this.clipboard = new Clipboard(parent.getDisplay());
	this.copyAction = new FeatureAndPluginCopyAction(viewer, clipboard);
	this.pasteAction = new FeatureAndPluginPasteAction(viewer, clipboard);

	registerGlobalActions();
	contributeToActionBar(featureModelManager, productModelManager);
	hookContextMenu();

	initialiseViewer(input);
}
 
开发者ID:secondfiddle,项目名称:pep-tools,代码行数:23,代码来源:FeatureExplorerView.java

示例2: createTreeViewer

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
/**
 * Creates the filtered tree that will be shown on the left side of dialog.
 * It uses a label provider which gets the IPropertiesViewerNode.getName()
 * 
 * @param parent the widget container
 * @return the filtered tree widget
 */
protected FilteredTree createTreeViewer(Composite parent) {
	FilteredTree filteredTree = new FilteredTree(parent, SWT.SINGLE, new PropertiesPatternFilter(), true);
	filteredTree.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));	
	final TreeViewer viewer = filteredTree.getViewer();
	viewer.setLabelProvider( new LabelProvider() {

		public String getText(Object element) {
	        return ((IPropertiesViewerNode) element).getName();
	    }

	});
	
	viewer.setContentProvider(new PropertiesViewerContentProvider<T>(nodes));		
	return filteredTree;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:23,代码来源:TreePropertiesViewerPanel.java

示例3: createPartControl

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
/**
 * This is a callback that will allow us to create the viewer and initialize it.
 */
public void createPartControl(Composite parent) {
    PatternFilter filter = new PatternFilter();
    FilteredTree tree = new FilteredTree(parent, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL, filter, true);
    viewer = tree.getViewer();
    drillDownAdapter = new DrillDownAdapter(viewer);
    viewer.setContentProvider(new ViewContentProvider());
    viewer.setLabelProvider(new ViewLabelProvider());
    viewer.setSorter(new NameSorter());
    viewer.setInput(getViewSite());
    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();
    getSite().getWorkbenchWindow().getSelectionService().addSelectionListener(this);
}
 
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:19,代码来源:TasksView.java

示例4: setSearchVisible

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
public void setSearchVisible(boolean b) {
	if (content instanceof FilteredTree) {
		FilteredTree ftree = (FilteredTree)content;
		GridUtils.setVisible(ftree.getFilterControl().getParent(), b);
		ftree.layout(new Control[]{ftree.getFilterControl().getParent()});
	}
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:8,代码来源:ControlTreeViewer.java

示例5: createPartControl

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
/**
 * Create contents of the view part.
 * 
 * @param parent
 */
@Override
public void createPartControl(Composite parent) {
	// create the desired layout for this wizard page
	GridLayout glLeft = new GridLayout();
	glLeft.numColumns = 3;
	parent.setLayout(glLeft);
	// Create the sorters and filters
	viewerFilterDisplay = new ViewerFilterObjectGraph();
	viewerSorterDisplay = new ArchitecturalViewerSorter();

	GridData gdVisualFilteredViewer = new org.eclipse.swt.layout.GridData();
	gdVisualFilteredViewer.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gdVisualFilteredViewer.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
	gdVisualFilteredViewer.grabExcessHorizontalSpace = true;
	gdVisualFilteredViewer.grabExcessVerticalSpace = true;
	gdVisualFilteredViewer.horizontalSpan = 3;

	ftDisplay = new FilteredTree(parent, SWT.BORDER | SWT.MULTI
			| SWT.H_SCROLL | SWT.V_SCROLL, new ObjectGraphPatternFilter()); // Support
	// single
	ftDisplay.setLayoutData(gdVisualFilteredViewer);
	viewer = ftDisplay.getViewer();
	drillDownAdapter = new DrillDownAdapter(viewer);

	viewer.setContentProvider(new ContentProviderDisplayGraph());
	viewer.setLabelProvider(new ArchitecturalDecoratingLabelProvider(
			ftDisplay));
	// By default, no sorting
	viewer.setSorter(viewerSorterDisplay);
	viewer.addFilter(viewerFilterDisplay);

	viewer.setUseHashlookup(true);

	createActions();
	initializeToolBar();
	initializeMenu();
	hookLogListeners();
	refresh();
}
 
开发者ID:aroog,项目名称:code,代码行数:45,代码来源:AbstractObjectTreeView.java

示例6: doCreateTreeViewer

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
	FilteredTree tree = new FilteredTree(parent, style, new PatternFilter(), true);
	tree.setLayoutData(new GridData(GridData.FILL_BOTH));

	applyDialogFont(tree);

	TreeViewer viewer = tree.getViewer();
	return viewer;
}
 
开发者ID:angelozerr,项目名称:typescript.java,代码行数:10,代码来源:WorkspaceResourceSelectionDialog.java

示例7: createPartControl

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {
    Filter filter = new Filter();
    FilteredTree tree = new FilteredTree(parent, SWT.MULTI | SWT.H_SCROLL
            | SWT.V_SCROLL, filter, true) {
        @Override
        protected void updateToolbar(boolean visible) {
            super.updateToolbar(visible);
            viewer.collapseAll();
            viewer.expandToLevel(2);
        }
    };

    viewer = tree.getViewer();
    drillDownAdapter = new DrillDownAdapter(viewer);
    viewer.setContentProvider(new ViewContentProvider(this));
    viewer.setLabelProvider(new ViewLabelProvider());
    viewer.setComparator(new ViewSorter());
    viewer.getTree().setToolTipText(null);
    ColumnViewerToolTipSupport.enableFor(viewer);
    getSite().setSelectionProvider(viewer);
    refresh(new Object());

    targetActions = new LinkedHashSet<>();

    makeActions();
    hookContextMenu();
    hookDoubleClickAction();
    contributeToActionBars();

    readTargetDefinitions();

}
 
开发者ID:iloveeclipse,项目名称:plugindependencies,代码行数:34,代码来源:PluginTreeView.java

示例8: doCreateTreeViewer

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
@Override
protected TreeViewer doCreateTreeViewer(Composite parent, int style) {
	FilteredTree tree= new FilteredTreeWithFilter(parent, style, fInitialFilter, fIsDeepFiltering);
	tree.setLayoutData(new GridData(GridData.FILL_BOTH));

	applyDialogFont(tree);

	TreeViewer viewer= tree.getViewer();
	SWTUtil.setAccessibilityText(viewer.getControl(), Strings.removeMnemonicIndicator(getMessage()));
	return viewer;
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:12,代码来源:FilteredElementTreeSelectionDialog.java

示例9: createTree

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
private void createTree(Composite panel) {
	
	FilteredTree ft = new FilteredTree(panel, SWT.BORDER, new PropertyKeyFilter(), true);		
	keysViewer = ft.getViewer();
	MuleEnvironmentsTreeProvider environmentsProvider = new MuleEnvironmentsTreeProvider();
	keysViewer.setContentProvider(environmentsProvider);
	keysViewer.setLabelProvider(environmentsProvider);
	keysViewer.setInput(keyModel);
}
 
开发者ID:mulesoft,项目名称:mule-tooling-incubator,代码行数:10,代码来源:MuleEnvironmentKeysTreePart.java

示例10: createPartControl

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
/**
 * Creates an editor for the tree passed in
 * @param parent
 * @param tree which is edited. If this ControlTreeViewer was created without specifiying a default, this is cloned for the default.
 * @param managers, may be null
 * @throws Exception
 */
public Composite createPartControl(Composite parent, ControlTree tree, IContributionManager... managers) throws Exception {

	if (viewer!=null) throw new IllegalArgumentException("The createPartControl() method must only be called once!");

	if (defaultTree==null && tree==null) throw new IllegalArgumentException("No control tree has been defined!");

	// Clone this tree so that they can reset it!
	if (defaultTree==null) defaultTree = ControlTreeUtils.clone(tree);
       if (tree == null)      tree        = ControlTreeUtils.clone(defaultTree);

      if (setUseFilteredTree) {
	FilteredTree ftree = new FilteredTree(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE, new NamedNodeFilter(), true);
	this.viewer  = ftree.getViewer();
	this.content = ftree;
      } else {
	this.viewer  = new TreeViewer(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.SINGLE);
	this.content = viewer.getTree();
       }

	viewer.getTree().setLinesVisible(true);
	viewer.getTree().setHeaderVisible(false);
	ViewerUtils.setItemHeight(viewer.getTree(), 30);
	content.setLayoutData(new GridData(GridData.FILL_BOTH));

	createColumns(viewer);

	try {
		viewer.setContentProvider(new ControlContentProvider());
	} catch (Exception e) {
		logger.error("Cannot create content provider", e);
	}
	viewer.setInput(tree);
	viewer.expandAll();

	createActions(viewer, tree, managers);
	setSearchVisible(false);

	try {
	    registerAll();
	} catch (Exception ne) {
		logger.error("Cannot listen to motor values changing...");
	}

	return content;
}
 
开发者ID:eclipse,项目名称:scanning,代码行数:53,代码来源:ControlTreeViewer.java

示例11: LabelProviderObjectGraph

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
public LabelProviderObjectGraph(FilteredTree filterTree) {
	super(filterTree);
}
 
开发者ID:aroog,项目名称:code,代码行数:4,代码来源:LabelProviderObjectGraph.java

示例12: PreferenceBoldLabelProvider

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
PreferenceBoldLabelProvider(FilteredTree filterTree) {
	this.filterTree = filterTree;
}
 
开发者ID:aroog,项目名称:code,代码行数:4,代码来源:PreferenceBoldLabelProvider.java

示例13: getFont

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
public Font getFont(Object element) {
	return FilteredTree.getBoldFont(element, filterTree, filterForBoldElements);
}
 
开发者ID:aroog,项目名称:code,代码行数:4,代码来源:PreferenceBoldLabelProvider.java

示例14: ArchitecturalDecoratingLabelProvider

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
public ArchitecturalDecoratingLabelProvider(FilteredTree filterTree) {
	super(new LabelProviderObjectGraph(filterTree), new LabelDecoratorObjectGraph());
}
 
开发者ID:aroog,项目名称:code,代码行数:4,代码来源:ArchitecturalDecoratingLabelProvider.java

示例15: ArchitecturalDecoratingLabelProvider

import org.eclipse.ui.dialogs.FilteredTree; //导入依赖的package包/类
public ArchitecturalDecoratingLabelProvider(FilteredTree filterTree) {
	super(new LabelProviderObjectGraph(filterTree), new ArchitecturalLabelDecorator());
}
 
开发者ID:aroog,项目名称:code,代码行数:4,代码来源:ArchitecturalDecoratingLabelProvider.java


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