當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。