本文整理汇总了Java中org.eclipse.ui.forms.widgets.FormToolkit类的典型用法代码示例。如果您正苦于以下问题:Java FormToolkit类的具体用法?Java FormToolkit怎么用?Java FormToolkit使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FormToolkit类属于org.eclipse.ui.forms.widgets包,在下文中一共展示了FormToolkit类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence poissonStep = new BindingCompositionSequence(propertiesEditionComponent);
poissonStep
.addStep(MetamodelViewsRepository.Poisson.Properties.class)
.addStep(MetamodelViewsRepository.Poisson.Properties.interval);
composer = new PartComposer(poissonStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Poisson.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Poisson.Properties.interval) {
return createIntervalText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例2: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence cauchyStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = cauchyStep.addStep(MetamodelViewsRepository.Cauchy.Properties.class);
propertiesStep.addStep(MetamodelViewsRepository.Cauchy.Properties.location);
propertiesStep.addStep(MetamodelViewsRepository.Cauchy.Properties.scale);
composer = new PartComposer(cauchyStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Cauchy.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Cauchy.Properties.location) {
return createLocationText(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Cauchy.Properties.scale) {
return createScaleText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例3: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence studentsTStep = new BindingCompositionSequence(propertiesEditionComponent);
studentsTStep
.addStep(MetamodelViewsRepository.StudentsT.Properties.class)
.addStep(MetamodelViewsRepository.StudentsT.Properties.degreeOfFreedom);
composer = new PartComposer(studentsTStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.StudentsT.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.StudentsT.Properties.degreeOfFreedom) {
return createDegreeOfFreedomText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例4: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence weibullStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = weibullStep.addStep(MetamodelViewsRepository.Weibull.Properties.class);
propertiesStep.addStep(MetamodelViewsRepository.Weibull.Properties.shape);
propertiesStep.addStep(MetamodelViewsRepository.Weibull.Properties.scale);
composer = new PartComposer(weibullStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Weibull.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Weibull.Properties.shape) {
return createShapeText(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Weibull.Properties.scale) {
return createScaleText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例5: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence chiSquareStep = new BindingCompositionSequence(propertiesEditionComponent);
chiSquareStep
.addStep(MetamodelViewsRepository.ChiSquare.Properties.class)
.addStep(MetamodelViewsRepository.ChiSquare.Properties.degreeOfFreedom);
composer = new PartComposer(chiSquareStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.ChiSquare.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.ChiSquare.Properties.degreeOfFreedom) {
return createDegreeOfFreedomText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例6: 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());
}
});
}
示例7: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence binomialStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = binomialStep.addStep(MetamodelViewsRepository.Binomial.Properties.class);
propertiesStep.addStep(MetamodelViewsRepository.Binomial.Properties.nbrOfTrial);
propertiesStep.addStep(MetamodelViewsRepository.Binomial.Properties.probaOfSuccess);
composer = new PartComposer(binomialStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Binomial.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Binomial.Properties.nbrOfTrial) {
return createNbrOfTrialText(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Binomial.Properties.probaOfSuccess) {
return createProbaOfSuccessText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例8: createModelFormContent
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
@Override
protected void createModelFormContent(IManagedForm managedForm, Composite client) {
final ScrolledForm form = managedForm.getForm();
FormToolkit toolkit = managedForm.getToolkit();
_EditSection = createEditSection(form, client, toolkit);
GridData editSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_EditSection.setLayoutData(editSectionGridData);
_PropertiesSection = createPropertiesTableSection(form, client, toolkit);
GridData propertiesSectionGridData = new GridData(GridData.FILL_HORIZONTAL);
_PropertiesSection.setLayoutData(propertiesSectionGridData);
Table propertiesSectionTable = getPropertiesSectionTable();
initTableEdit(propertiesSectionTable, null, 1);
}
示例9: createContent
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
@Override
protected void createContent() {
FormToolkit toolkit = getToolkit();
_Text = toolkit.createText(this, "", SWT.BORDER | SWT.SINGLE);
_Text.setFont(JFaceResources.getTextFont());
FormData formData = new FormData();
formData.top = new FormAttachment(0, 0);
formData.left = new FormAttachment(0, 0);
formData.right = new FormAttachment(100, 0);
_Text.setLayoutData(formData);
_Text.addModifyListener(new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
setDirtyInternal(true);
}
});
}
示例10: createOutputSingleCompositionEditor
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*
*/
protected Composite createOutputSingleCompositionEditor(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, MetamodelViewsRepository.ConveyorBelt.Properties.output, MetamodelMessages.ConveyorBeltPropertiesEditionPart_OutputLabel);
//create widget
output = new SingleCompositionEditor(widgetFactory, parent, SWT.NONE);
GridData outputData = new GridData(GridData.FILL_HORIZONTAL);
output.setLayoutData(outputData);
output.addEditorListener(new SingleCompositionListener() {
public void edit() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConveyorBeltPropertiesEditionPartForm.this, MetamodelViewsRepository.ConveyorBelt.Properties.output, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, null));
output.refresh();
}
public void clear() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConveyorBeltPropertiesEditionPartForm.this, MetamodelViewsRepository.ConveyorBelt.Properties.output, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.UNSET, null, null));
output.refresh();
}
});
output.setID(MetamodelViewsRepository.ConveyorBelt.Properties.output);
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.ConveyorBelt.Properties.output, MetamodelViewsRepository.FORM_KIND), null); //$NON-NLS-1$
// Start of user code for createOutputSingleCompositionEditor
// End of user code
return parent;
}
示例11: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence geometricStep = new BindingCompositionSequence(propertiesEditionComponent);
geometricStep
.addStep(MetamodelViewsRepository.Geometric.Properties.class)
.addStep(MetamodelViewsRepository.Geometric.Properties.probaOfSuccess);
composer = new PartComposer(geometricStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Geometric.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Geometric.Properties.probaOfSuccess) {
return createProbaOfSuccessText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例12: createFormContent
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
@Override
protected void createFormContent(IManagedForm managedForm) {
FormToolkit toolkit=managedForm.getToolkit();
ScrolledForm form=managedForm.getForm();
form.setText("流程模版导出与部署");
ColumnLayout layout=new ColumnLayout();
layout.topMargin=0;
layout.bottomMargin=0;
layout.leftMargin=0;
layout.rightMargin=0;
layout.maxNumColumns=1;
layout.horizontalSpacing=5;
layout.verticalSpacing=5;
form.getBody().setLayout(layout);
this.createExportSection(toolkit, form);
this.createOnlineDeploymentSection(toolkit, form);
}
示例13: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence gaussianStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = gaussianStep.addStep(MetamodelViewsRepository.Gaussian.Properties.class);
propertiesStep.addStep(MetamodelViewsRepository.Gaussian.Properties.location);
propertiesStep.addStep(MetamodelViewsRepository.Gaussian.Properties.scale);
composer = new PartComposer(gaussianStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Gaussian.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Gaussian.Properties.location) {
return createLocationText(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Gaussian.Properties.scale) {
return createScaleText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例14: createControls
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
/**
* {@inheritDoc}
*
* @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
* createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
*
*/
public void createControls(final FormToolkit widgetFactory, Composite view) {
CompositionSequence betaStep = new BindingCompositionSequence(propertiesEditionComponent);
CompositionStep propertiesStep = betaStep.addStep(MetamodelViewsRepository.Beta.Properties.class);
propertiesStep.addStep(MetamodelViewsRepository.Beta.Properties.freedomDegreeA);
propertiesStep.addStep(MetamodelViewsRepository.Beta.Properties.freedomDegreeB);
composer = new PartComposer(betaStep) {
@Override
public Composite addToPart(Composite parent, Object key) {
if (key == MetamodelViewsRepository.Beta.Properties.class) {
return createPropertiesGroup(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Beta.Properties.freedomDegreeA) {
return createFreedomDegreeAText(widgetFactory, parent);
}
if (key == MetamodelViewsRepository.Beta.Properties.freedomDegreeB) {
return createFreedomDegreeBText(widgetFactory, parent);
}
return parent;
}
};
composer.compose(view);
}
示例15: createTableSection
import org.eclipse.ui.forms.widgets.FormToolkit; //导入依赖的package包/类
protected Section createTableSection(ScrolledForm form, Composite client, FormToolkit toolkit, String title,
Image image, int sectionStyle, int tableStyle, String[] columnTitles, int[] columnAlignments) {
Section section = createSection(form, client, toolkit, title, image, sectionStyle);
Table table = toolkit.createTable(section, tableStyle);
for (int i = 0; i < columnTitles.length; i++) {
TableColumn column = new TableColumn(table, SWT.NONE);
column.setText(columnTitles[i]);
column.setAlignment(columnAlignments[i]);
}
table.setHeaderVisible(true);
table.setLinesVisible(true);
section.setClient(table);
return section;
}