• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DrillDownComposite类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: setupContainerControl

import org.eclipse.ui.part.DrillDownComposite; //导入依赖的package包/类
protected DrillDownComposite setupContainerControl(Composite parent) {
  DrillDownComposite result = new DrillDownComposite(parent, SWT.BORDER);

  containerViewer = new TreeViewer(result, SWT.NONE);
  result.setChildTree(containerViewer);

  containerViewer.setContentProvider(new WorkbenchContentProvider());
  containerViewer.setLabelProvider(new WorkbenchLabelProvider());
  containerViewer.setComparator(new ViewerComparator());
  containerViewer.setUseHashlookup(true);
  containerViewer.setInput(prepareInput());
  return result;
}
 
开发者ID:google,项目名称:depan,代码行数:14,代码来源:ProjectResourceControl.java


示例2: createControl

import org.eclipse.ui.part.DrillDownComposite; //导入依赖的package包/类
/**
 * Creates the UI part of the page.
 *
 * @param parent  the parent of the created widgets
 */
public void createControl(Composite parent) {
	Composite composite = createComposite(parent, 1);
	// set F1 help
	PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.MOVE_RENAME_REMOTE_RESOURCE_PAGE);

	Listener listener = new Listener() {
		public void handleEvent(Event event) {
               resourceName = resourceNameText.getText();
			validateFields();
		}
	};

       // the text field for the parent folder
	createLabel(composite, Policy.bind("MoveRemoteResourceWizardMainPage.selectParentUrl")); //$NON-NLS-1$

       urlParentText = createTextField(composite);
       urlParentText.addListener(SWT.Selection, listener);
       urlParentText.addListener(SWT.Modify, listener);
       urlParentText.setEditable(false);


       // Create drill down.
       DrillDownComposite drillDown = new DrillDownComposite(composite, SWT.BORDER);
       GridData spec = new GridData(GridData.FILL_BOTH);
       spec.widthHint = LIST_WIDTH;
       spec.heightHint = LIST_HEIGHT;
       drillDown.setLayoutData(spec);

       // Create tree viewer inside drill down.
       viewer = new TreeViewer(drillDown, SWT.H_SCROLL | SWT.V_SCROLL);
       drillDown.setChildTree(viewer);
       viewer.setLabelProvider(new WorkbenchLabelProvider());
       viewer.setContentProvider(new RemoteContentProvider());
       viewer.setInput(new AllRootsElement());
       viewer.addFilter(RepositoryFilters.FOLDERS_ONLY);
       viewer.addSelectionChangedListener(treeSelectionChangedListener);

       // the text field for the resource name
       createLabel(composite, Policy.bind("MoveRemoteResourceWizardMainPage.resourceName")); //$NON-NLS-1$

       resourceNameText = createTextField(composite);
       resourceNameText.addListener(SWT.Selection, listener);
       resourceNameText.addListener(SWT.Modify, listener);
       resourceNameText.setText(resourceName);

	validateFields();
       resourceNameText.setFocus();

	setControl(composite);

       // set the initial selection in the tree
       if (parentFolder != null) {
           Object toSelect = null;
           if (parentFolder.getParent() == null) {
               // the root folder : select the repository
               toSelect = parentFolder.getRepository();
           }
           else
               toSelect = parentFolder;
           viewer.expandToLevel(toSelect,0);
           viewer.setSelection(new StructuredSelection(toSelect),true);
       }

}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:70,代码来源:MoveRemoteResourceWizardMainPage.java


示例3: createControl

import org.eclipse.ui.part.DrillDownComposite; //导入依赖的package包/类
/**
 * Creates the UI part of the page.
 *
 * @param parent  the parent of the created widgets
 */
