use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class TaskReferencePropertiesEditionPartForm method createOutgoingTransitionsReferencesTable.
/**
*/
protected Composite createOutgoingTransitionsReferencesTable(FormToolkit widgetFactory, Composite parent) {
this.outgoingTransitions = new ReferencesTable(getDescription(GraalViewsRepository.TaskReference.Properties.outgoingTransitions, GraalMessages.TaskReferencePropertiesEditionPart_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.TaskReference.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(TaskReferencePropertiesEditionPartForm.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");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class CategoryPropertiesEditionPartImpl method createRequirementsAdvancedTableComposition.
/**
* @param container
*/
protected Composite createRequirementsAdvancedTableComposition(Composite parent) {
this.requirements = new ReferencesTable(getDescription(RequirementViewsRepository.Category.Category_.requirements, RequirementMessages.CategoryPropertiesEditionPart_RequirementsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
requirements.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
requirements.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
requirements.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
requirements.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.requirementsFilters) {
this.requirements.addFilter(filter);
}
this.requirements.setHelpText(propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Category.Category_.requirements, RequirementViewsRepository.SWT_KIND));
this.requirements.createControls(parent);
this.requirements.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData requirementsData = new GridData(GridData.FILL_HORIZONTAL);
requirementsData.horizontalSpan = 3;
this.requirements.setLayoutData(requirementsData);
this.requirements.setLowerBound(0);
this.requirements.setUpperBound(-1);
requirements.setID(RequirementViewsRepository.Category.Category_.requirements);
// $NON-NLS-1$
requirements.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class CategoryPropertiesEditionPartImpl method createSubCategoriesAdvancedTableComposition.
/**
* @param container
*/
protected Composite createSubCategoriesAdvancedTableComposition(Composite parent) {
this.subCategories = new ReferencesTable(getDescription(RequirementViewsRepository.Category.Category_.subCategories, RequirementMessages.CategoryPropertiesEditionPart_SubCategoriesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
subCategories.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
subCategories.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
subCategories.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
subCategories.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.subCategoriesFilters) {
this.subCategories.addFilter(filter);
}
this.subCategories.setHelpText(propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Category.Category_.subCategories, RequirementViewsRepository.SWT_KIND));
this.subCategories.createControls(parent);
this.subCategories.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData subCategoriesData = new GridData(GridData.FILL_HORIZONTAL);
subCategoriesData.horizontalSpan = 3;
this.subCategories.setLayoutData(subCategoriesData);
this.subCategories.setLowerBound(0);
this.subCategories.setUpperBound(-1);
subCategories.setID(RequirementViewsRepository.Category.Category_.subCategories);
// $NON-NLS-1$
subCategories.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class RepositoryPropertiesEditionPartImpl method createMainCategoriesAdvancedTableComposition.
/**
* @param container
*/
protected Composite createMainCategoriesAdvancedTableComposition(Composite parent) {
this.mainCategories = new ReferencesTable(getDescription(RequirementViewsRepository.Repository.Repository_.mainCategories, RequirementMessages.RepositoryPropertiesEditionPart_MainCategoriesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
mainCategories.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
mainCategories.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
mainCategories.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
mainCategories.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.mainCategoriesFilters) {
this.mainCategories.addFilter(filter);
}
this.mainCategories.setHelpText(propertiesEditionComponent.getHelpContent(RequirementViewsRepository.Repository.Repository_.mainCategories, RequirementViewsRepository.SWT_KIND));
this.mainCategories.createControls(parent);
this.mainCategories.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RepositoryPropertiesEditionPartImpl.this, RequirementViewsRepository.Repository.Repository_.mainCategories, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData mainCategoriesData = new GridData(GridData.FILL_HORIZONTAL);
mainCategoriesData.horizontalSpan = 3;
this.mainCategories.setLayoutData(mainCategoriesData);
this.mainCategories.setLowerBound(0);
this.mainCategories.setUpperBound(-1);
mainCategories.setID(RequirementViewsRepository.Repository.Repository_.mainCategories);
// $NON-NLS-1$
mainCategories.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartForm method createActionsTableComposition.
/**
* @param container
*/
protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.actions = new ReferencesTable(getDescription(FlowViewsRepository.InitialState.Properties.actions, FlowMessages.InitialStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
actions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
actions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
actions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.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.InitialState.Properties.actions, FlowViewsRepository.FORM_KIND));
this.actions.createControls(parent, widgetFactory);
this.actions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, FlowViewsRepository.InitialState.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.InitialState.Properties.actions);
// $NON-NLS-1$
actions.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
Aggregations