use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class Package_PropertiesEditionPartImpl method createSubPackagesAdvancedTableComposition.
/**
* @param container
*/
protected Composite createSubPackagesAdvancedTableComposition(Composite parent) {
this.subPackages = new ReferencesTable(getDescription(CinematicViewsRepository.Package_.Properties.subPackages, CinematicMessages.Package_PropertiesEditionPart_SubPackagesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Package_PropertiesEditionPartImpl.this, CinematicViewsRepository.Package_.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
subPackages.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Package_PropertiesEditionPartImpl.this, CinematicViewsRepository.Package_.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
subPackages.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Package_PropertiesEditionPartImpl.this, CinematicViewsRepository.Package_.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
subPackages.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Package_PropertiesEditionPartImpl.this, CinematicViewsRepository.Package_.Properties.subPackages, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
subPackages.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.subPackagesFilters) {
this.subPackages.addFilter(filter);
}
this.subPackages.setHelpText(propertiesEditionComponent.getHelpContent(CinematicViewsRepository.Package_.Properties.subPackages, CinematicViewsRepository.SWT_KIND));
this.subPackages.createControls(parent);
this.subPackages.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(Package_PropertiesEditionPartImpl.this, CinematicViewsRepository.Package_.Properties.subPackages, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData subPackagesData = new GridData(GridData.FILL_HORIZONTAL);
subPackagesData.horizontalSpan = 3;
this.subPackages.setLayoutData(subPackagesData);
this.subPackages.setLowerBound(0);
this.subPackages.setUpperBound(-1);
subPackages.setID(CinematicViewsRepository.Package_.Properties.subPackages);
// $NON-NLS-1$
subPackages.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class AbortStatePropertiesEditionPartForm method createActionsTableComposition.
/**
* @param container
*/
protected Composite createActionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.actions = new ReferencesTable(getDescription(FlowViewsRepository.AbortState.Properties.actions, FlowMessages.AbortStatePropertiesEditionPart_ActionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AbortStatePropertiesEditionPartForm.this, FlowViewsRepository.AbortState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
actions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AbortStatePropertiesEditionPartForm.this, FlowViewsRepository.AbortState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
actions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AbortStatePropertiesEditionPartForm.this, FlowViewsRepository.AbortState.Properties.actions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
actions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(AbortStatePropertiesEditionPartForm.this, FlowViewsRepository.AbortState.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.AbortState.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(AbortStatePropertiesEditionPartForm.this, FlowViewsRepository.AbortState.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.AbortState.Properties.actions);
// $NON-NLS-1$
actions.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class ViewPropertiesEditionPartImpl method createColumnsAdvancedTableComposition.
/**
* @param container
*/
protected Composite createColumnsAdvancedTableComposition(Composite parent) {
this.columns = new ReferencesTable(getDescription(DatabaseViewsRepository.View.Properties.columns, DatabaseMessages.ViewPropertiesEditionPart_ColumnsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartImpl.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
columns.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartImpl.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
columns.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartImpl.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
columns.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartImpl.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
columns.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.columnsFilters) {
this.columns.addFilter(filter);
}
this.columns.setHelpText(propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.View.Properties.columns, DatabaseViewsRepository.SWT_KIND));
this.columns.createControls(parent);
this.columns.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartImpl.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData columnsData = new GridData(GridData.FILL_HORIZONTAL);
columnsData.horizontalSpan = 3;
this.columns.setLayoutData(columnsData);
this.columns.setLowerBound(0);
this.columns.setUpperBound(-1);
columns.setID(DatabaseViewsRepository.View.Properties.columns);
// $NON-NLS-1$
columns.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class CategoryPropertiesEditionPartForm method createSubCategoriesTableComposition.
/**
* @param container
*/
protected Composite createSubCategoriesTableComposition(FormToolkit widgetFactory, Composite parent) {
this.subCategories = new ReferencesTable(getDescription(RequirementViewsRepository.Category.Category_.subCategories, RequirementMessages.CategoryPropertiesEditionPart_SubCategoriesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
subCategories.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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(CategoryPropertiesEditionPartForm.this, RequirementViewsRepository.Category.Category_.subCategories, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
subCategories.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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.FORM_KIND));
this.subCategories.createControls(parent, widgetFactory);
this.subCategories.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class CategoryPropertiesEditionPartForm method createRequirementsTableComposition.
/**
* @param container
*/
protected Composite createRequirementsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.requirements = new ReferencesTable(getDescription(RequirementViewsRepository.Category.Category_.requirements, RequirementMessages.CategoryPropertiesEditionPart_RequirementsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
requirements.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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(CategoryPropertiesEditionPartForm.this, RequirementViewsRepository.Category.Category_.requirements, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
requirements.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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.FORM_KIND));
this.requirements.createControls(parent, widgetFactory);
this.requirements.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(CategoryPropertiesEditionPartForm.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;
}
Aggregations