Search in sources :

Example 61 with ReferencesTable

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

the class ViewStatePropertiesEditionPartImpl method createViewContainersAdvancedReferencesTable.

/**
 */
protected Composite createViewContainersAdvancedReferencesTable(Composite parent) {
    String label = getDescription(FlowViewsRepository.ViewState.Properties.viewContainers, FlowMessages.ViewStatePropertiesEditionPart_ViewContainersLabel);
    this.viewContainers = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addViewContainers();
        }

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

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

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

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

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartImpl.this, FlowViewsRepository.ViewState.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.disableMove();
    viewContainers.setID(FlowViewsRepository.ViewState.Properties.viewContainers);
    // $NON-NLS-1$
    viewContainers.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 62 with ReferencesTable

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

the class ViewStatePropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(FlowViewsRepository.ViewState.Properties.actions, FlowMessages.ViewStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartImpl.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartImpl.this, FlowViewsRepository.ViewState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

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

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewStatePropertiesEditionPartImpl.this, FlowViewsRepository.ViewState.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(FlowViewsRepository.ViewState.Properties.actions, FlowViewsRepository.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(ViewStatePropertiesEditionPartImpl.this, FlowViewsRepository.ViewState.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(FlowViewsRepository.ViewState.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 63 with ReferencesTable

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

the class AsyncEventStatePropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(FlowViewsRepository.AsyncEventState.Properties.actions, FlowMessages.AsyncEventStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AsyncEventStatePropertiesEditionPartImpl.this, FlowViewsRepository.AsyncEventState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AsyncEventStatePropertiesEditionPartImpl.this, FlowViewsRepository.AsyncEventState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

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

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AsyncEventStatePropertiesEditionPartImpl.this, FlowViewsRepository.AsyncEventState.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(FlowViewsRepository.AsyncEventState.Properties.actions, FlowViewsRepository.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(AsyncEventStatePropertiesEditionPartImpl.this, FlowViewsRepository.AsyncEventState.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(FlowViewsRepository.AsyncEventState.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 64 with ReferencesTable

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

the class DecisionStatePropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(FlowViewsRepository.DecisionState.Properties.actions, FlowMessages.DecisionStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DecisionStatePropertiesEditionPartImpl.this, FlowViewsRepository.DecisionState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DecisionStatePropertiesEditionPartImpl.this, FlowViewsRepository.DecisionState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

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

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DecisionStatePropertiesEditionPartImpl.this, FlowViewsRepository.DecisionState.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(FlowViewsRepository.DecisionState.Properties.actions, FlowViewsRepository.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(DecisionStatePropertiesEditionPartImpl.this, FlowViewsRepository.DecisionState.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(FlowViewsRepository.DecisionState.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 65 with ReferencesTable

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

the class FinalStatePropertiesEditionPartImpl method createActionsAdvancedTableComposition.

/**
 * @param container
 */
protected Composite createActionsAdvancedTableComposition(Composite parent) {
    this.actions = new ReferencesTable(getDescription(FlowViewsRepository.FinalState.Properties.actions, FlowMessages.FinalStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, FlowViewsRepository.FinalState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
            actions.refresh();
        }

        public void handleEdit(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, FlowViewsRepository.FinalState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
            actions.refresh();
        }

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

        public void handleRemove(EObject element) {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(FinalStatePropertiesEditionPartImpl.this, FlowViewsRepository.FinalState.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(FlowViewsRepository.FinalState.Properties.actions, FlowViewsRepository.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(FinalStatePropertiesEditionPartImpl.this, FlowViewsRepository.FinalState.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(FlowViewsRepository.FinalState.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)

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