Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.FieldDecoration


   */
  public static ControlDecoration createContentProposalDecorator(Control control, String message) {
    ControlDecoration controlDecoration = new ControlDecoration(control,
        SWT.LEFT | SWT.TOP);
    controlDecoration.setDescriptionText(message);
    FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
        .getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    controlDecoration.setImage(fieldDecoration.getImage());
    controlDecoration.setShowOnlyOnFocus(false);
    return controlDecoration;
  }
View Full Code Here


    typeEntry = new FormEntry(client, toolkit, "Type", null, false);
    typeEntry.setValue(composerPackage.getType(), true);
   
    ControlDecoration decoration = new ControlDecoration(typeEntry.getText(), 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(typeEntry.getText(), new TextContentAdapter(), ComposerConstants.TYPES);
   
   
View Full Code Here

  private void createLicenseEntry(Composite client, FormToolkit toolkit) {
    licenseEntry = new FormEntry(client, toolkit, "License", null, false);
   
    ControlDecoration decoration = new ControlDecoration(licenseEntry.getText(), 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(licenseEntry.getText(), new LicenseContentAdapter(), ComposerConstants.LICENSES);
   
    final License2StringConverter converter = new License2StringConverter();
View Full Code Here

    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

  private void addDecorationMargin(Control control) {
    Object layoutData= control.getLayoutData();
    if (!(layoutData instanceof GridData))
      return;
    GridData gd= (GridData)layoutData;
    FieldDecoration dec= FieldDecorationRegistry.getDefault().getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    gd.horizontalIndent= dec.getImage().getBounds().width;
  }
View Full Code Here

    case IStatus.CANCEL:
      fieldDecorationID = FieldDecorationRegistry.DEC_ERROR;
      break;
    }

    FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault()
        .getFieldDecoration(fieldDecorationID);
    return fieldDecoration == null ? null : fieldDecoration.getImage();
  }
View Full Code Here

                    {
                        throw new IllegalStateException();
                    }
                }
               
                final FieldDecoration fieldDecoration
                    = FieldDecorationRegistry.getDefault().getFieldDecoration( fieldDecorationId );
           
                this.control.setImage( fieldDecoration.getImage() );
            }
            else
            {
                if( this.mouseOverEditorControl )
                {
View Full Code Here

        BaseWidgetUtils.createLabel( composite, "Attribute type:", 1 );
//        attributeTypeCombo = BaseWidgetUtils.createCombo( composite, possibleAttributeTypes, -1, 1 );
//        attributeTypeCombo.setText( parsedAttributeType );

        // attribute combo with field decoration
        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
        attributeTypeComboField = new DecoratedField( composite, SWT.NONE, new IControlCreator()
        {
            public Control createControl( Composite parent, int style )
            {
View Full Code Here

     */
    private RdnLine createRdnLine( final Composite rdnComposite )
    {
        final RdnLine rdnLine = new RdnLine();

        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
        rdnLine.rdnNameComboField = new DecoratedField( rdnComposite, SWT.NONE, new IControlCreator()
        {
            public Control createControl( Composite parent, int style )
            {
View Full Code Here

        modSpec.modType.addModifyListener( this );
        String[] attributeDescriptions = schema.getAttributeTypeDescriptionNames();
        Arrays.sort( attributeDescriptions );

        // attribute combo with field decoration
        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
        modSpec.modAttributeComboField = new DecoratedField( modSpecComposite, SWT.NONE, new IControlCreator()
        {
            public Control createControl( Composite parent, int style )
            {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.FieldDecoration

Copyright © 2018 www.massapicom. 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.