Search in sources :

Example 91 with ReferencesTableListener

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

the class ViewContainerPropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(ViewViewsRepository.ViewContainer.Properties.actions, ViewMessages.ViewContainerPropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
            actions.refresh();
        }

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
            actions.refresh();
        }

        public void navigateTo(EObject element) {
        }
    });
    for (ViewerFilter filter : this.actionsFilters) {
        this.actions.addFilter(filter);
    }
    this.actions.setHelpText(propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainer.Properties.actions, ViewViewsRepository.SWT_KIND));
    this.actions.createControls(parent);
    this.actions.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData actionsData = new GridData(GridData.FILL_HORIZONTAL);
    actionsData.horizontalSpan = 3;
    this.actions.setLayoutData(actionsData);
    this.actions.setLowerBound(0);
    this.actions.setUpperBound(-1);
    actions.setID(ViewViewsRepository.ViewContainer.Properties.actions);
    // $NON-NLS-1$
    actions.setEEFType("eef::AdvancedTableComposition");
    // End of user code
    return parent;
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable) EObject(org.eclipse.emf.ecore.EObject) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) ReferencesTableListener(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)

Example 92 with ReferencesTableListener

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

the class ViewContainerPropertiesEditionPartImpl method createEventsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createEventsAdvancedTableComposition(Composite parent) {
    this.events = new ReferencesTable(getDescription(ViewViewsRepository.ViewContainer.Properties.events, ViewMessages.ViewContainerPropertiesEditionPart_EventsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            events.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            events.refresh();
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
            events.refresh();
        }

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
            events.refresh();
        }

        public void navigateTo(EObject element) {
        }
    });
    for (ViewerFilter filter : this.eventsFilters) {
        this.events.addFilter(filter);
    }
    this.events.setHelpText(propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainer.Properties.events, ViewViewsRepository.SWT_KIND));
    this.events.createControls(parent);
    this.events.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerPropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainer.Properties.events, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData eventsData = new GridData(GridData.FILL_HORIZONTAL);
    eventsData.horizontalSpan = 3;
    this.events.setLayoutData(eventsData);
    this.events.setLowerBound(0);
    this.events.setUpperBound(-1);
    events.setID(ViewViewsRepository.ViewContainer.Properties.events);
    // $NON-NLS-1$
    events.setEEFType("eef::AdvancedTableComposition");
    // End of user code
    return parent;
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable) EObject(org.eclipse.emf.ecore.EObject) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) ReferencesTableListener(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)

Example 93 with ReferencesTableListener

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

the class ViewContainerReferencePropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(ViewViewsRepository.ViewContainerReference.Properties.actions, ViewMessages.ViewContainerReferencePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
            actions.refresh();
        }

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
            actions.refresh();
        }

        public void navigateTo(EObject element) {
        }
    });
    for (ViewerFilter filter : this.actionsFilters) {
        this.actions.addFilter(filter);
    }
    this.actions.setHelpText(propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.actions, ViewViewsRepository.SWT_KIND));
    this.actions.createControls(parent);
    this.actions.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.actions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData actionsData = new GridData(GridData.FILL_HORIZONTAL);
    actionsData.horizontalSpan = 3;
    this.actions.setLayoutData(actionsData);
    this.actions.setLowerBound(0);
    this.actions.setUpperBound(-1);
    actions.setID(ViewViewsRepository.ViewContainerReference.Properties.actions);
    // $NON-NLS-1$
    actions.setEEFType("eef::AdvancedTableComposition");
    // End of user code
    return parent;
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable) EObject(org.eclipse.emf.ecore.EObject) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) ReferencesTableListener(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)

Example 94 with ReferencesTableListener

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

