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


Java Composite.setLayoutData方法代码示例

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


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

示例1: OperationComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Create the composite.
 * 
 * @param parent
 * @param style
 */
public OperationComposite(FilterExpressionOperationDialog dialog, Composite parent, int style) {
	super(parent, style);
	this.dialog = dialog;
	this.operationDataStructure = dialog.getDataStructure().getOperationClassData();

	setLayout(new GridLayout(1, false));
	setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	Composite middleComposite = new Composite(this, SWT.BORDER);
	middleComposite.setLayout(new GridLayout(2, false));
	middleComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	inputFieldComposite = new InputFieldsComposite(middleComposite, dialog,SWT.NONE,
			operationDataStructure.getInputFields());
	GridData gd_composite2 = new GridData(SWT.FILL, SWT.FILL, false, true, 1, 1);
	gd_composite2.widthHint = 170;
	inputFieldComposite.setLayoutData(gd_composite2);

	createOtherFieldComposite(middleComposite);

	createExternalComposite();

	refresh();
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:31,代码来源:OperationComposite.java

示例2: main

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public static void main(String[] args) {
	Display display = new Display();
	Shell shell = new Shell(display);
	int formWidth = 750;
	int formHeight = 280;
	shell.setSize(formWidth, formHeight);
	GridLayout gridLayout = new GridLayout(1, true);
	gridLayout.makeColumnsEqualWidth = false;
	shell.setLayout(gridLayout);

	Composite composite = new Composite(shell, SWT.NONE);
	composite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

	DirBrowseComposite dirBrowseComposite2 = new DirBrowseComposite(composite);
	dirBrowseComposite2.pack();
	DirBrowseComposite dirBrowseComposite3 = new DirBrowseComposite(shell);
	dirBrowseComposite3.pack();
	shell.pack();
	shell.open();

	while (!shell.isDisposed()) {
		if (!display.readAndDispatch())
			display.sleep();
	}
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:26,代码来源:DirecroryBrowseLayoutEx.java

示例3: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
    Composite composite = (Composite) super.createDialogArea(parent);

    Composite c = new Composite(composite, SWT.NONE);
    c.setLayout(new GridLayout(2,  false));
    c.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    btnPattern = new Button(c, SWT.CHECK);
    btnPattern.setText(Messages.IgnoredObjectPrefListEditor_pattern);

    btnContent = new Button(c, SWT.CHECK);
    btnContent.setText(Messages.IgnoredObjectPrefListEditor_contents);

    if (objInitial != null) {
        btnPattern.setSelection(objInitial.isRegular());
        btnContent.setSelection(objInitial.isIgnoreContent());
    }

    return composite;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:22,代码来源:IgnoredObjectPrefListEditor.java

示例4: createNewMode

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createNewMode() {
	btnCreateNewRadioButton = new Button(this, SWT.RADIO);
	btnCreateNewRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnCreateNewRadioButton.setText(MessageUtil.getString("standalone_mode"));
	btnCreateNewRadioButton.setSelection(false);
	btnCreateNewRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnCreateNewRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_CHECKBOX);

	Composite composite = new Composite(this, SWT.NONE);
	composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	composite.setLayout(new GridLayout(12, false));

	lblNewClassnameLabel = new Label(composite, SWT.NONE);
	lblNewClassnameLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, false, false, 4, 1));
	lblNewClassnameLabel.setText("Class name");
	lblNewClassnameLabel.setEnabled(false);

	newClassnameText = new Text(composite, SWT.BORDER);
	newClassnameText.setEnabled(false);
	newClassnameText.addModifyListener(new ModifyListener() {
		public void modifyText(ModifyEvent event) {
			listener.handleEvent(null);
		}
	});
	newClassnameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	newClassnameText.setEnabled(false);
	newClassnameText.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_NEWCLASS_TEXT);
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:37,代码来源:GeneratorChoiceComposite.java

