Examples of ControlDecoration


Examples of org.eclipse.jface.fieldassist.ControlDecoration

    typeField.setLabelText("Type");
    typeField.setDialogFieldListener(this);
    typeField.doFillIntoGrid(nameComposite, 2);
    LayoutUtil.setHorizontalGrabbing(typeField.getTextControl(null));
   
    ControlDecoration decoration = new ControlDecoration(typeField.getTextControl(), SWT.TOP | SWT.LEFT);
   
        FieldDecoration indicator = FieldDecorationRegistry.getDefault().
                getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);

        decoration.setImage(indicator.getImage());
        decoration.setDescriptionText(indicator.getDescription() + "(Ctrl+Space)");
        decoration.setShowOnlyOnFocus(true);
   
    new AutoCompleteField(typeField.getTextControl(), new TextContentAdapter(), ComposerConstants.TYPES);
   
   
    // text field for project description
    descriptionField = new StringDialogField();
    descriptionField.setLabelText("Description");
    descriptionField.setDialogFieldListener(this);
    descriptionField.doFillIntoGrid(nameComposite, 2);
    LayoutUtil.setHorizontalGrabbing(descriptionField.getTextControl(null));
   
    // text field for project description
    keywordField = new StringDialogField();
    keywordField.setLabelText("Keywords");
    keywordField.setDialogFieldListener(this);
    keywordField.doFillIntoGrid(nameComposite, 2);
    LayoutUtil.setHorizontalGrabbing(keywordField.getTextControl(null));
   
   
    // text field for project description
    licenseField = new StringDialogField();
    licenseField.setLabelText("License");
    licenseField.setDialogFieldListener(this);
    licenseField.doFillIntoGrid(nameComposite, 2);
    LayoutUtil.setHorizontalGrabbing(licenseField.getTextControl(null));
   
    ControlDecoration licenseDecoration = new ControlDecoration(licenseField.getTextControl(), SWT.TOP | SWT.LEFT);
   
    licenseDecoration.setImage(indicator.getImage());
    licenseDecoration.setDescriptionText(indicator.getDescription() + "(Ctrl+Space)");
    licenseDecoration.setShowOnlyOnFocus(true);
   
    new AutoCompleteField(licenseField.getTextControl(), new LicenseContentAdapter(), ComposerConstants.LICENSES);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.