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


Java ViewForm.setContent方法代码示例

本文整理汇总了Java中org.eclipse.swt.custom.ViewForm.setContent方法的典型用法代码示例。如果您正苦于以下问题:Java ViewForm.setContent方法的具体用法?Java ViewForm.setContent怎么用?Java ViewForm.setContent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.custom.ViewForm的用法示例。


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

示例1: createControl

import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
public void createControl(Composite parent) {

		ViewForm viewForm= new ViewForm(parent, SWT.BORDER | SWT.FLAT);

		Composite inner= new Composite(viewForm, SWT.NULL);
		GridLayout layout= new GridLayout();
		inner.setLayout(layout);

		createTreeAndSourceViewer(inner);
		createButtonComposite(inner);
		viewForm.setContent(inner);

		setControl(viewForm);

		Dialog.applyDialogFont(viewForm);
		PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), IJavaHelpContextIds.RENAME_TYPE_WIZARD_PAGE);
	}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:18,代码来源:RenameTypeWizardSimilarElementsPage.java

示例2: reconcileViewFormLayout

import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
private void reconcileViewFormLayout() {
  ViewForm viewForm = ( ViewForm )adapter.getParent();
  if( scrollable.isSameAs( viewForm.getContent() ) ) {
    viewForm.setContent( adapter );
    relayout( viewForm );
  }
  if( scrollable.isSameAs( viewForm.getTopCenter() ) ) {
    viewForm.setTopCenter( adapter );
    relayout( viewForm );
  }
  if( scrollable.isSameAs( viewForm.getTopLeft() ) ) {
    viewForm.setTopLeft( adapter );
    relayout( viewForm );
  }
  if( scrollable.isSameAs( viewForm.getTopRight() ) ) {
    viewForm.setTopRight( adapter );
    relayout( viewForm );
  }
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:20,代码来源:LayoutReconciliation.java

示例3: DetailsContentViewer

import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
/**
 * Constructs a new instance of this class given its parent and a style
 * value describing its behavior and appearance.
 *
 * @param parent
 *            the parent component
 * @param style
 *            SWT style bits
 */
public DetailsContentViewer(Composite parent, int style) {
	viewForm = new ViewForm(parent, style);
	GridData gd = new GridData(GridData.FILL_HORIZONTAL);
	gd.horizontalSpan = 2;
	viewForm.setLayoutData(gd);
	label = new CLabel(viewForm, SWT.FLAT);
	label.setFont(parent.getFont());
	viewForm.setContent(label);
	hookControl(label);
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:20,代码来源:FilteredItemsSelectionDialog.java

示例4: setUpWithViewFormOnContent

import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
Rectangle setUpWithViewFormOnContent() {
  ViewForm viewForm = new ViewForm( shell, SWT.NONE );
  parent = viewForm;
  scrollable = createTree( viewForm, 1, 1 );
  adapter = new ScrollableAdapterFactory().create( scrollable, TreeAdapter.class ).get();
  adapter.setBounds( INITIAL_ADAPTER_BOUNDS );
  viewForm.setContent( scrollable );
  reconciliation = new LayoutReconciliation( adapter, new ScrollableControl<>( scrollable ) );
  shell.open();
  return INITIAL_ADAPTER_BOUNDS;
}
 
开发者ID:fappel,项目名称:xiliary,代码行数:12,代码来源:LayoutReconciliationHelper.java

示例5: createControl

import org.eclipse.swt.custom.ViewForm; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
public void createControl(Composite parent) {
	fForm= new ViewForm(parent, SWT.BORDER | SWT.FLAT);
	fForm.marginWidth= 0;
	fForm.marginHeight= 0;

	fLabel= new CLabel(fForm, SWT.NONE);
	fLabel.setText(RefactoringMessages.ReferencesInBinaryStatusContextViewer_title);
	fForm.setTopLeft(fLabel);

	Composite composite= new Composite(fForm, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	GridLayout layout= new GridLayout(1, false);
	layout.marginWidth= 0;
	layout.marginHeight= 0;
	composite.setLayout(layout);


	fTreeViewer= new TreeViewer(composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
	final AppearanceAwareLabelProvider labelProvider= new AppearanceAwareLabelProvider();
	fTreeViewer.setLabelProvider(new DelegatingStyledCellLabelProvider(labelProvider));
	fTreeViewer.setComparator(new ViewerComparator() {
		private Collator fCollator= Collator.getInstance();
		@Override
		public int compare(Viewer viewer, Object e1, Object e2) {
			String l1= labelProvider.getText(e1);
			String l2= labelProvider.getText(e2);
			return fCollator.compare(l1, l2);
		}
	});
	fTreeViewer.getTree().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));

	fButton= new Button(composite, SWT.PUSH);
	fButton.setText(RefactoringMessages.ReferencesInBinaryStatusContextViewer_show_as_search_button);
	GridData layoutData= new GridData(SWT.BEGINNING, SWT.CENTER, false, false);
	layoutData.widthHint= SWTUtil.getButtonWidthHint(fButton);
	fButton.setLayoutData(layoutData);
	fButton.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			fillInSearchView();
		}
	});
	fButton.setEnabled(false);

	fForm.setContent(composite);

	Dialog.applyDialogFont(parent);
}
 
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:52,代码来源:ReferencesInBinaryStatusContextViewer.java


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