示例5: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea ( final Composite parent )
{
    getShell ().setText ( "Time and date" );

    final Composite base = (Composite)super.createDialogArea ( parent );

    final Composite wrapper = new Composite ( base, SWT.NONE );
    wrapper.setLayout ( new GridLayout ( 2, false ) );
    wrapper.setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    final Label label = new Label ( wrapper, SWT.NONE );
    label.setText ( "Input:" );

    this.input = new Text ( wrapper, SWT.BORDER );

    this.input.addModifyListener ( new ModifyListener () {

        @Override
        public void modifyText ( final ModifyEvent e )
        {
            update ();
        }
    } );
    this.input.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false ) );

    this.resultControl = new Label ( wrapper, SWT.NONE );
    this.resultControl.setLayoutData ( new GridData ( SWT.FILL, SWT.CENTER, true, false, 2, 1 ) );

    if ( this.time != null )
    {
        this.input.setText ( String.format ( "%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS.%1$tL", this.time ) );
    }

    return base;
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:37,代码来源:DateTimeDialog.java

示例6: createNewFilePage

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected WizardNewFileCreationPage createNewFilePage() {
	return new NewFilePage(getSelection(), fileExt) {
		@Override
		public void createControl(Composite parent) {
			super.createControl(parent);
			Composite area = (Composite) getControl();
			Composite container = new Composite(area, SWT.NONE);
			container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			GridLayout layout = new GridLayout(2, false);
			container.setLayout(layout);
			Label lbtOcciServerUrl = new Label(container, SWT.NONE);
			lbtOcciServerUrl.setText(Messages.NewConfigurationWizard_OcciServerUrl);
			final Text txtOcciServerUrl = new Text(container, SWT.BORDER);
			txtOcciServerUrl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
			txtOcciServerUrl.addModifyListener(new ModifyListener() {
				public void modifyText(ModifyEvent e) {
					occiServerUrl = txtOcciServerUrl.getText();
					setPageComplete(validatePage());
				}
			});
		}

		@Override
		protected boolean validatePage() {
			// TODO add error messages
			return super.validatePage() && !Strings.isNullOrEmpty(occiServerUrl);
		}
	};
}
 
开发者ID:occiware,项目名称:OCCI-Studio,代码行数:31,代码来源:NewConfigurationWizard.java

示例7: addErrorLabel

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void addErrorLabel(Composite container) {
	Composite composite_3 = new Composite(container, SWT.NONE);
	composite_3.setLayout(new ColumnLayout());
	ColumnLayoutData cld_composite_3 = new ColumnLayoutData();
	cld_composite_3.heightHint = 72;
	composite_3.setLayoutData(cld_composite_3);

	lblPropertyError = new Label(composite_3, SWT.NONE);
	ColumnLayoutData cld_lblPropertyError = new ColumnLayoutData();
	cld_lblPropertyError.heightHint = 24;
	lblPropertyError.setLayoutData(cld_lblPropertyError);
	lblPropertyError.setVisible(false);
	lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:15,代码来源:HiveOutputFieldDialog.java

示例8: addLocalRemoteRemoveFiles

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * @param control
 * @return
 */
public Control addLocalRemoteRemoveFiles(Composite control){
	Composite composite = new Composite(control, SWT.BORDER);
	composite.setLayout(new GridLayout(3, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	ftpWidgetUtility.createLabel(composite, "Local Path");
	Text localPathTxt = (Text) ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	Button localPathBrwsBtn = new Button(composite, SWT.NONE);
	localPathBrwsBtn.setText("...");
	selectionListener(localPathBrwsBtn, localPathTxt);
	
	ftpWidgetUtility.createLabel(composite, "File Name");
	ftpWidgetUtility.createText(composite, "", SWT.BORDER);
	
	
	return composite;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:23,代码来源:FTPOperationConfigUtility.java

示例9: addErrorLabel

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void addErrorLabel(Composite container) {
	Composite composite_3 = new Composite(container, SWT.NONE);
	composite_3.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 1, 1));
	composite_3.setLayout(new ColumnLayout());

	lblPropertyError = new Label(composite_3, SWT.NONE);
	lblPropertyError.setVisible(false);
	lblPropertyError.setForeground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 255, 0, 0));
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:10,代码来源:SecondaryColumnKeysDialog.java

示例10: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
public void createControl(Composite parent) {
	initializeDialogUnits(parent);
	// top level group
	Composite topLevel = new Composite(parent, SWT.NONE);
	topLevel.setLayout(new GridLayout());
	topLevel.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL
			| GridData.HORIZONTAL_ALIGN_FILL));
	topLevel.setFont(parent.getFont());
	PlatformUI.getWorkbench().getHelpSystem()
			.setHelp(topLevel, IIDEHelpContextIds.NEW_FILE_WIZARD_PAGE);

	// resource and container group
	resourceGroup = new ResourceAndContainerGroup(topLevel, this,
			getNewFileLabel(),
			IDEWorkbenchMessages.WizardNewFileCreationPage_file, false,
			SIZING_CONTAINER_GROUP_HEIGHT);
	resourceGroup.setAllowExistingResources(initialAllowExistingResources);
	initialPopulateContainerNameField();
	createAdvancedControls(topLevel);
	if (initialFileName != null) {
		resourceGroup.setResource(initialFileName);
	}
	if (initialFileExtension != null) {
		resourceGroup.setResourceExtension(initialFileExtension);
	}
	validatePage();
	// Show description on opening
	setErrorMessage(null);
	setMessage(null);
	setControl(topLevel);
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:35,代码来源:WizardNewFileCreationPage.java

