Search in sources :

Example 66 with ReferencesTable

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

the class FlowActionPropertiesEditionPartImpl method createCallsAdvancedReferencesTable.

/**
 */
protected Composite createCallsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(FlowViewsRepository.FlowAction.Properties.calls, FlowMessages.FlowActionPropertiesEditionPart_CallsLabel);
    this.calls = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addCalls();
        }

        public void handleEdit(EObject element) {
            editCalls(element);
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            moveCalls(element, oldIndex, newIndex);
        }

        public void handleRemove(EObject element) {
            removeFromCalls(element);
        }

        public void navigateTo(EObject element) {
        }
    });
    this.calls.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.FlowAction.Properties.calls, FlowViewsRepository.SWT_KIND));
    this.calls.createControls(parent);
    this.calls.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FlowActionPropertiesEditionPartImpl.this, FlowViewsRepository.FlowAction.Properties.calls, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData callsData = new GridData(GridData.FILL_HORIZONTAL);
    callsData.horizontalSpan = 3;
    this.calls.setLayoutData(callsData);
    this.calls.disableMove();
    calls.setID(FlowViewsRepository.FlowAction.Properties.calls);
    // $NON-NLS-1$
    calls.setEEFType("eef::AdvancedReferencesTable");
    return parent;
}
Also used : 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 67 with ReferencesTable

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

the class FlowActionPropertiesEditionPartImpl method createOperationsAdvancedReferencesTable.

/**
 */
protected Composite createOperationsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(FlowViewsRepository.FlowAction.Properties.operations, FlowMessages.FlowActionPropertiesEditionPart_OperationsLabel);
    this.operations = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addOperations();
        }

        public void handleEdit(EObject element) {
            editOperations(element);
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            moveOperations(element, oldIndex, newIndex);
        }

        public void handleRemove(EObject element) {
            removeFromOperations(element);
        }

        public void navigateTo(EObject element) {
        }
    });
    this.operations.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.FlowAction.Properties.operations, FlowViewsRepository.SWT_KIND));
    this.operations.createControls(parent);
    this.operations.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FlowActionPropertiesEditionPartImpl.this, FlowViewsRepository.FlowAction.Properties.operations, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData operationsData = new GridData(GridData.FILL_HORIZONTAL);
    operationsData.horizontalSpan = 3;
    this.operations.setLayoutData(operationsData);
    this.operations.disableMove();
    operations.setID(FlowViewsRepository.FlowAction.Properties.operations);
    // $NON-NLS-1$
    operations.setEEFType("eef::AdvancedReferencesTable");
    return parent;
}
Also used : 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 68 with ReferencesTable

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

the class FlowActionPropertiesEditionPartForm method createOperationsReferencesTable.

/**
 */
protected Composite createOperationsReferencesTable(FormToolkit widgetFactory, Composite parent) {
    this.operations = new ReferencesTable(getDescription(FlowViewsRepository.FlowAction.Properties.operations, FlowMessages.FlowActionPropertiesEditionPart_OperationsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            addOperations();
        }

        public void handleEdit(EObject element) {
            editOperations(element);
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            moveOperations(element, oldIndex, newIndex);
        }

        public void handleRemove(EObject element) {
            removeFromOperations(element);
        }

        public void navigateTo(EObject element) {
        }
    });
    this.operations.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.FlowAction.Properties.operations, FlowViewsRepository.FORM_KIND));
    this.operations.createControls(parent, widgetFactory);
    this.operations.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FlowActionPropertiesEditionPartForm.this, FlowViewsRepository.FlowAction.Properties.operations, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData operationsData = new GridData(GridData.FILL_HORIZONTAL);
    operationsData.horizontalSpan = 3;
    this.operations.setLayoutData(operationsData);
    this.operations.disableMove();
    operations.setID(FlowViewsRepository.FlowAction.Properties.operations);
    // $NON-NLS-1$
    operations.setEEFType("eef::AdvancedReferencesTable");
    // End of user code
    return parent;
}
Also used : 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 69 with ReferencesTable

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

the class FlowEventPropertiesEditionPartForm method createBindsReferencesTable.

/**
 */
protected Composite createBindsReferencesTable(FormToolkit widgetFactory, Composite parent) {
    this.binds = new ReferencesTable(getDescription(FlowViewsRepository.FlowEvent.Properties.binds, FlowMessages.FlowEventPropertiesEditionPart_BindsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            addBinds();
        }

        public void handleEdit(EObject element) {
            editBinds(element);
        }

        public void handleMove(EObject element, int oldIndex, int newIndex) {
            moveBinds(element, oldIndex, newIndex);
        }

        public void handleRemove(EObject element) {
            removeFromBinds(element);
        }

        public void navigateTo(EObject element) {
        }
    });
    this.binds.setHelpText(propertiesEditionComponent.getHelpContent(FlowViewsRepository.FlowEvent.Properties.binds, FlowViewsRepository.FORM_KIND));
    this.binds.createControls(parent, widgetFactory);
    this.binds.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FlowEventPropertiesEditionPartForm.this, FlowViewsRepository.FlowEvent.Properties.binds, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData bindsData = new GridData(GridData.FILL_HORIZONTAL);
    bindsData.horizontalSpan = 3;
    this.binds.setLayoutData(bindsData);
    this.binds.disableMove();
    binds.setID(FlowViewsRepository.FlowEvent.Properties.binds);
    // $NON-NLS-1$
    binds.setEEFType("eef::AdvancedReferencesTable");
    // End of user code
    return parent;
}
Also used : 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 70 with ReferencesTable

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

the class CinematicRootPropertiesEditionPartForm method createViewContainersTableComposition.

/**
 * @param container
 */
protected Composite createViewContainersTableComposition(FormToolkit widgetFactory, Composite parent) {
    this.viewContainers = new ReferencesTable(getDescription(CinematicViewsRepository.CinematicRoot.Properties.viewContainers, CinematicMessages.CinematicRootPropertiesEditionPart_ViewContainersLabel), new ReferencesTableListener() {

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

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

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

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

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

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CinematicRootPropertiesEditionPartForm.this, CinematicViewsRepository.CinematicRoot.Properties.viewContainers, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData viewContainersData = new GridData(GridData.FILL_HORIZONTAL);
    viewContainersData.horizontalSpan = 3;
    this.viewContainers.setLayoutData(viewContainersData);
    this.viewContainers.setLowerBound(0);
    this.viewContainers.setUpperBound(-1);
    viewContainers.setID(CinematicViewsRepository.CinematicRoot.Properties.viewContainers);
    // $NON-NLS-1$
    viewContainers.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