Example usage for org.eclipse.jface.preference StringFieldEditor getTextControl

List of usage examples for org.eclipse.jface.preference StringFieldEditor getTextControl

Introduction

In this page you can find the example usage for org.eclipse.jface.preference StringFieldEditor getTextControl.

Prototype

public Text getTextControl(Composite parent) 

Source Link

Document

Returns this field editor's text control.

Usage

From source file:org.thanlwinsoft.languagetest.eclipse.prefs.RecordingPreferencePage.java

License:Open Source License

private void adjustTextControl(StringFieldEditor editor) {
    Text text = (Text) editor.getTextControl(getFieldEditorParent());

    if (text.getLayoutData() instanceof GridData) {
        GridData gd = ((GridData) text.getLayoutData());
        gd.widthHint = 150;//w  w  w  .  jav  a  2  s  . c o m
        text.setLayoutData(gd);
    }

}

From source file:org.yakindu.sct.examples.wizard.preferences.ExamplesPreferencePage.java

License:Open Source License

protected void addFields(Composite main) {
    addField(new StorageLocationFieldEditor(ExamplesPreferenceConstants.STORAGE_LOCATION, "Storage Location:",
            main));//w  w w .  ja  va2  s.c  om
    separator();
    StringFieldEditor remoteLocationEditor = new StringFieldEditor(ExamplesPreferenceConstants.REMOTE_LOCATION,
            "Remote Location", main);
    remoteLocationEditor.getTextControl(main).setEditable(false);
    addField(remoteLocationEditor);
    separator();
    StringFieldEditor remoteBranchEditor = new StringFieldEditor(ExamplesPreferenceConstants.REMOTE_BRANCH,
            "Remote Branch:", main);
    addField(remoteBranchEditor);
}

From source file:tinyos.dlrc.environment.basic.preferences.AbstractEnvironmentPreferencePage.java

License:Open Source License

protected void linkEditor(StringFieldEditor editor) {
    editor.getTextControl(getFieldEditorParent()).addModifyListener(new ModifyListener() {
        public void modifyText(ModifyEvent e) {
            architectureJob.start();// ww w  . j av  a  2s  . c  om
        }
    });
}

From source file:tinyos.dlrc.environment.basic.preferences.AbstractEnvironmentPreferencePage.java

License:Open Source License

protected void setTooltip(StringFieldEditor editor, String tooltip) {
    editor.getLabelControl(getFieldEditorParent()).setToolTipText(tooltip);
    editor.getTextControl(getFieldEditorParent()).setToolTipText(tooltip);
}