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


Java Combo.setLayoutData方法代碼示例

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


在下文中一共展示了Combo.setLayoutData方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createCombo

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * This method initializes combo	
 *
 */
private void createCombo() {
	GridData gridData1 = new GridData();
	gridData1.grabExcessHorizontalSpace = false;
	gridData1.verticalAlignment = GridData.CENTER;
	gridData1.horizontalAlignment = GridData.BEGINNING;
	combo = new Combo(this, SWT.NONE);
	combo.setLayoutData(gridData1);
	combo.add("*");
	combo.add("Screen class");
	combo.add("Criteria");
	combo.add("Extraction rule");
	combo.add("Sheet");
	combo.add("Transaction");
	combo.add("Statement");
	combo.add("Sequence");
	combo.add("Step");
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:22,代碼來源:DatabaseObjectFindDialogComposite.java

示例2: createDialogArea

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
protected Control createDialogArea(Composite parent) {
	Composite area = (Composite) super.createDialogArea(parent);
	Composite container = new Composite(area, SWT.NONE);
	RowLayout layout = new RowLayout(SWT.HORIZONTAL);
	container.setLayout(layout);
	// container.setLayoutData(new GridData(GridData.FILL_BOTH));

	// TitleArea中的Title
	setTitle("屬性文件更新");

	// TitleArea中的Message
	setMessage("輸入正確的url地址,以更新文件。\n可提示的屬性數量會根據當前項目存在的jar包,對已有屬性增加或者刪除!");

	Label label = new Label(container, SWT.NONE);
	label.setText("項目URL: ");
	combo = new Combo(container, SWT.DROP_DOWN);
	String[] items = new String[getUrlMap().size()];
	getUrlMap().values().toArray(items);
	combo.setItems(items);
	String url = getPreferedUrl(projectName);
	combo.setText(url);
	combo.setLayoutData(new RowData(400, 30));

	return area;
}
 
開發者ID:bsteker,項目名稱:bdf2,代碼行數:26,代碼來源:UpdateDialog.java

示例3: createStandardCombo

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
public void createStandardCombo ( final Composite parent, final String attributeName, final String label, final String[] items, final IObservableMap data, final Object valueType )
{
    this.toolkit.createLabel ( parent, label + ":" );

    final Combo combo = new Combo ( parent, SWT.DROP_DOWN );

    combo.setItems ( items );
    this.toolkit.adapt ( combo );

    final GridData gd = new GridData ( GridData.FILL, GridData.BEGINNING, true, true );
    gd.horizontalSpan = 2;
    combo.setLayoutData ( gd );

    final IObservableValue value = Observables.observeMapEntry ( data, attributeName, valueType );
    this.dbc.bindValue ( WidgetProperties.text ().observe ( combo ), value );
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:17,代碼來源:ConfigurationFormToolkit.java

示例4: createAssertionCombo

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
private Combo createAssertionCombo ()
{
    final Combo c = new Combo ( this, SWT.NONE );
    for ( final Assertion assertion : Assertion.values () )
    {
        c.add ( assertion.toString () );
    }
    c.select ( 0 );
    c.addSelectionListener ( new SelectionAdapter () {
        @Override
        public void widgetSelected ( final SelectionEvent e )
        {
            AssertionComposite.this.orCondition.updateFilter ();
        }
    } );
    final RowData rowData = new RowData ();
    rowData.width = 75;
    c.setLayoutData ( rowData );
    return c;
}
 
開發者ID:eclipse,項目名稱:neoscada,代碼行數:21,代碼來源:FilterAdvancedComposite.java

示例5: attachWidget

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override
public void attachWidget(Composite container) {
	defaultELTcom = new Combo(container, SWT.READ_ONLY);
	defaultELTcom.setItems(defaultTextMessage);
	// defaultELTcom.setItems(new String[] {"True","false"});
	// defaultELTcom.setItem(0, "");
	GridData gd_defaultELTTextBox = new GridData(SWT.FILL, SWT.FILL, false,
			false, 1, 1);
	
	if (OSValidator.isMac()) {
		gd_defaultELTTextBox.horizontalIndent=-1;
		gd_defaultELTTextBox.widthHint = textboxWidth+50;
	}
	else{
		gd_defaultELTTextBox.horizontalIndent=1;
		gd_defaultELTTextBox.widthHint = textboxWidth;
	}
		
	defaultELTcom.setLayoutData(gd_defaultELTTextBox);

	widget = defaultELTcom;
}
 
開發者ID:capitalone,項目名稱:Hydrograph,代碼行數:23,代碼來源:ELTDefaultCombo.java

示例6: addVersionSection

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
private void addVersionSection(Composite parent) {
	Composite composite = createDefaultComposite(parent);

	// Label for owner field
	Label ownerLabel = new Label(composite, SWT.NONE);
	ownerLabel.setText(LEGACY_VERSION_TITLE);

	// Owner text field
	legacyVersionCombo = new Combo(composite, SWT.DROP_DOWN | SWT.READ_ONLY);
	GridData gd = new GridData();
	gd.widthHint = convertWidthInCharsToPixels(COMBO_FIELD_WIDTH);
	legacyVersionCombo.setLayoutData(gd);

	// Populate owner text field
	LegacyVersion legacyVersion = LegacyManager.getInstance().getVersion(getProject());
	legacyVersionCombo.setItems(LegacyVersion.names());
	legacyVersionCombo.setText(legacyVersion.name());
}
 
開發者ID:sebez,項目名稱:vertigo-chroma-kspplugin,代碼行數:19,代碼來源:VertigoPropertyPage.java

示例7: createChildMandatoryGroup

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
private void createChildMandatoryGroup(Group parent) {
	GridLayout gridLayout = new GridLayout();
	gridLayout.marginHeight = 10;

	GridData gridData = new GridData();
	gridData.grabExcessHorizontalSpace = true;
	gridData.horizontalAlignment = GridData.FILL;

	Group group = new Group(parent, SWT.NONE);
	group.setLayout(gridLayout);
	group.setLayoutData(gridData);
	group.setText(ResourceString.getResourceString("label.mandatory"));

	childCardinalityCombo = new Combo(group, SWT.NONE);
	childCardinalityCombo.setLayoutData(gridData);

	childCardinalityCombo.setVisibleItemCount(5);

	childCardinalityCombo.add("1..n");
	childCardinalityCombo.add("0..n");
	childCardinalityCombo.add(Relation.CHILD_CARDINALITY_1);
	childCardinalityCombo.add("0..1");
}
 
開發者ID:kozake,項目名稱:ermaster-k,代碼行數:24,代碼來源:RelationDialog.java

示例8: addComboBox

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
protected Combo addComboBox(Composite parent, String label, String key, String[] values, String[] valueLabels,
		int indent) {

	GridData gd = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
	gd.horizontalIndent = indent;

	Label labelControl = new Label(parent, SWT.LEFT | SWT.WRAP);
	labelControl.setText(label);
	labelControl.setLayoutData(gd);

	Combo comboBox = new Combo(parent, SWT.READ_ONLY);
	SwtUtil.setDefaultVisibleItemCount(comboBox);
	comboBox.setItems(valueLabels);
	gd = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
	gd.horizontalSpan = 2;
	comboBox.setLayoutData(gd);
	comboBox.addSelectionListener(fComboFieldListener);
	fComboFields.put(comboBox, key);
	return comboBox;
}
 
開發者ID:grosenberg,項目名稱:fluentmark,代碼行數:21,代碼來源:AbstractConfigurationBlock.java

示例9: createNgCommandComponent

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
private void createNgCommandComponent(Composite parent) {
	Group group = new Group(parent, SWT.NONE);
	String groupName = AngularCLIMessages.AngularCLILaunchTabGroup_MainTab_command;
	group.setText(groupName);
	GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	GridData gridData = new GridData(GridData.FILL_HORIZONTAL);
	group.setLayout(layout);
	group.setLayoutData(gridData);

	commandsCommbo = new Combo(group, SWT.BORDER | SWT.H_SCROLL);
	GridData data = new GridData(GridData.FILL_HORIZONTAL);
	data.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
	commandsCommbo.setLayoutData(data);
	String[] items = new String[NgCommand.values().length];
	for (int i = 0; i < items.length; i++) {
		items[i] = NgCommand.values()[i].getAliases()[0];
	}
	commandsCommbo.setItems(items);
	commandsCommbo.addModifyListener(fListener);
}
 
開發者ID:angelozerr,項目名稱:angular-eclipse,代碼行數:22,代碼來源:MainTab.java

示例10: createDialogArea

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(2, false));
	
	label = new Label(container, 0);
	label.setText(labelTxt);
	
	combo = new Combo(container, SWT.READ_ONLY | SWT.DROP_DOWN);
	combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
	
	combo.addModifyListener(new ModifyListener() {
		@Override public void modifyText(ModifyEvent e) {
			updateVals();
		}
	});
	combo.setItems(items);
	combo.select(0);
	
	updateVals();
	
	container.pack();

	return container;
}
 