the class ViewContainerReferencePropertiesEditionPartImpl method createEventsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createEventsAdvancedTableComposition(Composite parent) {
    this.events = new ReferencesTable(getDescription(ViewViewsRepository.ViewContainerReference.Properties.events, ViewMessages.ViewContainerReferencePropertiesEditionPart_EventsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            events.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            events.refresh();
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
            events.refresh();
        }

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.events, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
            events.refresh();
        }

        public void navigateTo(EObject element) {
        }
    });
    for (ViewerFilter filter : this.eventsFilters) {
        this.events.addFilter(filter);
    }
    this.events.setHelpText(propertiesEditionComponent.getHelpContent(ViewViewsRepository.ViewContainerReference.Properties.events, ViewViewsRepository.SWT_KIND));
    this.events.createControls(parent);
    this.events.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewContainerReferencePropertiesEditionPartImpl.this, ViewViewsRepository.ViewContainerReference.Properties.events, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData eventsData = new GridData(GridData.FILL_HORIZONTAL);
    eventsData.horizontalSpan = 3;
    this.events.setLayoutData(eventsData);
    this.events.setLowerBound(0);
    this.events.setUpperBound(-1);
    events.setID(ViewViewsRepository.ViewContainerReference.Properties.events);
    // $NON-NLS-1$
    events.setEEFType("eef::AdvancedTableComposition");
    // End of user code
    return parent;
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable) EObject(org.eclipse.emf.ecore.EObject) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) ReferencesTableListener(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)

Example 95 with ReferencesTableListener

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

the class CinematicRootPropertiesEditionPartImpl method createSubPackagesAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createSubPackagesAdvancedTableComposition(Composite parent) {
    this.subPackages = new ReferencesTable(getDescription(CinematicViewsRepository.CinematicRoot.Properties.subPackages, CinematicMessages.CinematicRootPropertiesEditionPart_SubPackagesLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartImpl.this, CinematicViewsRepository.CinematicRoot.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            subPackages.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartImpl.this, CinematicViewsRepository.CinematicRoot.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            subPackages.refresh();
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartImpl.this, CinematicViewsRepository.CinematicRoot.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
            subPackages.refresh();
        }

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartImpl.this, CinematicViewsRepository.CinematicRoot.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
            subPackages.refresh();
        }

        public void navigateTo(EObject element) {
        }
    });
    for (ViewerFilter filter : this.subPackagesFilters) {
        this.subPackages.addFilter(filter);
    }
    this.subPackages.setHelpText(propertiesEditionComponent.getHelpContent(CinematicViewsRepository.CinematicRoot.Properties.subPackages, CinematicViewsRepository.SWT_KIND));
    this.subPackages.createControls(parent);
    this.subPackages.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartImpl.this, CinematicViewsRepository.CinematicRoot.Properties.subPackages, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData subPackagesData = new GridData(GridData.FILL_HORIZONTAL);
    subPackagesData.horizontalSpan = 3;
    this.subPackages.setLayoutData(subPackagesData);
    this.subPackages.setLowerBound(0);
    this.subPackages.setUpperBound(-1);
    subPackages.setID(CinematicViewsRepository.CinematicRoot.Properties.subPackages);
    // $NON-NLS-1$
    subPackages.setEEFType("eef::AdvancedTableComposition");
    // End of user code
    return parent;
}
Also used : ViewerFilter(org.eclipse.jface.viewers.ViewerFilter) ReferencesTable(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable) EObject(org.eclipse.emf.ecore.EObject) SelectionAdapter(org.eclipse.swt.events.SelectionAdapter) SelectionEvent(org.eclipse.swt.events.SelectionEvent) GridData(org.eclipse.swt.layout.GridData) IPropertiesEditionEvent(org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent) PropertiesEditionEvent(org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent) ReferencesTableListener(org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)

Aggregations

EObject (org.eclipse.emf.ecore.EObject)162 IPropertiesEditionEvent (org.eclipse.emf.eef.runtime.api.notify.IPropertiesEditionEvent)162 PropertiesEditionEvent (org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent)162 ReferencesTable (org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable)162 ReferencesTableListener (org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener)162 SelectionAdapter (org.eclipse.swt.events.SelectionAdapter)162 SelectionEvent (org.eclipse.swt.events.SelectionEvent)162 GridData (org.eclipse.swt.layout.GridData)162 ViewerFilter (org.eclipse.jface.viewers.ViewerFilter)84 FlatReferencesTable (org.eclipse.emf.eef.runtime.ui.widgets.FlatReferencesTable)6