Examples of LabelRepresentation


Examples of org.jbpm.formapi.shared.api.items.LabelRepresentation

            tableOfInputs.setHeight("" + (inputs.size() * 30) + "px");
            tableOfInputs.setEffectClasses(tableEffects);
            tableOfInputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
            for (int index = 0; index < inputs.size(); index++) {
                TaskPropertyRef input = inputs.get(index);
                LabelRepresentation labelName = new LabelRepresentation();
                labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelName.setEffectClasses(labelEffects);
                labelName.setValue(input.getName());
                labelName.setWidth("100px");
                tableOfInputs.setElement(index, 0, labelName);
                LabelRepresentation labelValue = new LabelRepresentation();
                labelValue.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelValue.setEffectClasses(labelEffects);
                labelValue.setWidth("200px");
                InputData data = new InputData();
                data.setName(input.getName());
                data.setValue(input.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
                    public Map<String, Object> getDataMap() {
                        return new HashMap<String, Object>();
                    }
                });
                labelValue.setInput(data);
                labelValue.setValue("{variable}");
                tableOfInputs.setElement(index, 1, labelValue);
            }
            LabelRepresentation labelInputs = new LabelRepresentation();
            labelInputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
            labelInputs.setEffectClasses(labelEffects);
            labelInputs.setValue("Inputs:");
            form.addFormItem(labelInputs);
            form.addFormItem(tableOfInputs);
        }
        List<TaskPropertyRef> outputs = task.getOutputs();
        if (outputs != null && !outputs.isEmpty()) {
            TableRepresentation tableOfOutputs = new TableRepresentation();
            tableOfOutputs.setRows(outputs.size());
            tableOfOutputs.setColumns(2);
            tableOfOutputs.setHeight("" + (outputs.size() * 30) + "px");
            tableOfOutputs.setEffectClasses(tableEffects);
            tableOfOutputs.setEventActions(asMapOfNull(tableActions, FBScript.class));
            for (int index = 0; index < outputs.size(); index++) {
                TaskPropertyRef output = outputs.get(index);
                LabelRepresentation labelName = new LabelRepresentation();
                labelName.setEventActions(asMapOfNull(labelActions, FBScript.class));
                labelName.setEffectClasses(labelEffects);
                labelName.setValue(output.getName());
                labelName.setWidth("100px");
                tableOfOutputs.setElement(index, 0, labelName);
                TextFieldRepresentation textField = new TextFieldRepresentation();
                textField.setEventActions(asMapOfNull(textfieldActions, FBScript.class));
                textField.setWidth("200px");
                textField.setEffectClasses(textfieldEffects);
                OutputData data = new OutputData();
                data.setName(output.getName());
                data.setValue(output.getSourceExpresion());
                data.setMimeType("multipart/form-data");
                data.setFormatter(new Formatter() {
                    @Override
                    public Object format(Object object) {
                        return object;
                    }
                    @Override
                    public Map<String, Object> getDataMap() {
                        return new HashMap<String, Object>();
                    }
                });
                textField.setOutput(data);
                tableOfOutputs.setElement(index, 1, textField);
            }
            LabelRepresentation labelOutputs = new LabelRepresentation();
            labelOutputs.setEventActions(asMapOfNull(labelActions, FBScript.class));
            labelOutputs.setEffectClasses(labelEffects);
            labelOutputs.setValue("Outputs:");
            form.addFormItem(labelOutputs);
            form.addFormItem(tableOfOutputs);
        }
        CompleteButtonRepresentation completeButton = new CompleteButtonRepresentation();
        completeButton.setText("Complete");
View Full Code Here

Examples of org.jbpm.formapi.shared.api.items.LabelRepresentation

        effect.setWidget(this.label);
    }
   
    @Override
    public FormItemRepresentation getRepresentation() {
        LabelRepresentation rep = super.getRepresentation(new LabelRepresentation());
        rep.setValue(this.label.getText());
        rep.setCssName(this.cssClassName);
        rep.setId(this.id);
        rep.setI18n(getI18nMap());
        rep.setFormat(getFormat() == null ? null : getFormat().toString());
        return rep;
    }
View Full Code Here

Examples of org.jbpm.formapi.shared.api.items.LabelRepresentation

    public void populate(FormItemRepresentation rep) throws FormBuilderException {
        if (!(rep instanceof LabelRepresentation)) {
            throw new FormBuilderException(i18n.RepNotOfType(rep.getClass().getName(), "LabelRepresentation"));
        }
        super.populate(rep);
        LabelRepresentation lrep = (LabelRepresentation) rep;
        this.label.setText(lrep.getValue());
        this.cssClassName = lrep.getCssName();
        this.id = lrep.getId();
        if (lrep.getWidth() != null && !"".equals(lrep.getWidth())) {
            setWidth(lrep.getWidth());
        }
        if (lrep.getHeight() != null && !"".equals(lrep.getHeight())) {
            setHeight(lrep.getHeight());
        }
        saveI18nMap(lrep.getI18n());
        if (lrep.getFormat() != null && !"".equals(lrep.getFormat())) {
            setFormat(Format.valueOf(lrep.getFormat()));
        }
        populate(this.label);
    }