開發者ID:Transkribus,項目名稱:TranskribusSwtGui,代碼行數:29,代碼來源:ComboInputDialog.java

示例11: createDestinationGroup

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * Create the export destination specification widgets
 */
protected void createDestinationGroup(Composite parent) {
	Font font = parent.getFont();
	// destination specification group
	Composite destinationSelectionGroup = new Composite(parent, SWT.NONE);
	GridLayout layout = new GridLayout();
	layout.numColumns = 3;
	destinationSelectionGroup.setLayout(layout);
	destinationSelectionGroup.setLayoutData(new GridData(
			GridData.HORIZONTAL_ALIGN_FILL | GridData.VERTICAL_ALIGN_FILL));
	destinationSelectionGroup.setFont(font);

	Label destinationLabel = new Label(destinationSelectionGroup, SWT.NONE);
	destinationLabel.setText(getTargetLabel());
	destinationLabel.setFont(font);

	// destination name entry field
	destinationNameField = new Combo(destinationSelectionGroup, SWT.SINGLE
			| SWT.BORDER);
	destinationNameField.addListener(SWT.Modify, this);
	destinationNameField.addListener(SWT.Selection, this);
	GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL
			| GridData.GRAB_HORIZONTAL);
	data.widthHint = SIZING_TEXT_FIELD_WIDTH;
	destinationNameField.setLayoutData(data);
	destinationNameField.setFont(font);

	// destination browse button
	destinationBrowseButton = new Button(destinationSelectionGroup,
			SWT.PUSH);
	destinationBrowseButton.setText(N4ExportMessages.DataTransfer_browse);
	destinationBrowseButton.addListener(SWT.Selection, this);
	destinationBrowseButton.setFont(font);
	setButtonLayoutData(destinationBrowseButton);

	// new Label(parent, SWT.NONE); // vertical spacer
}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:40,代碼來源:AbstractExportToSingleFileWizardPage.java