示例11: createInputFieldTable

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createInputFieldTable(Composite container) {

		Composite inputFieldComposite = new Composite(container, SWT.NONE);
		
		inputFieldComposite.setLayout(new GridLayout(2, false));

		GridData gd_composite = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1);
		gd_composite.widthHint = 250;
		inputFieldComposite.setLayoutData(gd_composite);
		new Label(inputFieldComposite, SWT.NONE);
		inputFieldTableViewer = new TableViewer(inputFieldComposite, SWT.BORDER | SWT.FULL_SELECTION | SWT.MULTI);

		setTableViewer(inputFieldTableViewer, inputFieldComposite, new String[] { Messages.OPERATIONAL_SYSTEM_FIELD },
				new TableContentProvider());
		inputFieldTableViewer.getTable().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
		DragDropUtility.INSTANCE.applyDragFromTableViewer(inputFieldTableViewer.getTable());
		inputFieldTableViewer.setLabelProvider(new InputFieldColumnLabelProvider());
		inputFieldTableViewer.setInput(transformMapping.getInputFields());
        addControlListener(inputFieldTableViewer.getTable());
        inputFieldTableViewer.getControl().addMouseListener(new MouseAdapter() {
			@Override
			public void mouseUp(MouseEvent e) 
			{
				TransformMappingFeatureUtility.INSTANCE.highlightInputAndOutputFields(null,
						inputFieldTableViewer,outputFieldViewer,null,null);
  			}
		});
	}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:29,代码来源:TransformDialog.java

