use of org.eclipse.emf.eef.runtime.impl.notify.PropertiesEditionEvent in project InformationSystem by ObeoNetwork.
the class ColumnPropertiesEditionPartImpl method createSequenceFlatComboViewer.
/**
* @param parent the parent composite
*/
protected Composite createSequenceFlatComboViewer(Composite parent) {
createDescription(parent, DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseMessages.ColumnPropertiesEditionPart_SequenceLabel);
sequence = new EObjectFlatComboViewer(parent, !propertiesEditionComponent.isRequired(DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseViewsRepository.SWT_KIND));
sequence.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
sequence.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ColumnPropertiesEditionPartImpl.this, DatabaseViewsRepository.Column.Properties.Sequence.sequence_, PropertiesEditionEvent.CHANGE, PropertiesEditionEvent.SET, null, getSequence()));
}
});
GridData sequenceData = new GridData(GridData.FILL_HORIZONTAL);
sequence.setLayoutData(sequenceData);
sequence.setID(DatabaseViewsRepository.Column.Properties.Sequence.sequence_);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.Column.Properties.Sequence.sequence_, DatabaseViewsRepository.SWT_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 ConstraintPropertiesEditionPartImpl method createCommentsTextarea.
protected Composite createCommentsTextarea(Composite parent) {
Label commentsLabel = createDescription(parent, DatabaseViewsRepository.Constraint.Properties.comments, DatabaseMessages.ConstraintPropertiesEditionPart_CommentsLabel);
GridData commentsLabelData = new GridData(GridData.FILL_HORIZONTAL);
commentsLabelData.horizontalSpan = 3;
commentsLabel.setLayoutData(commentsLabelData);
comments = SWTUtils.createScrollableText(parent, SWT.BORDER | SWT.WRAP | SWT.MULTI | SWT.V_SCROLL);
GridData commentsData = new GridData(GridData.FILL_HORIZONTAL);
commentsData.horizontalSpan = 2;
commentsData.heightHint = 80;
commentsData.widthHint = 200;
comments.setLayoutData(commentsData);
comments.addFocusListener(new FocusAdapter() {
/**
* {@inheritDoc}
*
* @see org.eclipse.swt.events.FocusAdapter#focusLost(org.eclipse.swt.events.FocusEvent)
*/
public void focusLost(FocusEvent e) {
if (propertiesEditionComponent != null)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ConstraintPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraint.Properties.comments, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, comments.getText()));
}
});
EditingUtils.setID(comments, DatabaseViewsRepository.Constraint.Properties.comments);
// $NON-NLS-1$
EditingUtils.setEEFtype(comments, "eef::Textarea");
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.Constraint.Properties.comments, DatabaseViewsRepository.SWT_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 ConstraintPropertiesEditionPartImpl method createNameText.
protected Composite createNameText(Composite parent) {
createDescription(parent, DatabaseViewsRepository.Constraint.Properties.name, DatabaseMessages.ConstraintPropertiesEditionPart_NameLabel);
name = SWTUtils.createScrollableText(parent, SWT.BORDER);
GridData nameData = new GridData(GridData.FILL_HORIZONTAL);
name.setLayoutData(nameData);
name.addFocusListener(new FocusAdapter() {
/**
* {@inheritDoc}
*
* @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(ConstraintPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraint.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText()));
}
});
name.addKeyListener(new KeyAdapter() {
/**
* {@inheritDoc}
*
* @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(ConstraintPropertiesEditionPartImpl.this, DatabaseViewsRepository.Constraint.Properties.name, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, name.getText()));
}
}
});
EditingUtils.setID(name, DatabaseViewsRepository.Constraint.Properties.name);
// $NON-NLS-1$
EditingUtils.setEEFtype(name, "eef::Text");
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.Constraint.Properties.name, DatabaseViewsRepository.SWT_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 DataBasePropertiesEditionPartImpl method createUrlText.
protected Composite createUrlText(Composite parent) {
createDescription(parent, DatabaseViewsRepository.DataBase_.Properties.url, DatabaseMessages.DataBasePropertiesEditionPart_UrlLabel);
url = SWTUtils.createScrollableText(parent, SWT.BORDER);
GridData urlData = new GridData(GridData.FILL_HORIZONTAL);
url.setLayoutData(urlData);
url.addFocusListener(new FocusAdapter() {
/**
* {@inheritDoc}
*
* @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(DataBasePropertiesEditionPartImpl.this, DatabaseViewsRepository.DataBase_.Properties.url, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
}
});
url.addKeyListener(new KeyAdapter() {
/**
* {@inheritDoc}
*
* @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(DataBasePropertiesEditionPartImpl.this, DatabaseViewsRepository.DataBase_.Properties.url, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, url.getText()));
}
}
});
EditingUtils.setID(url, DatabaseViewsRepository.DataBase_.Properties.url);
// $NON-NLS-1$
EditingUtils.setEEFtype(url, "eef::Text");
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.DataBase_.Properties.url, DatabaseViewsRepository.SWT_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 DataBasePropertiesEditionPartImpl method createUsedLibrariesFlatReferencesTable.
/**
* @param parent
*/
protected Composite createUsedLibrariesFlatReferencesTable(Composite parent) {
createDescription(parent, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseMessages.DataBasePropertiesEditionPart_UsedLibrariesLabel);
usedLibraries = new FlatReferencesTable(parent);
usedLibraries.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
usedLibraries.addSelectionChangedListener(new ISelectionChangedListener() {
public void selectionChanged(SelectionChangedEvent event) {
if (event.getSelection() instanceof StructuredSelection)
propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(DataBasePropertiesEditionPartImpl.this, DatabaseViewsRepository.DataBase_.Properties.usedLibraries, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, ((StructuredSelection) event.getSelection()).toList()));
}
});
GridData usedLibrariesData = new GridData(GridData.FILL_HORIZONTAL);
usedLibraries.setLayoutData(usedLibrariesData);
usedLibraries.setID(DatabaseViewsRepository.DataBase_.Properties.usedLibraries);
// $NON-NLS-1$
SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(DatabaseViewsRepository.DataBase_.Properties.usedLibraries, DatabaseViewsRepository.SWT_KIND), null);
// End of user code
return parent;
}
Aggregations