View Full Code Here

Examples of org.jbpm.formapi.shared.api.items.LabelRepresentation

        table.setRows(params.length);
        table.setColumns(2);
        table.setHeight("" + (params.length * 30) + "px");
        for (int index = 0; index < params.length; index++) {
            String paramName = params[index];
            LabelRepresentation labelName = new LabelRepresentation();
            labelName.setValue(paramName);
            labelName.setWidth("100px");
            table.setElement(index, 0, labelName);
            TextFieldRepresentation textField = new TextFieldRepresentation();
            textField.setWidth("200px");
            OutputData data = new OutputData();
            data.setName(paramName);
            data.setMimeType("multipart/form-data");
            data.setFormatter(null);
            textField.setOutput(data);
            table.setElement(index, 1, textField);
        }
        LabelRepresentation labelParams = new LabelRepresentation();
        labelParams.setValue("Parameters:");
        form.addFormItem(labelParams);
        form.addFormItem(table);
       
        CompleteButtonRepresentation completeButton = new CompleteButtonRepresentation();
        completeButton.setText("Complete");
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    else
    if (fileString.startsWith(cmdOperation) || fileString.startsWith(cmdDataTrace) || fileString.startsWith(cmdLowLevelFunction))
    {
      if (learnerInitConfiguration.labelDetails == null)
      {
        learnerInitConfiguration.labelDetails = new LabelRepresentation();
        dataDescription = new LinkedList<String>();
      }
      dataDescription.add(fileString.trim());
    }
    else
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    });
    ltl = Arrays.asList(new String[] {
        "![](setfiletype -> X((storefile) || (rename)))",
        "ltl ![]((initialise) -> X(connect))",
        "ltl !(XX(initialise))" });
    labels = new LabelRepresentation();
    labels.parseCollection(Arrays.asList(new String[]{
      QSMTool.cmdOperation+" "+INITMEM+" "+LabelRepresentation.OP_DATA.PRE+ " varDecl_N",
      QSMTool.cmdOperation+" "+INITMEM+" "+LabelRepresentation.OP_DATA.PRE+ " initCond_N",
      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.PRE+ " somePrecondA",
      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.POST+ " somePostcondA",
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    else
    if (fileString.startsWith(cmdOperation) || fileString.startsWith(cmdDataTrace) || fileString.startsWith(cmdLowLevelFunction))
    {
      if (learnerInitConfiguration.labelDetails == null)
      {
        learnerInitConfiguration.labelDetails = new LabelRepresentation();
        dataDescription = new LinkedList<String>();
      }
      dataDescription.add(fileString.trim());
    }
    else
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    });
    ltl = Arrays.asList(new String[] {
        "![](setfiletype -> X((storefile) || (rename)))",
        "ltl ![]((initialise) -> X(connect))",
        "ltl !(XX(initialise))" });
    labels = new LabelRepresentation();
    labels.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.PRE+ " varDecl_N");
    labels.parseLabel(INITMEM+" "+LabelRepresentation.XM_DATA.PRE+ " initCond_N");
    labels.parseLabel("A"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondA");
    labels.parseLabel("A"+" "+LabelRepresentation.XM_DATA.POST+ " somePostcondA");
    labels.parseLabel("B"+" "+LabelRepresentation.XM_DATA.PRE+ " somePrecondB");
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    result.testSet = readSequenceList((Element)nodesSequences.item(0),StatechumXML.ATTR_TESTSET.name());
    if (nodesLtl.getLength() > 0)
      result.ltlSequences = readInputSequence(new StringReader( nodesLtl.item(0).getTextContent() ),-1);
    if (nodesLabelDetails.getLength() > 0)
    {
      result.labelDetails = new LabelRepresentation();
      result.labelDetails.loadXML( (Element)nodesLabelDetails.item(0) );
    }
    result.graphNumber=graphNumber;
    return result;
  }
View Full Code Here

Examples of statechum.analysis.learning.rpnicore.LabelRepresentation

    });
    ltl = Arrays.asList(new String[] {
        "![](setfiletype -> X((storefile) || (rename)))",
        "ltl ![]((initialise) -> X(connect))",
        "ltl !(XX(initialise))" });
    labels = new LabelRepresentation();
    labels.parseCollection(Arrays.asList(new String[]{
      QSMTool.cmdOperation+" "+INITMEM+" "+LabelRepresentation.OP_DATA.PRE+ " varDecl_N",
      QSMTool.cmdOperation+" "+INITMEM+" "+LabelRepresentation.OP_DATA.PRE+ " initCond_N",
      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.PRE+ " somePrecondA",
      QSMTool.cmdOperation+" "+"A"+" "+LabelRepresentation.OP_DATA.POST+ " somePostcondA",
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.