當前位置: 首頁>>代碼示例>>Java>>正文


Java ScrolledComposite.setExpandVertical方法代碼示例

本文整理匯總了Java中org.eclipse.swt.custom.ScrolledComposite.setExpandVertical方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledComposite.setExpandVertical方法的具體用法?Java ScrolledComposite.setExpandVertical怎麽用?Java ScrolledComposite.setExpandVertical使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.eclipse.swt.custom.ScrolledComposite的用法示例。


在下文中一共展示了ScrolledComposite.setExpandVertical方法的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: NotesCheckinControl

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
protected NotesCheckinControl(final Composite parent, final int style, final CheckinControlOptions options) {
    super(parent, style, Messages.getString("NotesCheckinControl.Title"), CheckinSubControlType.CHECKIN_NOTES); //$NON-NLS-1$

    this.options = options;

    final FillLayout layout = new FillLayout();
    layout.marginHeight = 0;
    layout.marginWidth = 0;
    setLayout(layout);

    final int rootStyle = options.isForDialog() ? SWT.BORDER : SWT.NONE;
    rootComposite = new ScrolledComposite(this, SWT.V_SCROLL | rootStyle);
    rootComposite.setLayout(new FillLayout());
    rootComposite.setExpandHorizontal(true);
    rootComposite.setExpandVertical(true);

    addDisposeListener(new DisposeListener() {
        @Override
        public void widgetDisposed(final DisposeEvent e) {
            if (pendingCheckin != null) {
                pendingCheckin.getPendingChanges().removeAffectedTeamProjectsChangedListener(teamProjectsListener);
            }
        }
    });
}
 
開發者ID:Microsoft,項目名稱:team-explorer-everywhere,代碼行數:26,代碼來源:NotesCheckinControl.java

示例4: 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

示例5: setSize

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void setSize(Composite composite) {
	if (composite != null) {
		// Note: The font is set here in anticipation that the class
		// inheriting
		// this base class may add widgets to the dialog. setSize
		// is assumed to be called just before we go live.
		applyDialogFont(composite);
		Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		composite.setSize(minSize);
		// set scrollbar composite's min size so page is expandable but
		// has scrollbars when needed
		if (composite.getParent() instanceof ScrolledComposite) {
			ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
			sc1.setMinSize(minSize);
			sc1.setExpandHorizontal(true);
			sc1.setExpandVertical(true);
		}
	}
}
 
開發者ID:angelozerr,項目名稱:angular-eclipse,代碼行數:20,代碼來源:AngularGlobalPreferencesPage.java

示例6: setSize

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void setSize(Composite composite) {
	if (composite != null) {
		// Note: The font is set here in anticipation that the class inheriting
		//       this base class may add widgets to the dialog.   setSize
		//       is assumed to be called just before we go live.
		applyDialogFont(composite);
		Point minSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT);
		composite.setSize(minSize);
		// set scrollbar composite's min size so page is expandable but
		// has scrollbars when needed
		if (composite.getParent() instanceof ScrolledComposite) {
			ScrolledComposite sc1 = (ScrolledComposite) composite.getParent();
			sc1.setMinSize(minSize);
			sc1.setExpandHorizontal(true);
			sc1.setExpandVertical(true);
		}
	}
}
 
開發者ID:angelozerr,項目名稱:angular-eclipse,代碼行數:19,代碼來源:HTMLAngularGlobalPreferencesPage.java

示例7: createBParam

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void createBParam(FormToolkit toolkit, CTabFolder tabFolder) {
	CTabItem bptab = new CTabItem(tabFolder, SWT.NONE);
	bptab.setText(Messages.ParametersDialog_built_in_parameters);

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

	Composite sectionClient = toolkit.createComposite(scompo);
	sectionClient.setLayout(new GridLayout(2, false));

	for (JRParameter p : prompts)
		if (!p.isForPrompting() || p.isSystemDefined())
			createInput(toolkit, sectionClient, (JRDesignParameter) p);
	sectionClient.pack();
	scompo.setMinSize(sectionClient.getSize());
	scompo.setContent(sectionClient);
	bptab.setControl(scompo);
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:20,代碼來源:ParametersDialog.java

示例8: createControl

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public void createControl(Composite parent) {		
	// Create a scrollable container to hold components
	// This is useful when users are using a lower resolution.
	ScrolledComposite comp = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
	Composite container = new Composite(comp, SWT.NONE);
	container.setLayout(new GridLayout(1, false));
	container.setLayoutData(new GridData(GridData.FILL_BOTH));
       
	createConfigurationArea(container);
	
	createLanguagePackFilteredListArea(container);
	
	createCoverageReportFilteredListArea(container);
	
	setControl(container);
	Dialog.applyDialogFont(container);
	setPageComplete(!"".equals(fWorkingDirectoryLocationText.getText()) && !"".equals(fTranslationCatalogueLocationText.getText()));
	
	// Scrollable container properties
	comp.setContent(container);
	comp.setMinHeight(500);
	comp.setExpandHorizontal(true);
	comp.setExpandVertical(true);
}
 
開發者ID:wolfgang-ch,項目名稱:mytourbook,代碼行數:25,代碼來源:BuildToolWizardConfigurationPage.java

示例9: 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

示例10: createUserParam

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void createUserParam(FormToolkit toolkit, CTabFolder tabFolder) {
	if (canShowParameters()) {
		CTabItem ptab = new CTabItem(tabFolder, SWT.NONE);
		ptab.setText(Messages.ParametersDialog_user_parameters);

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

		Composite sectionClient = toolkit.createComposite(scompo);
		sectionClient.setLayout(new GridLayout(2, false));

		for (JRParameter p : prompts)
			if (p.isForPrompting() && !p.isSystemDefined())
				createInput(toolkit, sectionClient, (JRDesignParameter) p);
		sectionClient.pack();
		scompo.setMinSize(sectionClient.getSize());
		scompo.setContent(sectionClient);
		ptab.setControl(scompo);
	}
}
 
開發者ID:OpenSoftwareSolutions,項目名稱:PDFReporter-Studio,代碼行數:22,代碼來源:ParametersDialog.java

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: createMenus

import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void createMenus(final Composite parent) {
	final ScrolledComposite scroll = new ScrolledComposite(parent, SWT.V_SCROLL);
	scroll.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1));
	scroll.setExpandHorizontal(true);
	scroll.setExpandVertical(true);
	attributesMenu = new Composite(scroll, SWT.NONE);
	scroll.setContent(attributesMenu);
	final GridLayout layout = new GridLayout(1, false);
	layout.marginWidth = 0;
	layout.marginHeight = 0;
	layout.verticalSpacing = 1;
	attributesMenu.setLayout(layout);
	attributesMenu.setBackground(IGamaColors.WHITE.color());
	fillAttributeMenu();
	final Point size = attributesMenu.computeSize(SWT.DEFAULT, SWT.DEFAULT, true);
	attributesMenu.setSize(size);
	attributesMenu.layout(true, true);
	scroll.setMinSize(size);

}
 
開發者ID:gama-platform,項目名稱:gama,代碼行數:21,代碼來源:PopulationInspectView.java


注:本文中的org.eclipse.swt.custom.ScrolledComposite.setExpandVertical方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。