@Override
  protected void createClient(Composite parent) {
    FlatFormData data;

    Composite composite = parentComposite = createFlatFormComposite(parent);
    Label description =
        getWidgetFactory()
            .createLabel(
                composite, "Declare a variable that is in scope only for this structured activity");
    data = new FlatFormData();
    data.left = new FlatFormAttachment(0, 0);
    data.top = new FlatFormAttachment(0, IDetailsAreaConstants.VSPACE);
    description.setLayoutData(data);

    Label nameLabel = getWidgetFactory().createLabel(composite, "Variable Name:");

    variableName = fWidgetFactory.createText(composite, EMPTY_STRING);
    data = new FlatFormData();
    data.left =
        new FlatFormAttachment(
            0, BPELUtil.calculateLabelWidth(nameLabel, STANDARD_LABEL_WIDTH_AVG));
    data.right = new FlatFormAttachment(100, (-2) * IDetailsAreaConstants.HSPACE);
    data.top = new FlatFormAttachment(description, 10, SWT.LEFT);
    variableName.setLayoutData(data);

    data = new FlatFormData();
    data.left = new FlatFormAttachment(0, 0);
    data.right = new FlatFormAttachment(variableName, -IDetailsAreaConstants.HSPACE);
    data.top = new FlatFormAttachment(variableName, 0, SWT.CENTER);
    nameLabel.setLayoutData(data);

    variableTypeSelector =
        new VariableTypeSelector(
            composite, SWT.NONE, getBPELEditor(), fWidgetFactory, new VariableTypeCallback());
    data = new FlatFormData();
    data.top = new FlatFormAttachment(nameLabel, 0, SWT.LEFT);
    data.left = new FlatFormAttachment(0, 0);
    data.right = new FlatFormAttachment(100, 0);
    data.bottom = new FlatFormAttachment(100, 0);
    variableTypeSelector.setLayoutData(data);

    createChangeTrackers();
  }
コード例 #2
0
  protected void createNamespaceWidgets(Composite composite) {
    FlatFormData data;

    Label namespaceLabel =
        fWidgetFactory.createLabel(composite, Messages.NamespaceSection_Target_namespace_1);

    namespaceText = fWidgetFactory.createText(composite, EMPTY_STRING);
    data = new FlatFormData();
    data.left =
        new FlatFormAttachment(
            0, BPELUtil.calculateLabelWidth(namespaceLabel, STANDARD_LABEL_WIDTH_AVG));
    data.right = new FlatFormAttachment(100, 0);
    data.top = new FlatFormAttachment(0, 0);
    namespaceText.setLayoutData(data);

    data = new FlatFormData();
    data.left = new FlatFormAttachment(0, 0);
    data.right = new FlatFormAttachment(namespaceText, -IDetailsAreaConstants.HSPACE);
    data.top = new FlatFormAttachment(namespaceText, 0, SWT.CENTER);
    namespaceLabel.setLayoutData(data);
  }
コード例 #3
0
 /**
  * Override this method. Call this version if the subclass wants its own composite with margin and
  * black border.
  */
 protected void createClient2(Composite parent) {
   if (isDefaultCompositeOpaque()) {
     fComposite = fWidgetFactory.createPlainComposite(parent, SWT.NONE);
   } else {
     fComposite = fWidgetFactory.createComposite(parent);
   }
   FlatFormLayout layout = new FlatFormLayout();
   layout.marginWidth = 0; // IDetailsAreaConstants.HMARGIN;
   layout.marginHeight = 0; // IDetailsAreaConstants.VMARGIN;
   fComposite.setLayout(layout);
   FlatFormData data = new FlatFormData();
   data.left = new FlatFormAttachment(0, 0);
   data.right = new FlatFormAttachment(100, 0);
   data.top = new FlatFormAttachment(0, 0);
   data.bottom = new FlatFormAttachment(100, 0);
   //		data.borderType = IBorderConstants.BORDER_1P1_BLACK;
   fComposite.setLayoutData(data);
 }