use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class InitialStatePropertiesEditionPartForm method removeFromIncomingTransitions.
/**
*/
protected void removeFromIncomingTransitions(EObject element) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(InitialStatePropertiesEditionPartForm.this, StatemachineViewsRepository.InitialState.Properties.incomingTransitions, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.REMOVE, null, element));
incomingTransitions.refresh();
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class RegionPropertiesEditionPartForm method createDescriptionText.
protected Composite createDescriptionText(FormToolkit widgetFactory, Composite parent) {
createDescription(parent, StatemachineViewsRepository.Region.Properties.description, StatemachineMessages.RegionPropertiesEditionPart_DescriptionLabel);
// $NON-NLS-1$
description = widgetFactory.createText(parent, "");
description.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
widgetFactory.paintBordersFor(parent);
GridData descriptionData = new GridData(GridData.FILL_HORIZONTAL);
description.setLayoutData(descriptionData);
description.addFocusListener(new FocusAdapter() {
/**
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText()));
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.description, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, description.getText()));
}
}
/**
* @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
*/
@Override
public void focusGained(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_GAINED, null, null));
}
}
});
description.addKeyListener(new KeyAdapter() {
/**
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText()));
}
}
});
EditingUtils.setID(description, StatemachineViewsRepository.Region.Properties.description);
// $NON-NLS-1$
EditingUtils.setEEFtype(description, "eef::Text");
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.Region.Properties.description, StatemachineViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class RegionPropertiesEditionPartForm method createNameText.
protected Composite createNameText(FormToolkit widgetFactory, Composite parent) {
createDescription(parent, StatemachineViewsRepository.Region.Properties.name, StatemachineMessages.RegionPropertiesEditionPart_NameLabel);
// $NON-NLS-1$
name = widgetFactory.createText(parent, "");
name.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
widgetFactory.paintBordersFor(parent);
GridData nameData = new GridData(GridData.FILL_HORIZONTAL);
name.setLayoutData(nameData);
name.addFocusListener(new FocusAdapter() {
/**
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText()));
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.name, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, name.getText()));
}
}
/**
* @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
*/
@Override
public void focusGained(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_GAINED, null, null));
}
}
});
name.addKeyListener(new KeyAdapter() {
/**
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(RegionPropertiesEditionPartForm.this, StatemachineViewsRepository.Region.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText()));
}
}
});
EditingUtils.setID(name, StatemachineViewsRepository.Region.Properties.name);
// $NON-NLS-1$
EditingUtils.setEEFtype(name, "eef::Text");
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.Region.Properties.name, StatemachineViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent 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.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class StateMachinePropertiesEditionPartForm method createDescriptionText.
protected Composite createDescriptionText(FormToolkit widgetFactory, Composite parent) {
createDescription(parent, StatemachineViewsRepository.StateMachine_.Properties.description, StatemachineMessages.StateMachinePropertiesEditionPart_DescriptionLabel);
// $NON-NLS-1$
description = widgetFactory.createText(parent, "");
description.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER);
widgetFactory.paintBordersFor(parent);
GridData descriptionData = new GridData(GridData.FILL_HORIZONTAL);
description.setLayoutData(descriptionData);
description.addFocusListener(new FocusAdapter() {
/**
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText()));
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.description, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_LOST, null, description.getText()));
}
}
/**
* @see org.eclipse.swt.events.FocusAdapter#focusGained(org.eclipse.swt.events.FocusEvent)
*/
@Override
public void focusGained(FocusEvent e) {
if (propertiesEditionComponent != null) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, null, PropertiesEditionEvent.FOCUS_CHANGED, PropertiesEditionEvent.FOCUS_GAINED, null, null));
}
}
});
description.addKeyListener(new KeyAdapter() {
/**
* @see org.eclipse.swt.events.KeyAdapter#keyPressed(org.eclipse.swt.events.KeyEvent)
*/
@Override
@SuppressWarnings("synthetic-access")
public void keyPressed(KeyEvent e) {
if (e.character == SWT.CR) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StateMachinePropertiesEditionPartForm.this, StatemachineViewsRepository.StateMachine_.Properties.description, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, description.getText()));
}
}
});
EditingUtils.setID(description, StatemachineViewsRepository.StateMachine_.Properties.description);
// $NON-NLS-1$
EditingUtils.setEEFtype(description, "eef::Text");
// $NON-NLS-1$
FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(StatemachineViewsRepository.StateMachine_.Properties.description, StatemachineViewsRepository.FORM_KIND), null);
// End of user code
return parent;
}
Aggregations