use of org.eclipse.swt.widgets.Control in project tdi-studio-se by Talend.
the class MultiPageSqlBuilderEditor method setFocus.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.part.MultiPageEditorPart#setFocus()
*/
@Override
public void setFocus() {
int focusIndex = getActivePage();
final Control control = getControl(focusIndex);
if (control != null) {
control.setFocus();
}
}
use of org.eclipse.swt.widgets.Control in project tesb-studio-se by Talend.
the class FieldLayoutPreferencePage method createContents.
/*
* (non-Javadoc) Method declared on PreferencePage.
*/
@Override
protected Control createContents(Composite parent) {
Control contens = createPageContents(parent);
initialize();
checkState();
return contens;
}
use of org.eclipse.swt.widgets.Control in project tdi-studio-se by Talend.
the class SpagoBiServerDialog method setErrorMessage.
public void setErrorMessage(String errorMessage) {
if (errorMessageText != null && !errorMessageText.isDisposed()) {
//$NON-NLS-1$
errorMessageText.setText(errorMessage == null ? "" : errorMessage);
errorMessageText.getParent().update();
// Access the ok button by id, in case clients have overridden button creation.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113643
Control button = getButton(IDialogConstants.OK_ID);
if (button != null) {
button.setEnabled(errorMessage == null);
}
}
}
use of org.eclipse.swt.widgets.Control in project tdi-studio-se by Talend.
the class SpagicServerDialog method setErrorMessage.
public void setErrorMessage(String errorMessage) {
if (errorMessageText != null && !errorMessageText.isDisposed()) {
//$NON-NLS-1$
errorMessageText.setText(errorMessage == null ? "" : errorMessage);
errorMessageText.getParent().update();
// Access the ok button by id, in case clients have overridden button creation.
// See https://bugs.eclipse.org/bugs/show_bug.cgi?id=113643
Control button = getButton(IDialogConstants.OK_ID);
if (button != null) {
button.setEnabled(errorMessage == null);
}
}
}
use of org.eclipse.swt.widgets.Control in project tdi-studio-se by Talend.
the class ComponentSettingsView method createPartControl.
/*
* (non-Javadoc)
*
* @see org.eclipse.ui.part.WorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
@Override
public void createPartControl(Composite parent) {
this.parent = parent;
tabFactory.initComposite(parent, true);
tabFactory.addSelectionChangedListener(new ISelectionChangedListener() {
@Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
TalendPropertyTabDescriptor descriptor = (TalendPropertyTabDescriptor) selection.getFirstElement();
if (descriptor == null) {
return;
}
if (currentSelectedTab != null && (!currentSelectedTab.getData().equals(descriptor.getData()) || currentSelectedTab.getCategory() != descriptor.getCategory())) {
for (Control curControl : tabFactory.getTabComposite().getChildren()) {
curControl.dispose();
}
}
if (element == null || !element.equals(descriptor.getData()) || currentSelectedTab == null || currentSelectedTab.getCategory() != descriptor.getCategory() || selectedPrimary) {
element = (Element) descriptor.getData();
currentSelectedTab = descriptor;
if (descriptor.getData() instanceof ConnectionLabel) {
createDynamicComposite(tabFactory.getTabComposite(), ((ConnectionLabel) descriptor.getData()).getConnection(), descriptor.getCategory());
} else {
createDynamicComposite(tabFactory.getTabComposite(), (Element) descriptor.getData(), descriptor.getCategory());
}
selectedPrimary = false;
}
}
});
}
Aggregations