Search in sources :

Example 46 with ReferencesTable

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

the class AbortNodePropertiesEditionPartImpl method createOutgoingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createOutgoingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.AbortNode.Properties.outgoingTransitions, GraalMessages.AbortNodePropertiesEditionPart_OutgoingTransitionsLabel);
    this.outgoingTransitions = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addOutgoingTransitions();
        }

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

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

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

        public void navigateTo(EObject element) {
        }
    });
    this.outgoingTransitions.setHelpText(propertiesEditionComponent.getHelpContent(GraalViewsRepository.AbortNode.Properties.outgoingTransitions, GraalViewsRepository.SWT_KIND));
    this.outgoingTransitions.createControls(parent);
    this.outgoingTransitions.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AbortNodePropertiesEditionPartImpl.this, GraalViewsRepository.AbortNode.Properties.outgoingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData outgoingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
    outgoingTransitionsData.horizontalSpan = 3;
    this.outgoingTransitions.setLayoutData(outgoingTransitionsData);
    this.outgoingTransitions.disableMove();
    outgoingTransitions.setID(GraalViewsRepository.AbortNode.Properties.outgoingTransitions);
    // $NON-NLS-1$
    outgoingTransitions.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 47 with ReferencesTable

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

the class ActorPropertiesEditionPartImpl method createSubActorsAdvancedReferencesTable.

/**
 */
protected Composite createSubActorsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.Actor.Properties.subActors, GraalMessages.ActorPropertiesEditionPart_SubActorsLabel);
    this.subActors = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addSubActors();
        }

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

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

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

        public void navigateTo(EObject element) {
        }
    });
    this.subActors.setHelpText(propertiesEditionComponent.getHelpContent(GraalViewsRepository.Actor.Properties.subActors, GraalViewsRepository.SWT_KIND));
    this.subActors.createControls(parent);
    this.subActors.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ActorPropertiesEditionPartImpl.this, GraalViewsRepository.Actor.Properties.subActors, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData subActorsData = new GridData(GridData.FILL_HORIZONTAL);
    subActorsData.horizontalSpan = 3;
    this.subActors.setLayoutData(subActorsData);
    this.subActors.disableMove();
    subActors.setID(GraalViewsRepository.Actor.Properties.subActors);
    // $NON-NLS-1$
    subActors.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 48 with ReferencesTable

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

the class AppliActionPropertiesEditionPartImpl method createIncomingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createIncomingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.AppliAction.Properties.incomingTransitions, GraalMessages.AppliActionPropertiesEditionPart_IncomingTransitionsLabel);
    this.incomingTransitions = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addIncomingTransitions();
        }

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

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

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

        public void navigateTo(EObject element) {
        }
    });
    this.incomingTransitions.setHelpText(propertiesEditionComponent.getHelpContent(GraalViewsRepository.AppliAction.Properties.incomingTransitions, GraalViewsRepository.SWT_KIND));
    this.incomingTransitions.createControls(parent);
    this.incomingTransitions.addSelectionListener(new SelectionAdapter() {

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AppliActionPropertiesEditionPartImpl.this, GraalViewsRepository.AppliAction.Properties.incomingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData incomingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
    incomingTransitionsData.horizontalSpan = 3;
    this.incomingTransitions.setLayoutData(incomingTransitionsData);
    this.incomingTransitions.disableMove();
    incomingTransitions.setID(GraalViewsRepository.AppliAction.Properties.incomingTransitions);
    // $NON-NLS-1$
    incomingTransitions.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 49 with ReferencesTable

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

the class OperatorPropertiesEditionPartForm method createOutgoingTransitionsReferencesTable.

/**
 */
protected Composite createOutgoingTransitionsReferencesTable(FormToolkit widgetFactory, Composite parent) {
    this.outgoingTransitions = new ReferencesTable(getDescription(GraalViewsRepository.Operator.Properties.outgoingTransitions, GraalMessages.OperatorPropertiesEditionPart_OutgoingTransitionsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            addOutgoingTransitions();
        }

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

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

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

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

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(OperatorPropertiesEditionPartForm.this, GraalViewsRepository.Operator.Properties.outgoingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData outgoingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
    outgoingTransitionsData.horizontalSpan = 3;
    this.outgoingTransitions.setLayoutData(outgoingTransitionsData);
    this.outgoingTransitions.disableMove();
    outgoingTransitions.setID(GraalViewsRepository.Operator.Properties.outgoingTransitions);
    // $NON-NLS-1$
    outgoingTransitions.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 50 with ReferencesTable

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

the class TaskPropertiesEditionPartForm method createActorsReferencesTable.

/**
 */
protected Composite createActorsReferencesTable(FormToolkit widgetFactory, Composite parent) {
    this.actors = new ReferencesTable(getDescription(GraalViewsRepository.Task.Properties.actors, GraalMessages.TaskPropertiesEditionPart_ActorsLabel), new ReferencesTableListener() {

        public void handleAdd() {
            addActors();
        }

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

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

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

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

        public void widgetSelected(SelectionEvent e) {
            if (e.item != null && e.item.getData() instanceof EObject) {
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(TaskPropertiesEditionPartForm.this, GraalViewsRepository.Task.Properties.actors, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
            }
        }
    });
    GridData actorsData = new GridData(GridData.FILL_HORIZONTAL);
    actorsData.horizontalSpan = 3;
    this.actors.setLayoutData(actorsData);
    this.actors.disableMove();
    actors.setID(GraalViewsRepository.Task.Properties.actors);
    // $NON-NLS-1$
    actors.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)

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