use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class EntityPropertiesEditionPartImpl method createAssociatedTypesAdvancedReferencesTable.
/**
*/
protected Composite createAssociatedTypesAdvancedReferencesTable(Composite parent) {
String label = getDescription(EntityViewsRepository.Entity_.Properties.associatedTypes, EntityMessages.EntityPropertiesEditionPart_AssociatedTypesLabel);
this.associatedTypes = new ReferencesTable(label, new ReferencesTableListener() {
public void handleAdd() {
addAssociatedTypes();
}
public void handleEdit(EObject element) {
editAssociatedTypes(element);
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
moveAssociatedTypes(element, oldIndex, newIndex);
}
public void handleRemove(EObject element) {
removeFromAssociatedTypes(element);
}
public void navigateTo(EObject element) {
}
});
this.associatedTypes.setHelpText(propertiesEditionComponent.getHelpContent(EntityViewsRepository.Entity_.Properties.associatedTypes, EntityViewsRepository.SWT_KIND));
this.associatedTypes.createControls(parent);
this.associatedTypes.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EntityPropertiesEditionPartImpl.this, EntityViewsRepository.Entity_.Properties.associatedTypes, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData associatedTypesData = new GridData(GridData.FILL_HORIZONTAL);
associatedTypesData.horizontalSpan = 3;
this.associatedTypes.setLayoutData(associatedTypesData);
this.associatedTypes.disableMove();
associatedTypes.setID(EntityViewsRepository.Entity_.Properties.associatedTypes);
// $NON-NLS-1$
associatedTypes.setEEFType("eef::AdvancedReferencesTable");
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class EntityPropertiesEditionPartForm method createAssociatedTypesReferencesTable.
/**
*/
protected Composite createAssociatedTypesReferencesTable(FormToolkit widgetFactory, Composite parent) {
this.associatedTypes = new ReferencesTable(getDescription(EntityViewsRepository.Entity_.Properties.associatedTypes, EntityMessages.EntityPropertiesEditionPart_AssociatedTypesLabel), new ReferencesTableListener() {
public void handleAdd() {
addAssociatedTypes();
}
public void handleEdit(EObject element) {
editAssociatedTypes(element);
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
moveAssociatedTypes(element, oldIndex, newIndex);
}
public void handleRemove(EObject element) {
removeFromAssociatedTypes(element);
}
public void navigateTo(EObject element) {
}
});
this.associatedTypes.setHelpText(propertiesEditionComponent.getHelpContent(EntityViewsRepository.Entity_.Properties.associatedTypes, EntityViewsRepository.FORM_KIND));
this.associatedTypes.createControls(parent, widgetFactory);
this.associatedTypes.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(EntityPropertiesEditionPartForm.this, EntityViewsRepository.Entity_.Properties.associatedTypes, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData associatedTypesData = new GridData(GridData.FILL_HORIZONTAL);
associatedTypesData.horizontalSpan = 3;
this.associatedTypes.setLayoutData(associatedTypesData);
this.associatedTypes.disableMove();
associatedTypes.setID(EntityViewsRepository.Entity_.Properties.associatedTypes);
// $NON-NLS-1$
associatedTypes.setEEFType("eef::AdvancedReferencesTable");
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable.ReferencesTableListener in project InformationSystem by ObeoNetwork.
the class ViewPropertiesEditionPartForm method createTablesTableComposition.
/**
* @param container
*/
protected Composite createTablesTableComposition(FormToolkit widgetFactory, Composite parent) {
this.tables = new ReferencesTable(getDescription(DatabaseViewsRepository.View.Properties.tables, DatabaseMessages.ViewPropertiesEditionPart_TablesLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.tables, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
tables.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.tables, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
tables.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.tables, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
tables.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.tables, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
tables.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.tablesFilters) {
this.tables.addFilter(filter);
}
this.tables.setHelpText(propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.View.Properties.tables, DatabaseViewsRepository.FORM_KIND));
this.tables.createControls(parent, widgetFactory);
this.tables.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.tables, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData tablesData = new GridData(GridData.FILL_HORIZONTAL);
tablesData.horizontalSpan = 3;
this.tables.setLayoutData(tablesData);
this.tables.setLowerBound(0);
this.tables.setUpperBound(-1);
tables.setID(DatabaseViewsRepository.View.Properties.tables);
// $NON-NLS-1$
tables.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 ViewPropertiesEditionPartForm method createColumnsTableComposition.
/**
* @param container
*/
protected Composite createColumnsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.columns = new ReferencesTable(getDescription(DatabaseViewsRepository.View.Properties.columns, DatabaseMessages.ViewPropertiesEditionPart_ColumnsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
columns.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.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(ViewPropertiesEditionPartForm.this, DatabaseViewsRepository.View.Properties.columns, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
columns.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.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.FORM_KIND));
this.columns.createControls(parent, widgetFactory);
this.columns.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ViewPropertiesEditionPartForm.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 ConstraintsPropertiesEditionPartImpl method createConstraintsAdvancedTableComposition.
/**
* @param container
*/
protected Composite createConstraintsAdvancedTableComposition(Composite parent) {
this.constraints = new ReferencesTable(getDescription(DatabaseViewsRepository.Constraints.Properties.constraints_, DatabaseMessages.ConstraintsPropertiesEditionPart_ConstraintsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintsPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraints.Properties.constraints_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
constraints.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintsPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraints.Properties.constraints_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
constraints.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintsPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraints.Properties.constraints_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
constraints.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintsPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraints.Properties.constraints_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
constraints.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.constraintsFilters) {
this.constraints.addFilter(filter);
}
this.constraints.setHelpText(propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.Constraints.Properties.constraints_, DatabaseViewsRepository.SWT_KIND));
this.constraints.createControls(parent);
this.constraints.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintsPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraints.Properties.constraints_, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData constraintsData = new GridData(GridData.FILL_HORIZONTAL);
constraintsData.horizontalSpan = 3;
this.constraints.setLayoutData(constraintsData);
this.constraints.setLowerBound(0);
this.constraints.setUpperBound(-1);
constraints.setID(DatabaseViewsRepository.Constraints.Properties.constraints_);
// $NON-NLS-1$
constraints.setEEFType("eef::AdvancedTableComposition");
// End of user code
return parent;
}
Aggregations