Package org.eclipse.jface.fieldassist

Examples of org.eclipse.jface.fieldassist.DecoratedField$FieldDecorationData


            protected Text createText(Composite parent) {
                errorDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
                    FieldDecorationRegistry.DEC_ERROR);

                settingsTextDeco = new DecoratedField(parent, SWT.LEFT | SWT.TOP,
                        new IControlCreator() {
                            public Control createControl(Composite p, int s) {
                                return new Text(p, SWT.SINGLE | SWT.BORDER);
                            }
                        });
View Full Code Here


//        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 )
            {
                Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
                combo.setVisibleItemCount( 20 );
View Full Code Here

    {
        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 )
            {
                Combo combo = new Combo( parent, SWT.DROP_DOWN | SWT.BORDER );
                GridData gd = new GridData();
View Full Code Here

        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 )
            {
                Combo combo = BaseWidgetUtils.createCombo( parent, new String[0], -1, 1 );
                combo.setVisibleItemCount( 20 );
View Full Code Here

            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 )
                {
                    return BaseWidgetUtils.createText( parent, "", 1 );
                }
            } );
        availabeObjectClassesInstantSearchField.addFieldDecoration( fieldDecoration, SWT.TOP | SWT.LEFT, true );
        availabeObjectClassesInstantSearchField.getLayoutControl().setLayoutData(
            new GridData( SWT.FILL, SWT.CENTER, true, false ) );
        availableObjectClassesInstantSearch = ( Text ) availabeObjectClassesInstantSearchField.getControl();
        availableObjectClassesInstantSearch.addModifyListener( new ModifyListener()
        {
            public void modifyText( ModifyEvent e )
            {
                availableObjectClassesViewer.refresh();
View Full Code Here

    else {
      flowLabel.setText("Subflow");
    }

    // 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);
    if (this.state != null && this.state.getAttributeMapper() != null && this.state.getAttributeMapper()
            .getBean() != null) {
      this.attributeMapperBeanText.setText(this.state.getAttributeMapper().getBean());
    }
    if (this.state != null && this.state.getSubflowAttributeMapper() != null) {
View Full Code Here

    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gridData.widthHint = LABEL_WIDTH;
    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.FILL_HORIZONTAL);
    beanField.getLayoutControl().setLayoutData(data);
    if (this.action != null && this.action.getBean() != null) {
      beanText.setText(this.action.getBean());
    }
    beanText.addModifyListener(new ModifyListener() {
View Full Code Here

    GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
    gridData.widthHint = LABEL_WIDTH;
    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);

    if (this.action != null && this.action.getMethod() != null) {
      this.methodText.setText(this.action.getMethod());
    }
    methodText.addModifyListener(new ModifyListener() {
View Full Code Here

      GridData gridData = new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING);
      gridData.widthHint = LABEL_WIDTH;
      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);

      if (this.action != null && this.action.getMethod() != null) {
        this.methodText.setText(this.action.getMethod());
      }
      methodText.addModifyListener(new ModifyListener() {
View Full Code Here

TOP

Related Classes of org.eclipse.jface.fieldassist.DecoratedField$FieldDecorationData

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.