Search in sources :

Example 1 with EObjectFlatComboViewer

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

the class ForeignKeyElementPropertiesEditionPartImpl method createFKColumnFlatComboViewer.

/**
 * @param parent the parent composite
 */
protected Composite createFKColumnFlatComboViewer(Composite parent) {
    createDescription(parent, DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseMessages.ForeignKeyElementPropertiesEditionPart_FKColumnLabel);
    fKColumn = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseViewsRepository.SWT_KIND));
    fKColumn.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    fKColumn.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeyElementPropertiesEditionPartImpl.this, DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getFKColumn()));
        }
    });
    GridData fKColumnData = new GridData(GridData.FILL_HORIZONTAL);
    fKColumn.setLayoutData(fKColumnData);
    fKColumn.setID(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseViewsRepository.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 2 with EObjectFlatComboViewer

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

the class IndexElementPropertiesEditionPartImpl method createColumnFlatComboViewer.

/**
 * @param parent the parent composite
 */
protected Composite createColumnFlatComboViewer(Composite parent) {
    createDescription(parent, DatabaseViewsRepository.IndexElement.Properties.column, DatabaseMessages.IndexElementPropertiesEditionPart_ColumnLabel);
    column = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.IndexElement.Properties.column, DatabaseViewsRepository.SWT_KIND));
    column.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    column.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(IndexElementPropertiesEditionPartImpl.this, DatabaseViewsRepository.IndexElement.Properties.column, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getColumn()));
        }
    });
    GridData columnData = new GridData(GridData.FILL_HORIZONTAL);
    column.setLayoutData(columnData);
    column.setID(DatabaseViewsRepository.IndexElement.Properties.column);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.IndexElement.Properties.column, DatabaseViewsRepository.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 3 with EObjectFlatComboViewer

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

the class ColumnPropertiesEditionPartImpl method createSequenceFlatComboViewer.

/**
 * @param parent the parent composite
 */
protected Composite createSequenceFlatComboViewer(Composite parent) {
    createDescription(parent, DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseMessages.ColumnPropertiesEditionPart_SequenceLabel);
    sequence = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseViewsRepository.SWT_KIND));
    sequence.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    sequence.addSelectionChangedListener(new ISelectionChangedListener() {

        public void selectionChanged(SelectionChangedEvent event) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ColumnPropertiesEditionPartImpl.this, DatabaseViewsRepository.Column.Properties.Sequence.sequence_, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getSequence()));
        }
    });
    GridData sequenceData = new GridData(GridData.FILL_HORIZONTAL);
    sequence.setLayoutData(sequenceData);
    sequence.setID(DatabaseViewsRepository.Column.Properties.Sequence.sequence_);
    // $NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseViewsRepository.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 4 with EObjectFlatComboViewer

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

the class ForeignKeyElementPropertiesEditionPartForm method createFKColumnFlatComboViewer.

/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 */
protected Composite createFKColumnFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseMessages.ForeignKeyElementPropertiesEditionPart_FKColumnLabel);
    fKColumn = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseViewsRepository.FORM_KIND));
    widgetFactory.adapt(fKColumn);
    fKColumn.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData fKColumnData = new GridData(GridData.FILL_HORIZONTAL);
    fKColumn.setLayoutData(fKColumnData);
    fKColumn.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(ForeignKeyElementPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getFKColumn()));
        }
    });
    fKColumn.setID(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.ForeignKeyElement.Properties.fKColumn, DatabaseViewsRepository.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 5 with EObjectFlatComboViewer

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

the class ForeignKeyElementPropertiesEditionPartForm method createPKColumnFlatComboViewer.

/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 */
protected Composite createPKColumnFlatComboViewer(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn, DatabaseMessages.ForeignKeyElementPropertiesEditionPart_PKColumnLabel);
    pKColumn = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn, DatabaseViewsRepository.FORM_KIND));
    widgetFactory.adapt(pKColumn);
    pKColumn.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
    GridData pKColumnData = new GridData(GridData.FILL_HORIZONTAL);
    pKColumn.setLayoutData(pKColumnData);
    pKColumn.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(ForeignKeyElementPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, getPKColumn()));
        }
    });
    pKColumn.setID(DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn);
    // $NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.ForeignKeyElement.Properties.pKColumn, DatabaseViewsRepository.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