Search in sources :

Example 51 with Control

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();
    }
}
Also used : Control(org.eclipse.swt.widgets.Control)

Example 52 with Control

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;
}
Also used : Control(org.eclipse.swt.widgets.Control)

Example 53 with Control

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);
        }
    }
}
Also used : Control(org.eclipse.swt.widgets.Control)

Example 54 with Control

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);
        }
    }
}
Also used : Control(org.eclipse.swt.widgets.Control)

Example 55 with Control

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;
            }
        }
    });
}
Also used : Control(org.eclipse.swt.widgets.Control) ISelectionChangedListener(org.eclipse.jface.viewers.ISelectionChangedListener) Element(org.talend.core.model.process.Element) IElement(org.talend.core.model.process.IElement) SelectionChangedEvent(org.eclipse.jface.viewers.SelectionChangedEvent) IStructuredSelection(org.eclipse.jface.viewers.IStructuredSelection) TalendPropertyTabDescriptor(org.talend.core.ui.properties.tab.TalendPropertyTabDescriptor) ConnectionLabel(org.talend.designer.core.ui.editor.connections.ConnectionLabel)

Aggregations

Control (org.eclipse.swt.widgets.Control)475 Point (org.eclipse.swt.graphics.Point)149 Composite (org.eclipse.swt.widgets.Composite)141 GridData (org.eclipse.swt.layout.GridData)102 Button (org.eclipse.swt.widgets.Button)93 Label (org.eclipse.swt.widgets.Label)73 GridLayout (org.eclipse.swt.layout.GridLayout)71 Text (org.eclipse.swt.widgets.Text)70 FormData (org.eclipse.swt.layout.FormData)62 FormAttachment (org.eclipse.swt.layout.FormAttachment)61 Node (org.talend.designer.core.ui.editor.nodes.Node)46 DecoratedField (org.eclipse.jface.fieldassist.DecoratedField)45 SelectionEvent (org.eclipse.swt.events.SelectionEvent)44 StyledText (org.eclipse.swt.custom.StyledText)42 GC (org.eclipse.swt.graphics.GC)41 CLabel (org.eclipse.swt.custom.CLabel)38 ArrayList (java.util.ArrayList)36 Shell (org.eclipse.swt.widgets.Shell)35 FieldDecoration (org.eclipse.jface.fieldassist.FieldDecoration)33 CCombo (org.eclipse.swt.custom.CCombo)32