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


Java FormToolkit.createButton方法代码示例

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


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

示例1: createControl

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent, FormToolkit toolkit, AvroAttribute<Boolean> element, AvroContext context) {
	
	initialize(element, context);
	
	button = toolkit.createButton(parent, "", SWT.CHECK);	
	
	update();
	
	button.addSelectionListener(new SelectionAdapter() {			
		@Override
		public void widgetSelected(SelectionEvent e) {
			changeAttribute(getAttribute().getValue(), button.getSelection());
		}
	});
	
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:18,代码来源:BooleanAttributeControl.java

示例2: createOverflowCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createOverflowCheckbox(FormToolkit widgetFactory, Composite parent) {
	overflow = widgetFactory.createButton(parent, getDescription(MetamodelViewsRepository.Storage.Properties.overflow, MetamodelMessages.StoragePropertiesEditionPart_OverflowLabel), SWT.CHECK);
	overflow.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 	
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StoragePropertiesEditionPartForm.this, MetamodelViewsRepository.Storage.Properties.overflow, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(overflow.getSelection())));
		}

	});
	GridData overflowData = new GridData(GridData.FILL_HORIZONTAL);
	overflowData.horizontalSpan = 2;
	overflow.setLayoutData(overflowData);
	EditingUtils.setID(overflow, MetamodelViewsRepository.Storage.Properties.overflow);
	EditingUtils.setEEFtype(overflow, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.Storage.Properties.overflow, MetamodelViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createOverflowCheckbox

	// End of user code
	return parent;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:28,代码来源:StoragePropertiesEditionPartForm.java

示例3: initYesNoInfoBar

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
/**
 * Initializes the {@link InfoBar} with "Yes" and "No" {@link Button buttons}.
 * 
 * @param managedForm The {@link IManagedForm} instance.
 * @param yesListener The {@link SelectionListener} to handle the Yes button selection.
 */
protected void initYesNoInfoBar(IManagedForm managedForm, SelectionListener yesListener,
        SelectionListener noListener) {

    InfoBar infoBar = getInfoBar();

    FormToolkit toolkit = managedForm.getToolkit();

    Button yesButton = toolkit.createButton(infoBar, "Yes", SWT.PUSH);
    if (yesListener != null) {
        yesButton.addSelectionListener(yesListener);
    }

    Button noButton = toolkit.createButton(infoBar, "No", SWT.PUSH);
    if (noListener != null) {
        noButton.addSelectionListener(noListener);
    }

    FormData yesButtonFormData = new FormData();
    yesButtonFormData.top = new FormAttachment(0, 0);
    yesButtonFormData.right = new FormAttachment(noButton);
    yesButton.setLayoutData(yesButtonFormData);

    FormData noButtonFormData = new FormData();
    noButtonFormData.top = new FormAttachment(0, 0);
    noButtonFormData.right = new FormAttachment(100, 0);
    noButton.setLayoutData(noButtonFormData);

    FormData labelFormData = new FormData();
    labelFormData.top = new FormAttachment(yesButton, 0, SWT.CENTER);
    labelFormData.left = new FormAttachment(0, 0);
    infoBar.getLabel().setLayoutData(labelFormData);

}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:40,代码来源:DataModelFormPage.java

示例4: createAsRadioButtons

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected void createAsRadioButtons(Composite parent, FormToolkit toolkit) {
	
	T[] allValues = getAllValues();
	String[] valuesAsString = getValuesAsString(allValues);
	
	buttonsComposite = toolkit.createComposite(parent, SWT.NONE);
	buttonsComposite.setLayout(new GridLayout(valuesAsString.length, false));
	
	buttons = new Button[valuesAsString.length];
	
	for (int i = 0; i < valuesAsString.length; i++) {
		buttons[i] = toolkit.createButton(buttonsComposite, valuesAsString[i], SWT.RADIO);
		buttons[i].setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
	}
	
	update();				
	
	for (int i = 0; i < buttons.length; i++) {
		final int index = i;
		buttons[i].addSelectionListener(new SelectionAdapter() {
			@Override
			public void widgetSelected(SelectionEvent e) {
				T selectedValue = getSelectedValueFromRadioButtons(index);
				changeAttribute(getCurrentValue(), getNewValue(selectedValue));	
			}
		});
	}
	
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:30,代码来源:MultiChoiceAttributeControl.java

示例5: createIsProtectedCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsProtectedCheckbox(FormToolkit widgetFactory, Composite parent) {
	isProtected = widgetFactory.createButton(parent,
			getDescription(GrmViewsRepository.General.Properties.isProtected,
					GrmMessages.GeneralPropertiesEditionPart_IsProtectedLabel),
			SWT.CHECK);
	isProtected.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								GrmViewsRepository.General.Properties.isProtected, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isProtected.getSelection())));
		}

	});
	GridData isProtectedData = new GridData(GridData.FILL_HORIZONTAL);
	isProtectedData.horizontalSpan = 2;
	isProtected.setLayoutData(isProtectedData);
	EditingUtils.setID(isProtected, GrmViewsRepository.General.Properties.isProtected);
	EditingUtils.setEEFtype(isProtected, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(GrmViewsRepository.General.Properties.isProtected, GrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsProtectedCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:35,代码来源:GeneralPropertiesEditionPartForm.java

示例6: createIsActiveCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsActiveCheckbox(FormToolkit widgetFactory, Composite parent) {
	isActive = widgetFactory.createButton(parent, getDescription(GrmViewsRepository.General.Properties.isActive,
			GrmMessages.GeneralPropertiesEditionPart_IsActiveLabel), SWT.CHECK);
	isActive.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								GrmViewsRepository.General.Properties.isActive, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isActive.getSelection())));
		}

	});
	GridData isActiveData = new GridData(GridData.FILL_HORIZONTAL);
	isActiveData.horizontalSpan = 2;
	isActive.setLayoutData(isActiveData);
	EditingUtils.setID(isActive, GrmViewsRepository.General.Properties.isActive);
	EditingUtils.setEEFtype(isActive, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(GrmViewsRepository.General.Properties.isActive, GrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsActiveCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:GeneralPropertiesEditionPartForm.java

示例7: createIsBufferedCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsBufferedCheckbox(FormToolkit widgetFactory, Composite parent) {
	isBuffered = widgetFactory.createButton(parent, getDescription(SrmViewsRepository.General.Properties.isBuffered,
			SrmMessages.GeneralPropertiesEditionPart_IsBufferedLabel), SWT.CHECK);
	isBuffered.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								SrmViewsRepository.General.Properties.isBuffered, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isBuffered.getSelection())));
		}

	});
	GridData isBufferedData = new GridData(GridData.FILL_HORIZONTAL);
	isBufferedData.horizontalSpan = 2;
	isBuffered.setLayoutData(isBufferedData);
	EditingUtils.setID(isBuffered, SrmViewsRepository.General.Properties.isBuffered);
	EditingUtils.setEEFtype(isBuffered, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(SrmViewsRepository.General.Properties.isBuffered, SrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsBufferedCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:GeneralPropertiesEditionPartForm.java

示例8: createIsAtomicCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsAtomicCheckbox(FormToolkit widgetFactory, Composite parent) {
	isAtomic = widgetFactory.createButton(parent, getDescription(GqamViewsRepository.General.Properties.isAtomic,
			GqamMessages.GeneralPropertiesEditionPart_IsAtomicLabel), SWT.CHECK);
	isAtomic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								GqamViewsRepository.General.Properties.isAtomic, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isAtomic.getSelection())));
		}

	});
	GridData isAtomicData = new GridData(GridData.FILL_HORIZONTAL);
	isAtomicData.horizontalSpan = 2;
	isAtomic.setLayoutData(isAtomicData);
	EditingUtils.setID(isAtomic, GqamViewsRepository.General.Properties.isAtomic);
	EditingUtils.setEEFtype(isAtomic, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(GqamViewsRepository.General.Properties.isAtomic, GqamViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsAtomicCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:GeneralPropertiesEditionPartForm.java

示例9: createIsStaticCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsStaticCheckbox(FormToolkit widgetFactory, Composite parent) {
	isStatic = widgetFactory.createButton(parent, getDescription(HrmViewsRepository.General.Properties.isStatic,
			HrmMessages.GeneralPropertiesEditionPart_IsStaticLabel), SWT.CHECK);
	isStatic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								HrmViewsRepository.General.Properties.isStatic, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isStatic.getSelection())));
		}

	});
	GridData isStaticData = new GridData(GridData.FILL_HORIZONTAL);
	isStaticData.horizontalSpan = 2;
	isStatic.setLayoutData(isStaticData);
	EditingUtils.setID(isStatic, HrmViewsRepository.General.Properties.isStatic);
	EditingUtils.setEEFtype(isStatic, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(HrmViewsRepository.General.Properties.isStatic, HrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsStaticCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:GeneralPropertiesEditionPartForm.java

示例10: createIsSporadicCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
/**
 * @generated
 */

protected Composite createIsSporadicCheckbox(FormToolkit widgetFactory, Composite parent) {
	isSporadic = widgetFactory.createButton(parent, getDescription(AnalysisViewsRepository.TwcaEventModel.Properties.isSporadic, AnalysisMessages.TwcaEventModelPropertiesEditionPart_IsSporadicLabel), SWT.CHECK);
	isSporadic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 	@generated
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TwcaEventModelPropertiesEditionPartForm.this, AnalysisViewsRepository.TwcaEventModel.Properties.isSporadic, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isSporadic.getSelection())));
		}

	});
	GridData isSporadicData = new GridData(GridData.FILL_HORIZONTAL);
	isSporadicData.horizontalSpan = 2;
	isSporadic.setLayoutData(isSporadicData);
	EditingUtils.setID(isSporadic, AnalysisViewsRepository.TwcaEventModel.Properties.isSporadic);
	EditingUtils.setEEFtype(isSporadic, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(AnalysisViewsRepository.TwcaEventModel.Properties.isSporadic, AnalysisViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createIsSporadicCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:32,代码来源:TwcaEventModelPropertiesEditionPartForm.java

示例11: createIsPeriodicCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsPeriodicCheckbox(FormToolkit widgetFactory, Composite parent) {
	isPeriodic = widgetFactory.createButton(parent, getDescription(SrmViewsRepository.Timing.Properties.isPeriodic,
			SrmMessages.TimingPropertiesEditionPart_IsPeriodicLabel), SWT.CHECK);
	isPeriodic.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(TimingPropertiesEditionPartForm.this,
								SrmViewsRepository.Timing.Properties.isPeriodic, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isPeriodic.getSelection())));
		}

	});
	GridData isPeriodicData = new GridData(GridData.FILL_HORIZONTAL);
	isPeriodicData.horizontalSpan = 2;
	isPeriodic.setLayoutData(isPeriodicData);
	EditingUtils.setID(isPeriodic, SrmViewsRepository.Timing.Properties.isPeriodic);
	EditingUtils.setEEFtype(isPeriodic, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(SrmViewsRepository.Timing.Properties.isPeriodic, SrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsPeriodicCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:TimingPropertiesEditionPartForm.java

示例12: createIsPreemptableCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsPreemptableCheckbox(FormToolkit widgetFactory, Composite parent) {
	isPreemptable = widgetFactory.createButton(parent,
			getDescription(SrmViewsRepository.Timing.Properties.isPreemptable,
					SrmMessages.TimingPropertiesEditionPart_IsPreemptableLabel),
			SWT.CHECK);
	isPreemptable.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(TimingPropertiesEditionPartForm.this,
								SrmViewsRepository.Timing.Properties.isPreemptable, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isPreemptable.getSelection())));
		}

	});
	GridData isPreemptableData = new GridData(GridData.FILL_HORIZONTAL);
	isPreemptableData.horizontalSpan = 2;
	isPreemptable.setLayoutData(isPreemptableData);
	EditingUtils.setID(isPreemptable, SrmViewsRepository.Timing.Properties.isPreemptable);
	EditingUtils.setEEFtype(isPreemptable, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(
			SrmViewsRepository.Timing.Properties.isPreemptable, SrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsPreemptableCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:35,代码来源:TimingPropertiesEditionPartForm.java

示例13: createIsActiveCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsActiveCheckbox(FormToolkit widgetFactory, Composite parent) {
	isActive = widgetFactory.createButton(parent, getDescription(LibraryViewsRepository.General.Properties.isActive, LibraryMessages.GeneralPropertiesEditionPart_IsActiveLabel), SWT.CHECK);
	isActive.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 	
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this, LibraryViewsRepository.General.Properties.isActive, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isActive.getSelection())));
		}

	});
	GridData isActiveData = new GridData(GridData.FILL_HORIZONTAL);
	isActiveData.horizontalSpan = 2;
	isActive.setLayoutData(isActiveData);
	EditingUtils.setID(isActive, LibraryViewsRepository.General.Properties.isActive);
	EditingUtils.setEEFtype(isActive, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(LibraryViewsRepository.General.Properties.isActive, LibraryViewsRepository.FORM_KIND), null); //$NON-NLS-1$
	// Start of user code for createIsActiveCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:28,代码来源:GeneralPropertiesEditionPartForm.java

