Package com.founder.fix.fixflow.core.impl.flowgraphics.svg.to

Examples of com.founder.fix.fixflow.core.impl.flowgraphics.svg.to.SvgCallActivityTo


    return artifactNodeToSVG(bpmnShape,new SvgGroupTo(),baseElement);
  }

  private String callActivityToSVG(BPMNShape bpmnShape) {
    // TODO Auto-generated method stub
    SvgCallActivityTo svgCallActivityTo=new SvgCallActivityTo();
   
    float height = bpmnShape.getBounds().getHeight();
    float width = bpmnShape.getBounds().getWidth();
    float x = bpmnShape.getBounds().getX();
    float y = bpmnShape.getBounds().getY();
    String id = getBaseElement(bpmnShape.getBpmnElement()).getId();
   
 
    String label = "";
   
    if(getBaseElement(bpmnShape.getBpmnElement()) instanceof BoundaryEvent){
     
    }
    else{
      label= ((FlowElement)getBaseElement(bpmnShape.getBpmnElement())).getName();
    }
    if(label==null){
      label="";
    }
   
    svgCallActivityTo.setHeight(height);
    svgCallActivityTo.setWidth(width);
    svgCallActivityTo.setId(id);
    CallActivity callActivity=(CallActivity)getBaseElement(bpmnShape.getBpmnElement());
    if(callActivity.getLoopCharacteristics() instanceof MultiInstanceLoopCharacteristics ){
      svgCallActivityTo.setLoopType(LoopType.MultiInstanceLoopParallel);
    }
   
    svgCallActivityTo.setLabel(label);
   
   
    svgCallActivityTo.setX(x);
    svgCallActivityTo.setY(y);
    String child = FlowSvgUtil.getSvgComponent(svgCallActivityTo);
    return child;
   
    //return CommonNodeToSVG(bpmnShape, new SvgCallActivityTo());
  }
View Full Code Here


  public String createComponent(SvgBaseTo svgTo) {
    String result = null;
    try {
      int loopx = 260;
      int loopy = 281;
      SvgCallActivityTo signavio = (SvgCallActivityTo)svgTo;
      InputStream in = SvgBench.class.getResourceAsStream(comPath);
      Document doc = XmlUtil.read(in);
      String str = doc.getRootElement().asXML();
     
      String loopStd = none;
      String loopPar = none;
      String loopSeq = none;
     
      str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(signavio.getX()-2));
      str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(signavio.getY()-2));
      str = FlowSvgUtil.replaceAll(str, id, signavio.getId());
      str = FlowSvgUtil.replaceAll(str, text, signavio.getLabel());
      str = FlowSvgUtil.replaceAll(str, text_x, StringUtil.getString(signavio.getWidth()/2));
      str = FlowSvgUtil.replaceAll(str, text_y, StringUtil.getString(signavio.getHeight()/2));
      str = FlowSvgUtil.replaceAll(str, width, StringUtil.getString(signavio.getWidth()));
      str = FlowSvgUtil.replaceAll(str, hight, StringUtil.getString(signavio.getHeight()));
      str = FlowSvgUtil.replaceAll(str, loop_x, StringUtil.getString(signavio.getWidth()/2-loopx));
      str = FlowSvgUtil.replaceAll(str, loop_y, StringUtil.getString(signavio.getHeight()-7-loopy));
      str = FlowSvgUtil.replaceAll(str, adhoc, none);
      str = FlowSvgUtil.replaceAll(str, callActivity, "");
     
      if(signavio.getLoopType().equals(LoopType.StandardLoop)){
        loopStd = "";
      }else if(signavio.getLoopType().equals(LoopType.MultiInstanceLoopParallel)){
        loopPar = "";
      }else if(signavio.getLoopType().equals(LoopType.MultiInstanceLoopSequential)){
        loopSeq = "";
      }
     
      str = FlowSvgUtil.replaceAll(str, loop_std, loopStd);
      str = FlowSvgUtil.replaceAll(str, loop_par, loopPar);
View Full Code Here

TOP

Related Classes of com.founder.fix.fixflow.core.impl.flowgraphics.svg.to.SvgCallActivityTo

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.