use of org.eclipse.emf.eef.runtime.ui.widgets.ReferencesTable in project InformationSystem by ObeoNetwork.
the class ForeignKeysPropertiesEditionPartForm method createForeignKeysTableComposition.
/**
* @param container
*/
protected Composite createForeignKeysTableComposition(FormToolkit widgetFactory, Composite parent) {
this.foreignKeys = new ReferencesTable(getDescription(DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, DatabaseMessages.ForeignKeysPropertiesEditionPart_ForeignKeysLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeysPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
foreignKeys.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeysPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
foreignKeys.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeysPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
foreignKeys.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeysPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
foreignKeys.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.foreignKeysFilters) {
this.foreignKeys.addFilter(filter);
}
this.foreignKeys.setHelpText(propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, DatabaseViewsRepository.FORM_KIND));
this.foreignKeys.createControls(parent, widgetFactory);
this.foreignKeys.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ForeignKeysPropertiesEditionPartForm.this, DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData foreignKeysData = new GridData(GridData.FILL_HORIZONTAL);
foreignKeysData.horizontalSpan = 3;
this.foreignKeys.setLayoutData(foreignKeysData);
this.foreignKeys.setLowerBound(0);
this.foreignKeys.setUpperBound(-1);
foreignKeys.setID(DatabaseViewsRepository.ForeignKeys.Properties.foreignKeys_);
// $NON-NLS-1$
foreignKeys.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 StateMachinePropertiesEditionPartForm method createRegionsTableComposition.
/**
* @param container
*/
protected Composite createRegionsTableComposition(FormToolkit widgetFactory, Composite parent) {
this.regions = new ReferencesTable(getDescription(StatemachineViewsRepository.StateMachine_.Properties.regions, StatemachineMessages.StateMachinePropertiesEditionPart_RegionsLabel), new ReferencesTableListener() {
public void handleAdd() {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.regions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.ADD, null, null));
regions.refresh();
}
public void handleEdit(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.regions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, element));
regions.refresh();
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.regions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.MOVE, element, newIndex));
regions.refresh();
}
public void handleRemove(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.regions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
regions.refresh();
}
public void navigateTo(EObject element) {
}
});
for (ViewerFilter filter : this.regionsFilters) {
this.regions.addFilter(filter);
}
this.regions.setHelpText(propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.StateMachine_.Properties.regions, StatemachineViewsRepository.FORM_KIND));
this.regions.createControls(parent, widgetFactory);
this.regions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.regions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData regionsData = new GridData(GridData.FILL_HORIZONTAL);
regionsData.horizontalSpan = 3;
this.regions.setLayoutData(regionsData);
this.regions.setLowerBound(0);
this.regions.setUpperBound(-1);
regions.setID(StatemachineViewsRepository.StateMachine_.Properties.regions);
// $NON-NLS-1$
regions.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 StatePropertiesEditionPartForm method createOutcomingTransitionsReferencesTable.
/**
*/
protected Composite createOutcomingTransitionsReferencesTable(FormToolkit widgetFactory, Composite parent) {
this.outcomingTransitions = new ReferencesTable(getDescription(StatemachineViewsRepository.State.Properties.outcomingTransitions, StatemachineMessages.StatePropertiesEditionPart_OutcomingTransitionsLabel), new ReferencesTableListener() {
public void handleAdd() {
addOutcomingTransitions();
}
public void handleEdit(EObject element) {
editOutcomingTransitions(element);
}
public void handleMove(EObject element, int oldIndex, int newIndex) {
moveOutcomingTransitions(element, oldIndex, newIndex);
}
public void handleRemove(EObject element) {
removeFromOutcomingTransitions(element);
}
public void navigateTo(EObject element) {
}
});
this.outcomingTransitions.setHelpText(propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.State.Properties.outcomingTransitions, StatemachineViewsRepository.FORM_KIND));
this.outcomingTransitions.createControls(parent, widgetFactory);
this.outcomingTransitions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StatePropertiesEditionPartForm.this, StatemachineViewsRepository.State.Properties.outcomingTransitions, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SELECTION_CHANGED, null, e.item.getData()));
}
}
});
GridData outcomingTransitionsData = new GridData(GridData.FILL_HORIZONTAL);
outcomingTransitionsData.horizontalSpan = 3;
this.outcomingTransitions.setLayoutData(outcomingTransitionsData);
this.outcomingTransitions.disableMove();
outcomingTransitions.setID(StatemachineViewsRepository.State.Properties.outcomingTransitions);
// $NON-NLS-1$
outcomingTransitions.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 StatePropertiesEditionPartForm method createIncomingTransitionsReferencesTable.
/**
*/
protected Composite createIncomingTransitionsReferencesTable(FormToolkit widgetFactory, Composite parent) {
this.incomingTransitions = new ReferencesTable(getDescription(StatemachineViewsRepository.State.Properties.incomingTransitions, StatemachineMessages.StatePropertiesEditionPart_IncomingTransitionsLabel), 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(StatemachineViewsRepository.State.Properties.incomingTransitions, StatemachineViewsRepository.FORM_KIND));
this.incomingTransitions.createControls(parent, widgetFactory);
this.incomingTransitions.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
if (e.item != null && e.item.getData() instanceof EObject) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StatePropertiesEditionPartForm.this, StatemachineViewsRepository.State.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(StatemachineViewsRepository.State.Properties.incomingTransitions);
// $NON-NLS-1$
incomingTransitions.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 FinalStatePropertiesEditionPartImpl method createIncomingTransitionsAdvancedReferencesTable.
/**
*/
protected Composite createIncomingTransitionsAdvancedReferencesTable(Composite parent) {
String label = getDescription(StatemachineViewsRepository.FinalState.Properties.incomingTransitions, StatemachineMessages.FinalStatePropertiesEditionPart_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(StatemachineViewsRepository.FinalState.Properties.incomingTransitions, StatemachineViewsRepository.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(FinalStatePropertiesEditionPartImpl.this, StatemachineViewsRepository.FinalState.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(StatemachineViewsRepository.FinalState.Properties.incomingTransitions);
// $NON-NLS-1$
incomingTransitions.setEEFType("eef::AdvancedReferencesTable");
return parent;
}
Aggregations