示例12: createOptionsGroupButtons

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {

	npmGoalSelection = new Combo(optionsGroup, SWT.SINGLE
			| SWT.BORDER);
	npmGoalSelection.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
	npmGoalSelection.addListener(SWT.Modify, this);
	npmGoalSelection.addListener(SWT.Selection, this);

}
 
開發者ID:eclipse,項目名稱:n4js,代碼行數:11,代碼來源:NpmToolRunnerPage.java

示例13: createLanguageLayout

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/***
 * Create the Field where user enters the language used to execute
 * 
 * @param parent container composite
 * @param font used font
 * @return the created composite containing the fields
 */
public Composite createLanguageLayout(Composite parent, Font font) {
	// Language
	createTextLabelLayout(parent, "Melange languages");
	_languageCombo = new Combo(parent, SWT.NONE);
	_languageCombo.setLayoutData(createStandardLayout());

	List<String> languagesNames = MelangeHelper.getAllLanguages();
	String[] empty = {};
	_languageCombo.setItems(languagesNames.toArray(empty));
	_languageCombo.addSelectionListener(new SelectionAdapter() {
		@Override
		public void widgetSelected(SelectionEvent e) {
			//String selection = _languageCombo.getText();
			//List<String> modelTypeNames = MelangeHelper.getModelTypes(selection);
			updateLaunchConfigurationDialog();
		}
	});
	createTextLabelLayout(parent, "");

	createTextLabelLayout(parent, "Melange resource adapter query");
	_melangeQueryText = new Text(parent, SWT.SINGLE | SWT.BORDER);
	_melangeQueryText.setLayoutData(createStandardLayout());
	_melangeQueryText.setFont(font);
	_melangeQueryText.setEditable(false);
	createTextLabelLayout(parent, "");
	
	return parent;
}
 