public void createControl(Composite parent) {
	Composite composite = createComposite(parent, 1);
	// set F1 help
	PlatformUI.getWorkbench().getHelpSystem().setHelp(composite, IHelpContextIds.CREATE_REMOTE_FOLDER_PAGE);

	Listener listener = new Listener() {
		public void handleEvent(Event event) {
			validateFields();
		}
	};

       // the text field for the parent folder
	createLabel(composite, Policy.bind("NewRemoteFolderWizardMainPage.selectParentUrl")); //$NON-NLS-1$

       urlParentText = createTextField(composite);
       urlParentText.addListener(SWT.Selection, listener);
       urlParentText.addListener(SWT.Modify, listener);
       urlParentText.setEditable(false);


       // Create drill down.
       DrillDownComposite drillDown = new DrillDownComposite(composite, SWT.BORDER);
       GridData spec = new GridData(GridData.FILL_BOTH);
       spec.widthHint = LIST_WIDTH;
       spec.heightHint = LIST_HEIGHT;
       drillDown.setLayoutData(spec);

       // Create tree viewer inside drill down.
       viewer = new TreeViewer(drillDown, SWT.H_SCROLL | SWT.V_SCROLL);
       drillDown.setChildTree(viewer);
       viewer.setLabelProvider(new WorkbenchLabelProvider());
       RemoteContentProvider remoteContentProvider = new RemoteContentProvider();
       remoteContentProvider.setUseDeferredContentManager(false);
       viewer.setContentProvider(remoteContentProvider);
       viewer.setInput(new AllRootsElement());
       viewer.addFilter(RepositoryFilters.FOLDERS_ONLY);
       viewer.addSelectionChangedListener(treeSelectionChangedListener);

       // the text field for the folder name
       createLabel(composite, Policy.bind("NewRemoteFolderWizardMainPage.folderName")); //$NON-NLS-1$

       folderNameText = createTextField(composite);
       folderNameText.addListener(SWT.Selection, listener);
       folderNameText.addListener(SWT.Modify, listener);

	validateFields();
       folderNameText.setFocus();

	setControl(composite);

       // set the initial selection in the tree
       if (parentFolder != null) {      	
       	List itemsToExpand = new ArrayList();
       	ISVNRemoteFolder remoteParent = parentFolder.getParent();
       	while (remoteParent != null) {
   			if (remoteParent.getParent() == null) itemsToExpand.add(0, remoteParent.getRepository());
   			else itemsToExpand.add(0, remoteParent);
   			remoteParent = remoteParent.getParent();        		
       	}

       	viewer.setExpandedElements(itemsToExpand.toArray());
       	if (parentFolder.getParent() == null) viewer.setSelection(new StructuredSelection(parentFolder.getRepository()), true);
       	else viewer.setSelection(new StructuredSelection(parentFolder), true);
       }

}
 
开发者ID:subclipse,项目名称:subclipse,代码行数:72,代码来源:NewRemoteFolderWizardMainPage.java


示例4: createContents

import org.eclipse.ui.part.DrillDownComposite; //导入依赖的package包/类
private void createContents() {
	setLayout(new FormLayout());
	FormData formData = new FormData();
	formData.left = new FormAttachment(0, 0);		
	formData.top = new FormAttachment(0, 0);
	formData.right = new FormAttachment(100, -5);
	formData.bottom = new FormAttachment(90, 0/*-5*/);		
	
	final DrillDownComposite ddComposite = new DrillDownComposite(this, SWT.BORDER);		
	ddComposite.setLayoutData(formData);
	treeViewer = new TreeViewer(ddComposite);
	ddComposite.setChildTree(treeViewer);
	
	if (!mandatorySelection) {
		FormData formData2 = new FormData();
		formData2.left = new FormAttachment(0, 0);		
		formData2.top = new FormAttachment(90, 0);
		formData2.right = new FormAttachment(100, -5);
		formData2.bottom = new FormAttachment(100, 0/*-5*/);				
		chkDisableSelection = new Button(this, SWT.CHECK);
		chkDisableSelection.setLayoutData(formData2);
		chkDisableSelection.setText("Skip selection");
		chkDisableSelection.addSelectionListener(
			new SelectionAdapter() {
			  public void widgetSelected(org.eclipse.swt.events.SelectionEvent e) {
				ddComposite.setEnabled(!chkDisableSelection.getSelection());
				treeViewer.getControl().setEnabled(!chkDisableSelection.getSelection());
				if (!ddComposite.getEnabled())
					elementSelectionChanged(null);
				else
					elementSelectionChanged((IStructuredSelection)treeViewer.getSelection());
			  }
			}
		);
	}
	
	treeViewer.setComparator(new ViewerComparator());
	treeViewer.setUseHashlookup(true);
	treeViewer.setContentProvider(new TreeContentProvider());
	treeViewer.setLabelProvider(new TreeLabelProvider());
	treeViewer.setInput(ResourcesPlugin.getWorkspace().getRoot().getProjects());
	treeViewer.addSelectionChangedListener(
		new ISelectionChangedListener() {
			public void selectionChanged(SelectionChangedEvent event) {
				elementSelectionChanged((IStructuredSelection)event.getSelection());
			}
		}				
	);
}
 
开发者ID:SOM-Research,项目名称:EMFtoCSP,代码行数:50,代码来源:ElementSelectionWidget.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java MyLocationTracking类代码示例发布时间:2022-05-23
下一篇:
Java RpcDispatcher类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap