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


Java ScrolledComposite.setContent方法代码示例

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


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

示例1: createFeatureListTab

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
	TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
	if (type == ActiveTab.ALL_FEATURES) {
		tabItem.setText(ALL_FEATURES_TAB_TITLE);
	} else {
		tabItem.setText(UPDATES_TAB_TITLE);
	}
	ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
	scroll.setLayout(new GridLayout());
	scroll.setLayoutData(new GridData());

	Group group = new Group(scroll, SWT.NONE);
	group.setLayout(new GridLayout());
	group.setLayoutData(new GridData());
	listFeatures(group, type);
	scroll.setContent(group);
	scroll.setExpandHorizontal(true);
	scroll.setExpandVertical(true);
	scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	tabItem.setControl(scroll);
}
 
开发者ID:wso2,项目名称:developer-studio,代码行数:22,代码来源:UpdaterDialog.java

示例2: DiskInfoTab

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
 * Create the DISK INFO tab.
 */
public DiskInfoTab(CTabFolder tabFolder, FormattedDisk[] disks) {
	this.formattedDisks = disks;
	
	CTabItem ctabitem = new CTabItem(tabFolder, SWT.NULL);
	ctabitem.setText(textBundle.get("DiskInfoTab.Title")); //$NON-NLS-1$
	
	tabFolder.addSelectionListener(new SelectionAdapter() {
		public void widgetSelected(SelectionEvent event) {
			getInfoTable().removeAll();
			buildDiskInfoTable(getFormattedDisk(0));	// FIXME!
		}
	});
	
	ScrolledComposite scrolledComposite = new ScrolledComposite(
		tabFolder, SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL);
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	ctabitem.setControl(scrolledComposite);
	
	composite = new Composite(scrolledComposite, SWT.NONE);
	createDiskInfoTable();
	if (disks.length > 1) {
		RowLayout layout = new RowLayout(SWT.VERTICAL);
		layout.wrap = false;
		composite.setLayout(layout);
		for (int i=0; i<disks.length; i++) {
			Label label = new Label(composite, SWT.NULL);
			label.setText(disks[i].getDiskName());
			buildDiskInfoTable(disks[i]);
		}
	} else {
		composite.setLayout(new FillLayout());
		buildDiskInfoTable(disks[0]);
	}
	composite.pack();
	scrolledComposite.setContent(composite);
	scrolledComposite.setMinSize(
		composite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
}
 
开发者ID:AppleCommander,项目名称:AppleCommander,代码行数:43,代码来源:DiskInfoTab.java

示例3: FXCanvasScrollApp

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected FXCanvasScrollApp() {
    shell = new Shell();
    shell.setText(this.getClass().getSimpleName());
    shell.setLayout(new FillLayout());

    ScrolledComposite scrollPane = new ScrolledComposite(shell, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
    FXCanvas fxCanvas = new FXCanvas(scrollPane, SWT.BORDER);
    fxCanvas.setScene(createScene(SCROLL_CONTAINER_ID));
    scrollPane.setContent(fxCanvas);
    scrollPane.setExpandHorizontal(true);
    scrollPane.setExpandVertical(true);
    fxCanvas.pack();
    scrollPane.setMinSize(fxCanvas.getSize());

    shell.pack();
    Monitor monitor = shell.getMonitor();
    Rectangle monitorRect = monitor.getClientArea();
    Rectangle shellRect = shell.getBounds();
    shellRect.x = Math.max(0, (monitorRect.width - shellRect.width) / 2);
    shellRect.y = Math.max(0, (monitorRect.height - shellRect.height) / 2);
    shell.setBounds(shellRect);
    shell.open();
}
 
开发者ID:teamfx,项目名称:openjfx-8u-dev-tests,代码行数:24,代码来源:FXCanvasScrollApp.java

示例4: createJExcelAPI

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createJExcelAPI(CTabFolder tabFolder) {
	CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
	ptab.setText(Messages.ExcelExporterPreferencePage_60);

	ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
	scompo.setExpandHorizontal(true);
	scompo.setExpandVertical(true);

	Composite sc = new Composite(scompo, SWT.NONE);
	sc.setLayout(new GridLayout(3, false));

	BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
			Messages.ExcelExporterPreferencePage_61, sc);
	addField(bf);
	HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());

	addField(new BooleanFieldEditor(NSF_EXPORT_XLS_USE_TMP_FILE, Messages.ExcelExporterPreferencePage_62, sc));
	addField(new BooleanFieldEditor(NSF_EXPORT_XLS_CELL_COMPLEX_FORMAT, Messages.ExcelExporterPreferencePage_63, sc));

	scompo.setMinSize(sc.getSize());
	scompo.setContent(sc);
	ptab.setControl(scompo);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:ODSExporterPreferencePage.java

示例5: createUI_52_VertexScrolledContainer

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private Composite createUI_52_VertexScrolledContainer(final Composite parent) {

		// scrolled container
		_vertexScrolledContainer = new ScrolledComposite(parent, SWT.V_SCROLL);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(_vertexScrolledContainer);
		_vertexScrolledContainer.setExpandVertical(true);
		_vertexScrolledContainer.setExpandHorizontal(true);

		// vertex container
		final Composite vertexContainer = new Composite(_vertexScrolledContainer, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(vertexContainer);
		GridLayoutFactory.fillDefaults()//
				.numColumns(6)
				.applyTo(vertexContainer);
//		vertexContainer.setBackground(Display.getCurrent().getSystemColor(SWT.COLOR_GRAY));

		_vertexScrolledContainer.setContent(vertexContainer);
		_vertexScrolledContainer.addControlListener(new ControlAdapter() {
			@Override
			public void controlResized(final ControlEvent e) {
				_vertexScrolledContainer.setMinSize(vertexContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
			}
		});

		return vertexContainer;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:DialogMap3ColorEditor.java

示例6: createByRole

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createByRole(CTabFolder tabFolder) {
	CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
	bptab.setText(Messages.PermissionPage_6);

	scRole = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
	scRole.setLayoutData(new GridData(GridData.FILL_BOTH));

	cmpRole = new Composite(scRole, SWT.NONE);
	cmpRole.setLayout(new GridLayout(2, true));

	scRole.setContent(cmpRole);
	// Set the minimum size
	scRole.setMinSize(cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpRole.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

	// Expand both horizontally and vertically
	scRole.setExpandHorizontal(true);
	scRole.setExpandVertical(true);

	bptab.setControl(scRole);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:PermissionPage.java

示例7: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {	
	
	Composite mainComposite = new Composite(parent, SWT.NONE);
	mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());

	
	Label titleLabel = new Label(mainComposite, SWT.NONE);
	titleLabel.setText(Messages.ShowAdaptersPage_label);
	ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
	scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandHorizontal(true);
	scrollComp.setExpandVertical(true);
	content = new Composite(scrollComp, SWT.NONE);
	scrollComp.setContent(content);
	content.setLayout(new GridLayout(1,false));
	content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:ShowAdaptersPage.java

示例8: createJExcelAPI

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createJExcelAPI(CTabFolder tabFolder) {
	CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
	ptab.setText(Messages.ExcelExporterPreferencePage_60);

	ScrolledComposite scompo = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
	scompo.setExpandHorizontal(true);
	scompo.setExpandVertical(true);

	Composite sc = new Composite(scompo, SWT.NONE);
	sc.setLayout(new GridLayout(3, false));

	BooleanFieldEditor bf = new BooleanFieldEditor(XlsExporterConfiguration.PROPERTY_CREATE_CUSTOM_PALETTE,
			Messages.ExcelExporterPreferencePage_61, sc);
	addField(bf);
	HelpSystem.setHelp(bf.getDescriptionControl(sc), StudioPreferencePage.REFERENCE_PREFIX + bf.getPreferenceName());

	addField(new BooleanFieldEditor(JxlExporterConfiguration.PROPERTY_USE_TEMP_FILE,
			Messages.ExcelExporterPreferencePage_62, sc));
	addField(new BooleanFieldEditor(JxlReportConfiguration.PROPERTY_COMPLEX_FORMAT,
			Messages.ExcelExporterPreferencePage_63, sc));

	scompo.setMinSize(sc.getSize());
	scompo.setContent(sc);
	ptab.setControl(scompo);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:ExcelExporterPreferencePage.java

示例9: createPartControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	try {
		final Composite outer = toolkit.createComposite(parent, SWT.NONE);
		final GridLayout layout = new GridLayout(1, false);
		layout.marginHeight = layout.marginWidth = 0;
		outer.setLayout(layout);
		final GridData layoutData = new GridData(GridData.FILL_BOTH);
		outer.setLayoutData(layoutData);

		createValidationComposite(outer);

		final ScrolledComposite content = new ScrolledComposite(outer, SWT.H_SCROLL | SWT.V_SCROLL);
		content.setExpandHorizontal(true);
		content.setExpandVertical(true);
		content.setLayout(layout);
		content.setLayoutData(layoutData);
		final Composite children = initUi(content);
		content.setMinSize(children.computeSize(SWT.DEFAULT, SWT.DEFAULT));
		content.setContent(children);
		createBinding();
		additionalTasks();
	} catch (final ConnectException e) {
		handle(e);
	}
}
 
开发者ID:FI13,项目名称:afbb-bibo,代码行数:27,代码来源:AbstractView.java

示例10: createUI_568_IL_SpeedTourType_ScrolledContainer

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private Composite createUI_568_IL_SpeedTourType_ScrolledContainer(final Composite parent) {

		// scrolled container
		_speedTourType_ScrolledContainer = new ScrolledComposite(parent, SWT.V_SCROLL);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(_speedTourType_ScrolledContainer);
		_speedTourType_ScrolledContainer.setExpandVertical(true);
		_speedTourType_ScrolledContainer.setExpandHorizontal(true);

		// container
		final Composite speedTTContainer = new Composite(_speedTourType_ScrolledContainer, SWT.NONE);
		GridDataFactory.fillDefaults().grab(true, true).applyTo(speedTTContainer);
		GridLayoutFactory
				.fillDefaults()//
				.numColumns(5)
				.applyTo(speedTTContainer);

		_speedTourType_ScrolledContainer.setContent(speedTTContainer);
		_speedTourType_ScrolledContainer.addControlListener(new ControlAdapter() {
			@Override
			public void controlResized(final ControlEvent e) {
				_speedTourType_ScrolledContainer.setMinSize(speedTTContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT));
			}
		});

		return speedTTContainer;
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:DialogEasyImportConfig.java

示例11: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createControl(Composite parent) {
	scompo = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
	scompo.setExpandHorizontal(true);
	scompo.setExpandVertical(true);
	scompo.setAlwaysShowScrollBars(false);
	scompo.setMinSize(100, 100);

	composite = new Composite(scompo, SWT.BORDER);
	composite.setBackgroundMode(SWT.INHERIT_FORCE);
	composite.setBackground(parent.getBackground());
	GridLayout layout = new GridLayout();
	layout.marginBottom = 20;
	composite.setLayout(layout);
	scompo.setContent(composite);

	return scompo;
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:19,代码来源:VExporter.java

示例12: createUI

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createUI(final Composite parent) {

		_tk = new FormToolkit(parent.getDisplay());

		_scrolledContainer = new ScrolledComposite(parent, SWT.V_SCROLL);
		{
			_scrolledContent = _tk.createComposite(_scrolledContainer);
			GridDataFactory.fillDefaults().applyTo(_scrolledContent);
			GridLayoutFactory.swtDefaults().numColumns(1).applyTo(_scrolledContent);
			{
				createUI_10_StatisticsContainer(_scrolledContent);
			}

			// setup scrolled container
			_scrolledContainer.setExpandVertical(true);
			_scrolledContainer.setExpandHorizontal(true);
			_scrolledContainer.addControlListener(new ControlAdapter() {
				@Override
				public void controlResized(final ControlEvent e) {
					onResizeScrolledContainer(_scrolledContent);
				}
			});

			_scrolledContainer.setContent(_scrolledContent);
		}
	}
 
开发者ID:wolfgang-ch,项目名称:mytourbook,代码行数:27,代码来源:Map3StatisticsView.java

示例13: createControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	
	//Calculate which parameters are needed and where they are needed
	String datasetName = (String)connectedDataset.getPropertyActualValue(JRDesignDataset.PROPERTY_NAME);
	runReferences = DeleteDatasetCommand.getDatasetUsage(connectedDataset.getRoot().getChildren(), datasetName);
	missingParamOnMain = getMissingParameterOnMainDataset();
	missingParamOnDataset = getMissingParameterOnDataset();
	missingParamOnRun = getMissingDatasetsRun();
	
	//Create the appropriate controls for this parameters
  ScrolledComposite scrollComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
  scrollComposite.setExpandVertical(true);
	Composite mainComposite = new Composite(scrollComposite, SWT.NONE);
	scrollComposite.setContent(mainComposite);
	mainComposite.setLayout(new GridLayout(1,false));
	if (missingParamOnMain.isEmpty() && missingParamOnRun.isEmpty() && missingParamOnRun.isEmpty()){
		new Label(mainComposite, SWT.NONE).setText(Messages.ConnectToDomainWizardPage_noChangesLabel);
	} else createNotEmptyContent(mainComposite);
	mainComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
	scrollComposite.setMinSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	mainComposite.setSize(mainComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
   UIUtils.resizeAndCenterShell(parent.getShell(), 650, 550);
	setControl(mainComposite);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:26,代码来源:ConnectToDomainWizardPage.java

示例14: createByUser

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createByUser(CTabFolder tabFolder) {
	CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
	bptab.setText(Messages.PermissionPage_5);

	scUser = new ScrolledComposite(tabFolder, SWT.H_SCROLL | SWT.V_SCROLL);
	scUser.setLayoutData(new GridData(GridData.FILL_BOTH));

	cmpUser = new Composite(scUser, SWT.NONE);
	cmpUser.setLayout(new GridLayout(2, true));

	scUser.setContent(cmpUser);
	// Set the minimum size
	scUser.setMinSize(cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, cmpUser.computeSize(SWT.DEFAULT, SWT.DEFAULT).y);

	// Expand both horizontally and vertically
	scUser.setExpandHorizontal(true);
	scUser.setExpandVertical(true);

	bptab.setControl(scUser);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:21,代码来源:PermissionPage.java

示例15: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite composite = (Composite) super.createDialogArea(parent);
	ScrolledComposite scrollable = new ScrolledComposite(composite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
	scrollable.setExpandHorizontal(true);
	scrollable.setExpandVertical(true);
	scrollable.setLayoutData(new GridData(GridData.FILL_BOTH));
	viewer = new PlanRulesTreeViewer(scrollable);
	viewer.setContentProvider(new PlanRulesContentProvider());
	viewer.setInput(element);
	setViewerFromRules();
	Tree tree = viewer.getTree();
	scrollable.setContent(tree);
	tree.setSize(tree.computeSize(SWT.DEFAULT, SWT.DEFAULT));
	return composite;
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:17,代码来源:PlanRulesDialog.java


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