Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.FieldDecoration


        Composite availableObjectClassesComposite = BaseWidgetUtils.createColumnContainer( composite, 1, 1 );

        if ( FieldDecorationRegistry.getDefault().getFieldDecoration( getClass().getName() ) == null )
        {
            FieldDecoration dummy = FieldDecorationRegistry.getDefault().getFieldDecoration(
                FieldDecorationRegistry.DEC_CONTENT_PROPOSAL );
            FieldDecorationRegistry.getDefault().registerFieldDecoration( getClass().getName(),
                "You may enter a filter to restrict the list below", dummy.getImage() );
        }
        final FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
            getClass().getName() );
        final DecoratedField availabeObjectClassesInstantSearchField = new DecoratedField(
            availableObjectClassesComposite, SWT.BORDER, new IControlCreator()
            {
                public Control createControl( Composite parent, int style )
View Full Code Here


        parentTemplate = new Text(container, SWT.BORDER | SWT.SINGLE);
        parentTemplate.setLayoutData(gd);

        ControlDecoration dec = new ControlDecoration(parentTemplate, SWT.TOP | SWT.LEFT);
        FieldDecoration indicator = FieldDecorationRegistry.getDefault().
                getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);

        dec.setImage(indicator.getImage());
        dec.setDescriptionText(indicator.getDescription() + "(Ctrl+Space)");
        dec.setShowOnlyOnFocus(true);

        Label filler = new Label(container, SWT.NONE);
        filler.setVisible(false);
View Full Code Here

  }

  private ControlDecoration createDecorator(Text text, String message) {
    ControlDecoration controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP);
    controlDecoration.setDescriptionText(message);
    FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
      FieldDecorationRegistry.DEC_ERROR);
    controlDecoration.setImage(fieldDecoration.getImage());
    return controlDecoration;
  }
View Full Code Here

  }

  private ControlDecoration createDecorator(Text text, String message) {
    ControlDecoration controlDecoration = new ControlDecoration(text, SWT.LEFT | SWT.TOP);
    controlDecoration.setDescriptionText(message);
    FieldDecoration fieldDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
      FieldDecorationRegistry.DEC_ERROR);
    controlDecoration.setImage(fieldDecoration.getImage());
    return controlDecoration;
  }