示例14: createIsMaskableCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsMaskableCheckbox(FormToolkit widgetFactory, Composite parent) {
	isMaskable = widgetFactory.createButton(parent, getDescription(SrmViewsRepository.Other.Properties.isMaskable,
			SrmMessages.OtherPropertiesEditionPart_IsMaskableLabel), SWT.CHECK);
	isMaskable.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(OtherPropertiesEditionPartForm.this,
								SrmViewsRepository.Other.Properties.isMaskable, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isMaskable.getSelection())));
		}

	});
	GridData isMaskableData = new GridData(GridData.FILL_HORIZONTAL);
	isMaskableData.horizontalSpan = 2;
	isMaskable.setLayoutData(isMaskableData);
	EditingUtils.setID(isMaskable, SrmViewsRepository.Other.Properties.isMaskable);
	EditingUtils.setEEFtype(isMaskable, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
			.getHelpContent(SrmViewsRepository.Other.Properties.isMaskable, SrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsMaskableCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:33,代码来源:OtherPropertiesEditionPartForm.java

示例15: createIsNonVolatileCheckbox

import org.eclipse.ui.forms.widgets.FormToolkit; //导入方法依赖的package包/类
protected Composite createIsNonVolatileCheckbox(FormToolkit widgetFactory, Composite parent) {
	isNonVolatile = widgetFactory.createButton(parent,
			getDescription(HrmViewsRepository.General.Properties.isNonVolatile,
					HrmMessages.GeneralPropertiesEditionPart_IsNonVolatileLabel),
			SWT.CHECK);
	isNonVolatile.addSelectionListener(new SelectionAdapter() {

		/**
		 * {@inheritDoc}
		 *
		 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
		 * 
		 */
		public void widgetSelected(SelectionEvent e) {
			if (propertiesEditionComponent != null)
				propertiesEditionComponent
						.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
								HrmViewsRepository.General.Properties.isNonVolatile, PropertiesEditionEvent.COMMIT,
								PropertiesEditionEvent.SET, null, new Boolean(isNonVolatile.getSelection())));
		}

	});
	GridData isNonVolatileData = new GridData(GridData.FILL_HORIZONTAL);
	isNonVolatileData.horizontalSpan = 2;
	isNonVolatile.setLayoutData(isNonVolatileData);
	EditingUtils.setID(isNonVolatile, HrmViewsRepository.General.Properties.isNonVolatile);
	EditingUtils.setEEFtype(isNonVolatile, "eef::Checkbox"); //$NON-NLS-1$
	FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(
			HrmViewsRepository.General.Properties.isNonVolatile, HrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
	// Start of user code for createIsNonVolatileCheckbox

	// End of user code
	return parent;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:35,代码来源:GeneralPropertiesEditionPartForm.java


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