示例12: createContents

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createContents(Composite parent) {
	Composite composite=new Composite(parent,SWT.NONE);
	GridData gridData=new GridData();
	gridData.grabExcessHorizontalSpace=true;
	gridData.grabExcessVerticalSpace=true;
	composite.setLayoutData(gridData);
	composite.setLayout(new GridLayout(2,false));
	this.createBorderColorSelectorField(composite);
	this.createNodeImageConfigTable(composite);
	return composite;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:13,代码来源:DesignerPreferencePage.java

示例13: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl(final Composite parent) {
	this.visualisationParent = parent;
	parent.setLayoutData(new GridData(GridData.FILL_BOTH));
	parent.setLayout(layout);
	createToolbarActions();
	createMenu();
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:9,代码来源:PerformanceView.java

示例14: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	container.getShell().setText(windowLabel);
	
	int CONST_HEIGHT = 181;
			
			Shell shell = container.getShell();
			
			shell.addControlListener(new ControlAdapter() {
	            @Override
	            public void controlResized(ControlEvent e) {
	                Rectangle rect = shell.getBounds();
	                if(rect.width != CONST_HEIGHT) {
	                    shell.setBounds(rect.x, rect.y, rect.width, CONST_HEIGHT);
	                }
	            }
	        });
	
	Composite composite = new Composite(container, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	chunkSize = new Label(composite, SWT.NONE);
	GridData gd_chunkSize = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gd_chunkSize.widthHint = 150;
	chunkSize.setLayoutData(gd_chunkSize);
	chunkSize.setText(Messages.DB_CHUNK_SIZE);

	chunkSizeTextBox = new Text(composite, SWT.BORDER);
	GridData gd_chunkSizeTextBox = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_chunkSizeTextBox.horizontalIndent = 10;
	chunkSizeTextBox.setLayoutData(gd_chunkSizeTextBox);
	chunkSizeTextBox.setText(CHUNK_SIZE_VALUE);
	controlDecoration = WidgetUtility.addDecorator(chunkSizeTextBox, Messages.DB_NUMERIC_PARAMETERZIATION_ERROR);
	controlDecoration.hide();
	controlDecoration.setMarginWidth(2);

	additionalDBParametersLabel = new Label(composite, SWT.NONE);
	GridData gd_additionalDBParametersLabel = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
	gd_additionalDBParametersLabel.widthHint = 150;
	additionalDBParametersLabel.setLayoutData(gd_additionalDBParametersLabel);
	additionalDBParametersLabel.setText(Messages.ADDITIONAL_DB_PARAMETERS);

	additionalParameterTextBox = new Text(composite, SWT.BORDER);
	additionalParameterControlDecoration = WidgetUtility.addDecorator(additionalParameterTextBox,Messages.ADDITIONAL_PARAMETER_ERROR_DECORATOR_MESSAGE);
	additionalParameterControlDecoration.setMarginWidth(2);
	additionalParameterControlDecoration.hide();
	GridData gd_additionalParameter = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_additionalParameter.horizontalIndent = 10;
	additionalParameterTextBox.setLayoutData(gd_additionalParameter);

	addListenerToChunkSize(chunkSizeTextBox);
	
	addModifyListener(chunkSizeTextBox);
	addModifyListener(additionalParameterTextBox);

	addListenerToAdditionalParameter(additionalParameterTextBox);

	addOutputAdditionalParameterValues();
	
	getShell().setMinimumSize(getInitialSize());
	
	setPropertyHelpText();

	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:74,代码来源:OutputAdditionalParametersDialog.java

示例15: createInputFieldExpandBarSection

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createInputFieldExpandBarSection(Composite composite) {
	Composite composite_1 = new Composite(composite, SWT.NONE);
	GridLayout gl_composite_1 = new GridLayout(1, false);
	gl_composite_1.horizontalSpacing = 0;
	gl_composite_1.verticalSpacing = 0;
	gl_composite_1.marginWidth = 0;
	gl_composite_1.marginHeight = 0;
	composite_1.setLayout(gl_composite_1);
	GridData gd_composite_1 = new GridData(SWT.FILL, SWT.FILL, false, true,
			1, 1);
	gd_composite_1.widthHint = 276;
	composite_1.setLayoutData(gd_composite_1);
	composite_1.setBounds(0, 0, 64, 64);

	final ScrolledComposite scrolledComposite_1 = new ScrolledComposite(
			composite_1, SWT.BORDER | SWT.V_SCROLL );
	scrolledComposite_1.setLayoutData(new GridData(SWT.FILL, SWT.FILL,
			true, true, 1, 1));
	scrolledComposite_1.setExpandHorizontal(true);
	scrolledComposite_1.setExpandVertical(true);
	
	Composite composite_7 = new Composite(scrolledComposite_1, SWT.NONE);
	composite_7.setLayout(new GridLayout(1, false));

	final ExpandBar expandBar = new ExpandBar(composite_7, SWT.H_SCROLL);
	expandBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1,
			1));
	
	expandBar.setBackground(CustomColorRegistry.INSTANCE.getColorFromRegistry( 240, 240, 240));
	populateInputFieldExpandBarSection(expandBar);

	expandBar.getItem(0).setExpanded(true);

	scrolledComposite_1.setContent(composite_7);
	scrolledComposite_1.setMinSize(composite_7.computeSize(SWT.DEFAULT,
			SWT.DEFAULT));
	
	
	composite_7.addControlListener(new ControlAdapter() {
		@Override
		public void controlResized(ControlEvent e) {
			
			for(ExpandItem expandItem:expandBar.getItems()){
				((TableColumn)expandItem.getData("TableColumn")).setWidth(scrolledComposite_1.getSize().x);
			}
		}
	});
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:49,代码来源:JoinMapDialog.java


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