Search in sources :

Example 16 with ReferencesTableListener

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

the class TaskReferencePropertiesEditionPartImpl method createIncomingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createIncomingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.TaskReference.Properties.incomingTransitions, GraalMessages.TaskReferencePropertiesEditionPart_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.TaskReference.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(TaskReferencePropertiesEditionPartImpl.this, GraalViewsRepository.TaskReference.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.TaskReference.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 17 with ReferencesTableListener

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

the class TaskReferencePropertiesEditionPartImpl method createOutgoingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createOutgoingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.TaskReference.Properties.outgoingTransitions, GraalMessages.TaskReferencePropertiesEditionPart_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.TaskReference.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(TaskReferencePropertiesEditionPartImpl.this, GraalViewsRepository.TaskReference.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.TaskReference.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 18 with ReferencesTableListener

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

the class UseCasePropertiesEditionPartImpl method createNamespacesAdvancedReferencesTable.

/**
 */
protected Composite createNamespacesAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.UseCase.Properties.namespaces, GraalMessages.UseCasePropertiesEditionPart_NamespacesLabel);
    this.namespaces = new ReferencesTable(label, new ReferencesTableListener() {

        public void handleAdd() {
            addNamespaces();
        }

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

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

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

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

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

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

the class FinalNodePropertiesEditionPartImpl method createIncomingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createIncomingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.FinalNode.Properties.incomingTransitions, GraalMessages.FinalNodePropertiesEditionPart_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.FinalNode.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(FinalNodePropertiesEditionPartImpl.this, GraalViewsRepository.FinalNode.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.FinalNode.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 20 with ReferencesTableListener

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

the class InitialNodePropertiesEditionPartImpl method createOutgoingTransitionsAdvancedReferencesTable.

/**
 */
protected Composite createOutgoingTransitionsAdvancedReferencesTable(Composite parent) {
    String label = getDescription(GraalViewsRepository.InitialNode.Properties.outgoingTransitions, GraalMessages.InitialNodePropertiesEditionPart_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.InitialNode.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(InitialNodePropertiesEditionPartImpl.this, GraalViewsRepository.InitialNode.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.InitialNode.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)

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