Search in sources :

Example 16 with EObjectFlatComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.

the class ViewContainerReferencePropertiesEditionPartImpl method createWidgetFlatComboViewer.

/**
 * @param parent the parent composite
 */
protected Composite createWidgetFlatComboViewer(Composite parent) {
    createDescription(parent, ViewViewsRepository.ViewContainerReference.Properties.widget, ViewMessages.ViewContainerReferencePropertiesEditionPart_WidgetLabel);
    widget = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.SWT_KIND));
    widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    widget.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.widget, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getWidget()));
        }
    });
    GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
    widget.setLayoutData(widgetData);
    widget.setID(ViewViewsRepository.ViewContainerReference.Properties.widget);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : EObjectFlatComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Example 17 with EObjectFlatComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.

the class ViewElementPropertiesEditionPartImpl method createTypeFlatComboViewer.

/**
 * @param parent the parent composite
 */
protected Composite createTypeFlatComboViewer(Composite parent) {
    createDescription(parent, ViewViewsRepository.ViewElement.Properties.type, ViewMessages.ViewElementPropertiesEditionPart_TypeLabel);
    type = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewElement.Properties.type, ViewViewsRepository.SWT_KIND));
    type.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    type.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewElementPropertiesEditionPartImpl.this, ViewViewsRepository.ViewElement.Properties.type, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getType()));
        }
    });
    GridData typeData = new GridData(GridData.FILL_HORIZONTAL);
    type.setLayoutData(typeData);
    type.setID(ViewViewsRepository.ViewElement.Properties.type);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewElement.Properties.type, ViewViewsRepository.SWT_KIND), null);
    // End of user code
    return parent;
}
Also used : EObjectFlatComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Example 18 with EObjectFlatComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.

the class ViewContainerPropertiesEditionPartForm method createWidgetFlatComboViewer.

/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 */
protected Composite createWidgetFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, ViewViewsRepository.ViewContainer.Properties.widget, ViewMessages.ViewContainerPropertiesEditionPart_WidgetLabel);
    widget = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainer.Properties.widget, ViewViewsRepository.FORM_KIND));
    widgetFactory.adapt(widget);
    widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
    widget.setLayoutData(widgetData);
    widget.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(ViewContainerPropertiesEditionPartForm.this, ViewViewsRepository.ViewContainer.Properties.widget, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getWidget()));
        }
    });
    widget.setID(ViewViewsRepository.ViewContainer.Properties.widget);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainer.Properties.widget, ViewViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : EObjectFlatComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Example 19 with EObjectFlatComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.

the class ViewContainerReferencePropertiesEditionPartForm method createViewContainerFlatComboViewer.

/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 */
protected Composite createViewContainerFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewMessages.ViewContainerReferencePropertiesEditionPart_ViewContainerLabel);
    viewContainer = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewViewsRepository.FORM_KIND));
    widgetFactory.adapt(viewContainer);
    viewContainer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData viewContainerData = new GridData(GridData.FILL_HORIZONTAL);
    viewContainer.setLayoutData(viewContainerData);
    viewContainer.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(ViewContainerReferencePropertiesEditionPartForm.this, ViewViewsRepository.ViewContainerReference.Properties.viewContainer, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getViewContainer()));
        }
    });
    viewContainer.setID(ViewViewsRepository.ViewContainerReference.Properties.viewContainer);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.viewContainer, ViewViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : EObjectFlatComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Example 20 with EObjectFlatComboViewer

use of org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer in project InformationSystem by ObeoNetwork.

the class ViewContainerReferencePropertiesEditionPartForm method createWidgetFlatComboViewer.

/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 */
protected Composite createWidgetFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, ViewViewsRepository.ViewContainerReference.Properties.widget, ViewMessages.ViewContainerReferencePropertiesEditionPart_WidgetLabel);
    widget = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.FORM_KIND));
    widgetFactory.adapt(widget);
    widget.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData widgetData = new GridData(GridData.FILL_HORIZONTAL);
    widget.setLayoutData(widgetData);
    widget.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(ViewContainerReferencePropertiesEditionPartForm.this, ViewViewsRepository.ViewContainerReference.Properties.widget, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getWidget()));
        }
    });
    widget.setID(ViewViewsRepository.ViewContainerReference.Properties.widget);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.widget, ViewViewsRepository.FORM_KIND), null);
    // End of user code
    return parent;
}
Also used : EObjectFlatComboViewer(org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) GridData(org.eclipse.swt.layout.GridData) AdapterFactoryLabelProvider(org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)

Aggregations

AdapterFactoryLabelProvider (org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider)60 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)60 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)60 EObjectFlatComboViewer (org.eclipse.emf.eef.runtime.ui.widgets.EObjectFlatComboViewer)60 ISelectionChangedListener (org.eclipse.jface.viewers.ISelectionChangedListener)60 SelectionChangedEvent (org.eclipse.jface.viewers.SelectionChangedEvent)60 GridData (org.eclipse.swt.layout.GridData)60