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


Java ScrolledComposite.setLayoutData方法代码示例

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


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

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

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

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

示例4: 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.ShowServersPage_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.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	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,代码来源:ShowServersPage.java

示例5: createPartControl

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
public void createPartControl(Composite parent) {
	scrollComp = new ScrolledComposite(parent, SWT.V_SCROLL);
	scrollComp.setLayoutData(new GridData(GridData.FILL_BOTH));
	scrollComp.setLayout(new GridLayout(1,false));
	scrollComp.setExpandVertical(true);
	scrollComp.setExpandHorizontal(true);
	scrollComp.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			refreshScrolledHeight();
		}
	});
	mainContainer = new Composite(scrollComp, SWT.BORDER);
	mainContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
	scrollComp.setContent(mainContainer);
   mainContainer.setLayout(new ButtonFillLayout());
   
	IWorkbenchPart editor = getContributingPart();
	if (editor instanceof CachedSelectionProvider){
		CachedSelectionProvider cachedSelEditor = (CachedSelectionProvider)editor;
		cachedSelEditor.getSelectionCache().addSelectionChangeListener(selectionListener);
	} 
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:25,代码来源:FormattingToolsView.java

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

示例7: createDialogArea

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

	Composite composite = (Composite) super.createDialogArea( parent );
	ScrolledComposite sc = new ScrolledComposite( composite, SWT.V_SCROLL );
	sc.setAlwaysShowScrollBars( false );
	sc.setExpandHorizontal( true );
	sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );

	Composite content = new Composite( sc, SWT.NONE );
	sc.setContent( content );
	content.setLayout( new GridLayout( ) );

	// sc.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_BLACK ) );
	// content.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_BLUE ) );
	// composite.setBackground( Display.getCurrent( ).getSystemColor(
	// SWT.COLOR_RED ) );

	dialogHelper.setExpressionProvider( expressionProvider );
	dialogHelper.createContent( content );
	UIUtil.bindHelp( content, isTimePeriod || isEditTimePeriod()? IHelpContextIds.RELATIVE_TIME_PERIOD_DIALOG : IHelpContextIds.DATA_COLUMN_BINDING_DIALOG );
	return content;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:26,代码来源:DataColumnBindingDialog.java

示例8: createControl

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

    sc = new ScrolledComposite(rootComposite, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
    sc.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
    sc.setExpandHorizontal(true);
    sc.setExpandVertical(true);

    container = new Composite(sc, SWT.NULL);
    container.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).create());

    Label instructions = new Label(container, SWT.NONE);
    final GridData gridData = new GridData();
    gridData.horizontalSpan = 3;
    instructions.setLayoutData(gridData);
    instructions
            .setText("The following are the namespaces parsed from the WSDL and their corresponding Apex class names.\n"
                    + "If desired, you can rename these classes.");

    sc.setContent(container);
    sc.setMinSize(container.computeSize(SWT.DEFAULT, SWT.DEFAULT));

    setControl(rootComposite);
}
 
开发者ID:forcedotcom,项目名称:idecore,代码行数:27,代码来源:Wsdl2apexWizardRenameClasses.java