開發者ID:eclipse,項目名稱:gemoc-studio-modeldebugging,代碼行數:36,代碼來源:LaunchConfigurationMainTab.java

示例14: createType_trigger_combo

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
/**
 * This method initializes type_trigger_combo	
 *
 */
private void createType_trigger_combo() {
	GridData gridData2 = new GridData();
	gridData2.horizontalAlignment = GridData.FILL;
	gridData2.verticalAlignment = GridData.CENTER;
	gridData2.grabExcessHorizontalSpace = true;
	type_trigger_combo = new Combo(commun_trigger, SWT.READ_ONLY);
	type_trigger_combo.setItems(customTriggers);
	type_trigger_combo
			.addModifyListener(new org.eclipse.swt.events.ModifyListener() {
				public void modifyText(org.eclipse.swt.events.ModifyEvent e) {
					int index = type_trigger_combo.getSelectionIndex();
					if (index == -1) {
						type_trigger_combo.select(0);
					} else if (index != last_index && custom_triggers != null) {
						help_label.setText(custom_triggers[index].getHelp());
				        stackLayout.topControl = custom_triggers[index];
				        custom_trigger.layout();
						last_index = index;
						if (index == 5) { // NoWait case
							timeout_label.setVisible(false);
							timeout_spin.setVisible(false);
						} else {
							timeout_label.setVisible(true);
							timeout_spin.setVisible(true);
						}
					}
				}
			});
	type_trigger_combo.setLayoutData(gridData2);
}
 
開發者ID:convertigo,項目名稱:convertigo-eclipse,代碼行數:35,代碼來源:HttpTriggerEditorComposite.java

示例15: createAppendMode

import org.eclipse.swt.widgets.Combo; //導入方法依賴的package包/類
private void createAppendMode() {
	btnAppendRadioButton = new Button(this, SWT.RADIO);
	btnAppendRadioButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 12, 1));
	btnAppendRadioButton.setText(MessageUtil.getString("append_mode"));
	btnAppendRadioButton.setSelection(true);
	btnAppendRadioButton.addListener(SWT.Selection, new Listener() {
		public void handleEvent(Event e) {
			switch (e.type) {
			case SWT.Selection:
				updateUI();
				break;
			}
		}
	});
	btnAppendRadioButton.setData(GW4E_CONVERSION_WIDGET_ID, GW4E_APPEND_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));

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

	comboAppendClassnameViewer = new AncestorViewer(composite);
	comboAppendClassnameViewer.initialize(GW4E_CONVERSION_COMBO_ANCESTOR_EXTEND_TEST, false);
	comboAppendClassnameViewer.getCombo().setData(GW4E_CONVERSION_WIDGET_ID, GW4E_CONVERSION_COMBO_ANCESTOR_APPEND_TEST);
	Combo combo = comboAppendClassnameViewer.getCombo();
	combo.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 8, 1));
	combo.setEnabled(true);
}
 
開發者ID:gw4e,項目名稱:gw4e.project,代碼行數:32,代碼來源:GeneratorChoiceComposite.java


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