use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.
the class InterDSMLinkPropertiesEditionPartForm method createTargetFlatComboViewer.
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*/
protected Composite createTargetFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, EnvironmentViewsRepository.InterDSMLink.Properties.target, EnvironmentMessages.InterDSMLinkPropertiesEditionPart_TargetLabel);
target = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EnvironmentViewsRepository.InterDSMLink.Properties.target, EnvironmentViewsRepository.FORM_KIND));
widgetFactory.adapt(target);
target.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
GridData targetData = new GridData(GridData.FILL_HORIZONTAL);
target.setLayoutData(targetData);
target.addSelectionChangedListener(new ISelectionChangedListener() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
public void selectionChanged(SelectionChangedEvent event) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InterDSMLinkPropertiesEditionPartForm.this, EnvironmentViewsRepository.InterDSMLink.Properties.target, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getTarget()));
}
});
target.setID(EnvironmentViewsRepository.InterDSMLink.Properties.target);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.InterDSMLink.Properties.target, EnvironmentViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.
the class OppositePropertiesEditionPartForm method createReferencedTypeFlatComboViewer.
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*/
protected Composite createReferencedTypeFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, EnvironmentViewsRepository.Opposite.Properties.referencedType, EnvironmentMessages.OppositePropertiesEditionPart_ReferencedTypeLabel);
referencedType = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(EnvironmentViewsRepository.Opposite.Properties.referencedType, EnvironmentViewsRepository.FORM_KIND));
widgetFactory.adapt(referencedType);
referencedType.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
GridData referencedTypeData = new GridData(GridData.FILL_HORIZONTAL);
referencedType.setLayoutData(referencedTypeData);
referencedType.addSelectionChangedListener(new ISelectionChangedListener() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
public void selectionChanged(SelectionChangedEvent event) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OppositePropertiesEditionPartForm.this, EnvironmentViewsRepository.Opposite.Properties.referencedType, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getReferencedType()));
}
});
referencedType.setID(EnvironmentViewsRepository.Opposite.Properties.referencedType);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(EnvironmentViewsRepository.Opposite.Properties.referencedType, EnvironmentViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.
the class TransitionPropertiesEditionPartForm method createFromFlatComboViewer.
/**
* @param parent the parent composite
* @param widgetFactory factory to use to instanciante widget of the form
*/
protected Composite createFromFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
createDescription(parent, StatemachineViewsRepository.Transition.Properties.from, StatemachineMessages.TransitionPropertiesEditionPart_FromLabel);
from = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(StatemachineViewsRepository.Transition.Properties.from, StatemachineViewsRepository.FORM_KIND));
widgetFactory.adapt(from);
from.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
GridData fromData = new GridData(GridData.FILL_HORIZONTAL);
from.setLayoutData(fromData);
from.addSelectionChangedListener(new ISelectionChangedListener() {
/**
* {@inheritDoc}
*
* @see org.eclipse.jface.viewers.ISelectionChangedListener#selectionChanged(org.eclipse.jface.viewers.SelectionChangedEvent)
*/
public void selectionChanged(SelectionChangedEvent event) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TransitionPropertiesEditionPartForm.this, StatemachineViewsRepository.Transition.Properties.from, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getFrom()));
}
});
from.setID(StatemachineViewsRepository.Transition.Properties.from);
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.Transition.Properties.from, StatemachineViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.
the class TransitionPropertiesEditionPartImpl method createToFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createToFlatComboViewer(Composite parent) {
createDescription(parent, StatemachineViewsRepository.Transition.Properties.to, StatemachineMessages.TransitionPropertiesEditionPart_ToLabel);
to = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(StatemachineViewsRepository.Transition.Properties.to, StatemachineViewsRepository.SWT_KIND));
to.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
to.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TransitionPropertiesEditionPartImpl.this, StatemachineViewsRepository.Transition.Properties.to, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getTo()));
}
});
GridData toData = new GridData(GridData.FILL_HORIZONTAL);
to.setLayoutData(toData);
to.setID(StatemachineViewsRepository.Transition.Properties.to);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.Transition.Properties.to, StatemachineViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.
the class TaskReferencePropertiesEditionPartImpl method createTaskFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createTaskFlatComboViewer(Composite parent) {
createDescription(parent, GraalViewsRepository.TaskReference.Properties.task, GraalMessages.TaskReferencePropertiesEditionPart_TaskLabel);
task = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(GraalViewsRepository.TaskReference.Properties.task, GraalViewsRepository.SWT_KIND));
task.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
task.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaskReferencePropertiesEditionPartImpl.this, GraalViewsRepository.TaskReference.Properties.task, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getTask()));
}
});
GridData taskData = new GridData(GridData.FILL_HORIZONTAL);
task.setLayoutData(taskData);
task.setID(GraalViewsRepository.TaskReference.Properties.task);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(GraalViewsRepository.TaskReference.Properties.task, GraalViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
Aggregations