View Full Code Here

    int bits = SWT.TOP | SWT.LEFT;
    ControlDecoration controlDecoration = new ControlDecoration(text, bits);
    controlDecoration.setMarginWidth(0);
    controlDecoration.setShowHover(true);
    controlDecoration.setShowOnlyOnFocus(true);
    FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
        FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    controlDecoration.setImage(contentProposalImage.getImage());

    // Create the proposal provider
    RooShellProposalProvider proposalProvider = new RooShellProposalProvider(text);
    TextContentAdapter textContentAdapter = new TextContentAdapter();
    final RooContentProposalAdapter adapter = new RooContentProposalAdapter(text, textContentAdapter, proposalProvider,
View Full Code Here

    }

    // Create a decorated field with a required field decoration.
    DecoratedField flowField = new DecoratedField(nameGroup, SWT.SINGLE | SWT.BORDER,
        new TextControlCreator());
    FieldDecoration requiredFieldIndicator = FieldDecorationRegistry.getDefault()
        .getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    flowField.addFieldDecoration(requiredFieldIndicator, SWT.TOP | SWT.LEFT, true);
    flowText = (Text) flowField.getControl();
    GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    flowField.getLayoutControl().setLayoutData(data);
    if (this.state != null && this.state.getFlow() != null) {
      this.flowText.setText(this.state.getFlow());
    }
    flowText.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        validateInput();
      }
    });

    // add the indent after getting the decorated field
    data = new GridData(GridData.FILL_HORIZONTAL);
    data.horizontalIndent = FieldDecorationRegistry.getDefault().getMaximumDecorationWidth();
    nameText.setLayoutData(data);

    DialogUtils.attachContentAssist(flowText, WebflowUtils.getWebflowConfigNames());

    browseFlowButton = new Button(nameGroup, SWT.PUSH);
    browseFlowButton.setText("...");
    browseFlowButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
    browseFlowButton.addSelectionListener(buttonListener);

    if (!WebflowModelXmlUtils.isVersion1Flow(state)) {
      parentLabel = new Label(nameGroup, SWT.NONE);
      parentLabel.setText("Parent state id");
      parentText = new Text(nameGroup, SWT.SINGLE | SWT.BORDER);
      if (this.state != null && this.state.getParent() != null) {
        this.parentText.setText(this.state.getParent());
      }
      parentText.setLayoutData(data);
      parentText.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
          validateInput();
        }
      });

      new Label(nameGroup, SWT.NONE);
    }

    item1.setControl(groupActionType);

    // add attribute mapper

    item2.setText("Attribute Mapper");
    item2.setImage(WebflowUIImages.getImage(WebflowUIImages.IMG_OBJS_ATTRIBUTE_MAPPER));

    Composite attributeMapperGroup = new Composite(folder, SWT.NULL);
    attributeMapperGroup.setLayoutData(new GridData(GridData.FILL_BOTH));
    layout1 = new GridLayout();
    layout1.numColumns = 1;
    layout1.marginWidth = 0;
    layout1.marginHeight = 0;
    attributeMapperGroup.setLayout(layout1);

    Group attributeMapperType = new Group(attributeMapperGroup, SWT.NULL);
    layoutAttMap = new GridLayout();
    layoutAttMap.marginWidth = 3;
    layoutAttMap.marginHeight = 3;
    attributeMapperType.setText(" Attribute Mapper ");
    attributeMapperType.setLayoutData(new GridData(GridData.FILL_BOTH));
    attributeMapperType.setLayout(layoutAttMap);

    Composite attributeMapperTypeGroup = new Composite(attributeMapperType, SWT.NULL);
    attributeMapperTypeGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    layout1 = new GridLayout();
    layout1.numColumns = 3;
    layout1.marginWidth = 5;
    attributeMapperTypeGroup.setLayout(layout1);

    attributeMapperBeanLabel = new Label(attributeMapperTypeGroup, SWT.NONE);
    attributeMapperBeanLabel.setText("Bean");

    // Create a decorated field with a required field decoration.
    DecoratedField beanField = new DecoratedField(attributeMapperTypeGroup, SWT.SINGLE
        | SWT.BORDER, new TextControlCreator());
    FieldDecoration requiredFieldIndicator3 = FieldDecorationRegistry.getDefault()
        .getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    beanField.addFieldDecoration(requiredFieldIndicator3, SWT.TOP | SWT.LEFT, true);
    attributeMapperBeanText = (Text) beanField.getControl();
    data = new GridData(GridData.FILL_HORIZONTAL);
    beanField.getLayoutControl().setLayoutData(data);
View Full Code Here

    beanLabel.setLayoutData(gridData);
   
    // Create a decorated field with a required field decoration.
    DecoratedField beanField = new DecoratedField(nameGroup, SWT.SINGLE
        | SWT.BORDER, new TextControlCreator());
    FieldDecoration requiredFieldIndicator = FieldDecorationRegistry
        .getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    beanField.addFieldDecoration(requiredFieldIndicator,
        SWT.TOP | SWT.LEFT, true);
    beanText = (Text) beanField.getControl();