示例9: createBottomTypeArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected void createBottomTypeArea( Composite parent )
{
	ScrolledComposite sc = new ScrolledComposite( parent, SWT.V_SCROLL
			| SWT.H_SCROLL );
	{
		GridLayout layout = new GridLayout( );
		sc.setLayout( layout );
		GridData gridData = new GridData( GridData.FILL_BOTH );
		sc.setLayoutData( gridData );
		sc.setExpandHorizontal( true );
		sc.setExpandVertical( true );
	}

	cmpType = new Composite( sc, SWT.NONE );
	cmpType.setLayout( new GridLayout( 2, false ) );
	cmpType.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
	sc.setContent( cmpType );

	createLeftTypeTable( cmpType );
	populateChartTypes( );

	createRightDetails( cmpType );

	Point size = cmpType.computeSize( SWT.DEFAULT, SWT.DEFAULT );
	sc.setMinSize( size );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:27,代码来源:TaskSelectType.java

示例10: createContents

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {

    this.getShell().setText(_Command);

    ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
    scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    scrolledComposite.setExpandHorizontal(true);
    Text text = new Text(scrolledComposite, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
    text.setText(_Result);
    text.pack();
    scrolledComposite.setContent(text);

    return scrolledComposite;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:16,代码来源:ZooKeeperServerModelFormPage.java

示例11: initializeGridComposites

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void initializeGridComposites(){
	textGridComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	textGridCompositeLayoutData = new ColumnLayoutData();
	textGridCompositeLayoutData.heightHint = 267;
	textGridComposite.setLayoutData(textGridCompositeLayoutData);
	textGridComposite.setExpandVertical(true);
	textGridComposite.setExpandHorizontal(true);
	
	innerComposite = new Composite(textGridComposite, SWT.NONE);
	ColumnLayout cl_composite_1 = new ColumnLayout();
	cl_composite_1.maxNumColumns = 1;
	innerComposite.setLayout(cl_composite_1);
	
	textGridComposite.setContent(innerComposite);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:16,代码来源:TextGrid.java

示例12: createInputFieldSection

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void createInputFieldSection(Composite composite) {
	
	Composite inputComposite = new Composite(composite, SWT.NONE);
	GridLayout gl_inputComposite = new GridLayout(1, false);
	gl_inputComposite.horizontalSpacing = 0;
	gl_inputComposite.verticalSpacing = 0;
	gl_inputComposite.marginWidth = 0;
	gl_inputComposite.marginHeight = 0;
	inputComposite.setLayout(gl_inputComposite);
	GridData gd_inputComposite = new GridData(SWT.FILL, SWT.FILL, false, true,
			1, 1);
	gd_inputComposite.widthHint = 269;
	inputComposite.setLayoutData(gd_inputComposite);
	inputComposite.setBounds(0, 0, 64, 64);

	ScrolledComposite inputScrolledComposite = new ScrolledComposite(
			inputComposite, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	inputScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
			true, true, 1, 1));
	inputScrolledComposite.setExpandHorizontal(true);
	inputScrolledComposite.setExpandVertical(true);

	final SashForm inputComposite2 = new SashForm(inputScrolledComposite, SWT.VERTICAL);
	inputComposite2.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			in0Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
			in1Table.getColumn(0).setWidth(inputComposite2.getSize().x-5);
		}
	});
	inputComposite2.setLayout(new GridLayout(1, false));
	
	addIn0InputFields(inputComposite2);
	
	addIn1InputFields(inputComposite2);

	inputScrolledComposite.setContent(inputComposite2);
	inputScrolledComposite.setMinSize(inputComposite2.computeSize(SWT.DEFAULT,
			SWT.DEFAULT));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:41,代码来源:LookupMapDialog.java

示例13: createDialogArea

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.getShell().setText("Component Details");
	container.setLayout(new GridLayout(1, false));
	
	ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
	GridData gd_scrolledComposite = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gd_scrolledComposite.heightHint = 289;
	gd_scrolledComposite.widthHint = 571;
	scrolledComposite.setLayoutData(gd_scrolledComposite);
	scrolledComposite.setExpandHorizontal(true);
	scrolledComposite.setExpandVertical(true);
	
	text = new Text(scrolledComposite, SWT.MULTI | SWT.BORDER | SWT.WRAP | SWT.V_SCROLL | SWT.READ_ONLY);
	StringBuilder stringBuilder = new StringBuilder();
	
	if(extraComponentList != null && extraComponentList.size() > 0){
		stringBuilder.append(Messages.REPLAY_EXTRA_COMPONENTS + "\n");
		extraComponentList.forEach(componentName -> { stringBuilder.append(extraCompcount + ". " + componentName + "\n");
			extraCompcount++;
		});
	}
	
	if(missedComponentList != null && missedComponentList.size() > 0 && !missedComponentList.isEmpty()){
		stringBuilder.append(Messages.REPLAY_MISSING_COMPONENTS + "\n");
		missedComponentList.forEach(componentName -> { stringBuilder.append(missedCompcount + "." + componentName + "\n");
			missedCompcount++;
		});
	}
	
	text.setText(stringBuilder.toString());
	
	scrolledComposite.setContent(text);
	
	
	return super.createDialogArea(parent);
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:39,代码来源:ViewExecutionHistoryComponentDialog.java

示例14: createScrolledComposite

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private Composite createScrolledComposite(Composite parent) {
	// create scrollbars for this parent when needed
	final ScrolledComposite sc1 = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
	sc1.setLayoutData(new GridData(GridData.FILL_BOTH));
	Composite composite = createComposite(sc1, 1);
	sc1.setContent(composite);

	// not calling setSize for composite will result in a blank composite,
	// so calling it here initially
	// setSize actually needs to be called after all controls are created,
	// so scrolledComposite
	// has correct minSize
	setSize(composite);
	return composite;
}
 
开发者ID:angelozerr,项目名称:angular-eclipse,代码行数:16,代码来源:AngularGlobalPreferencesPage.java

示例15: setupCanvas

import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private void setupCanvas() {
    imageScrolledComposite = new ScrolledComposite(shell, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
    imageScrolledComposite.setLayout(new GridLayout());
    imageScrolledComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
    imageScrolledComposite.setExpandVertical(true);
    imageScrolledComposite.setExpandHorizontal(true);
    canvas = new Canvas(imageScrolledComposite, SWT.NONE);
    imageScrolledComposite.setMinSize(image.getBounds().width, image.getBounds().height);
    imageScrolledComposite.setContent(canvas);

    setupCanvasListeners();
}
 
开发者ID:kamil-karkus,项目名称:EasySnap,代码行数:13,代码来源:ImageCaptureTool.java


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