View Full Code Here

    addControlDecoration();
  }

  private void addControlDecoration() {
    ControlDecoration controlDec = new ControlDecoration(control, SWT.TOP | SWT.LEFT);
    FieldDecoration fieldDec = FieldDecorationRegistry.getDefault().getFieldDecoration(
        FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    controlDec.setImage(fieldDec.getImage());
    controlDec.setShowOnlyOnFocus(true);
  }
View Full Code Here

    beanLabel.setLayoutData(gridData);

    // Create a decorated field with a required field decoration.
    DecoratedField beanField = new DecoratedField(nameGroup, SWT.SINGLE
        | SWT.BORDER, new TextControlCreator());
    FieldDecoration requiredFieldIndicator = FieldDecorationRegistry
        .getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    beanField.addFieldDecoration(requiredFieldIndicator,
        SWT.TOP | SWT.LEFT, true);
    beanText = (Text) beanField.getControl();
    GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
    beanField.getLayoutControl().setLayoutData(data);

    if (this.action != null && this.action.getBean() != null) {
      beanText.setText(this.action.getBean());
    }
    beanText.addModifyListener(new ModifyListener() {

      public void modifyText(ModifyEvent e) {
        if (validator != null) {
          validator.validateInput();
        }
      }
    });

    DialogUtils.attachContentAssist(beanText, WebflowUtils
        .getBeansFromEditorInput().toArray());

    browseBeanButton = new Button(nameGroup, SWT.PUSH);
    browseBeanButton.setText("...");
    browseBeanButton.setLayoutData(new GridData(
        GridData.HORIZONTAL_ALIGN_END));
    browseBeanButton.addSelectionListener(buttonListener);

    methodLabel = new Label(nameGroup, SWT.NONE);
    methodLabel.setText("Method");

    // Create a decorated field with a required field decoration.
    DecoratedField methodField = new DecoratedField(nameGroup, SWT.SINGLE
        | SWT.BORDER, new TextControlCreator());
    FieldDecoration requiredFieldIndicator1 = FieldDecorationRegistry
        .getDefault().getFieldDecoration(
            FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
    methodField.addFieldDecoration(requiredFieldIndicator1, SWT.TOP
        | SWT.LEFT, true);
    methodText = (Text) methodField.getControl();
View Full Code Here

      beanLabel.setLayoutData(gridData);

      // Create a decorated field with a required field decoration.
      DecoratedField beanField = new DecoratedField(nameGroup, SWT.SINGLE | SWT.BORDER,
          new TextControlCreator());
      FieldDecoration requiredFieldIndicator = FieldDecorationRegistry.getDefault()
          .getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
      beanField.addFieldDecoration(requiredFieldIndicator, SWT.TOP | SWT.LEFT, true);
      beanText = (Text) beanField.getControl();
      GridData data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
      beanField.getLayoutControl().setLayoutData(data);

      if (this.action != null && this.action.getBean() != null) {
        beanText.setText(this.action.getBean());
      }
      beanText.addModifyListener(new ModifyListener() {

        public void modifyText(ModifyEvent e) {
          if (validator != null) {
            validator.validateInput();
          }
        }
      });

      DialogUtils.attachContentAssist(beanText, WebflowUtils.getBeansFromEditorInput()
          .toArray());

      browseBeanButton = new Button(nameGroup, SWT.PUSH);
      browseBeanButton.setText("...");
      browseBeanButton.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END));
      browseBeanButton.addSelectionListener(buttonListener);

      methodLabel = new Label(nameGroup, SWT.NONE);
      methodLabel.setText("Method");

      // Create a decorated field with a required field decoration.
      DecoratedField methodField = new DecoratedField(nameGroup, SWT.SINGLE | SWT.BORDER,
          new TextControlCreator());
      FieldDecoration requiredFieldIndicator1 = FieldDecorationRegistry.getDefault()
          .getFieldDecoration(FieldDecorationRegistry.DEC_CONTENT_PROPOSAL);
      methodField.addFieldDecoration(requiredFieldIndicator1, SWT.TOP | SWT.LEFT, true);
      methodText = (Text) methodField.getControl();
      data = new GridData(GridData.HORIZONTAL_ALIGN_FILL);
      methodField.getLayoutControl().setLayoutData(data);
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.