Examples of TextAnnotation


Examples of com.volantis.mcs.dissection.annotation.TextAnnotation

    }

    public void visitText(DissectableText text)
        throws DissectionException {

        TextAnnotation annotation
            = (TextAnnotation) document.getAnnotation(text);

        String state = getNodeState(annotation);

        String description = document.getTextDescription(text);
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

    // text annotation
    artifactDrawInstructions.put(TextAnnotation.class, new ArtifactDrawInstruction() {

      public void draw(DefaultProcessDiagramCanvas processDiagramCanvas, BpmnModel bpmnModel, Artifact artifact) {
        GraphicInfo graphicInfo = bpmnModel.getGraphicInfo(artifact.getId());
        TextAnnotation textAnnotation = (TextAnnotation) artifact;
        processDiagramCanvas.drawTextAnnotation(textAnnotation.getText(), graphicInfo);
      }
    });
   
    // association
    artifactDrawInstructions.put(Association.class, new ArtifactDrawInstruction() {
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

    return ELEMENT_TEXT_ANNOTATION;
  }
 
  @Override
  protected BaseElement convertXMLToElement(XMLStreamReader xtr, BpmnModel model) throws Exception {
    TextAnnotation textAnnotation = new TextAnnotation();
    BpmnXMLUtil.addXMLLocation(textAnnotation, xtr);
    textAnnotation.setTextFormat(xtr.getAttributeValue(null, ATTRIBUTE_TEXTFORMAT));
    parseChildElements(getXMLElementName(), textAnnotation, childParserMap, model, xtr);
    return textAnnotation;
  }
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

    return textAnnotation;
  }

  @Override
  protected void writeAdditionalAttributes(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
    TextAnnotation textAnnotation = (TextAnnotation) element;
    writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw);
  }
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

    writeDefaultAttribute(ATTRIBUTE_TEXTFORMAT, textAnnotation.getTextFormat(), xtw);
  }
 
  @Override
  protected void writeAdditionalChildElements(BaseElement element, BpmnModel model, XMLStreamWriter xtw) throws Exception {
    TextAnnotation textAnnotation = (TextAnnotation) element;
    if (StringUtils.isNotEmpty(textAnnotation.getText())) {
      xtw.writeStartElement(ELEMENT_TEXT_ANNOTATION_TEXT);
      xtw.writeCharacters(textAnnotation.getText());
      xtw.writeEndElement();
    }
  }
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

          }
          documentationParser.parseChildElement(xtr, parentElement, model);
       
        } else if (activeProcess == null && ELEMENT_TEXT_ANNOTATION.equals(xtr.getLocalName())) {
          String elementId = xtr.getAttributeValue(null, ATTRIBUTE_ID);
          TextAnnotation textAnnotation = (TextAnnotation) new TextAnnotationXMLConverter().convertXMLToElement(xtr, model);
          textAnnotation.setId(elementId);
          model.getGlobalArtifacts().add(textAnnotation);
         
        } else if (activeProcess == null && ELEMENT_ASSOCIATION.equals(xtr.getLocalName())) {
          String elementId = xtr.getAttributeValue(null, ATTRIBUTE_ID);
          Association association = (Association) new AssociationXMLConverter().convertXMLToElement(xtr, model);
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

     
      if (!(bo instanceof TextAnnotation)) {
        return;
      }
     
      final TextAnnotation ta = (TextAnnotation) bo;
      String annotationText = ta.getText();
      if (annotationText != null) {
        text.removeFocusListener(listener);
        text.setText(annotationText);
        text.addFocusListener(listener);
      } else {
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

  @Override
  public String getInitialValue(final IDirectEditingContext context) {
   
    final PictogramElement pe = context.getPictogramElement();
    final TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe)
   
    return annotation.getText();
  }
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

  }

  @Override
  public void setValue(String value, IDirectEditingContext context) {
    final PictogramElement pe = context.getPictogramElement();
    final TextAnnotation annotation = (TextAnnotation) getBusinessObjectForPictogramElement(pe);
   
    annotation.setText(value);
   
    updatePictogramElement(((Shape) pe).getContainer());
  }
View Full Code Here

Examples of org.activiti.bpmn.model.TextAnnotation

    return isAnnotation && (intoDiagram || intoLane || intoSubProcess);
  }

  @Override
  public PictogramElement add(IAddContext context) {
    final TextAnnotation annotation = (TextAnnotation) context.getNewObject();
   
    final IPeCreateService peCreateService = Graphiti.getPeCreateService();
    final ContainerShape containerShape = peCreateService.createContainerShape(context.getTargetContainer(), true);
   
    final IGaService gaService = Graphiti.getGaService();
   
    // TODO: we currently only support horizontal lanes!!!
    final int height = Math.max(50, context.getHeight());
    final int width = Math.max(100, context.getWidth());
    final int commentEdge = 20;
   
    final Rectangle rect = gaService.createInvisibleRectangle(containerShape);
    gaService.setLocationAndSize(rect, context.getX(), context.getY(), width, height);
   
    final Shape lineShape = peCreateService.createShape(containerShape, false);
    final Polyline line
      = gaService.createPolyline(lineShape
          , new int[] { commentEdge, 0, 0, 0, 0, height, commentEdge, height });
    line.setStyle(StyleUtil.getStyleForTask(getDiagram()));
    line.setLineWidth(2);
    gaService.setLocationAndSize(line, 0, 0, commentEdge, height);
   
    final Shape textShape = peCreateService.createShape(containerShape, false);
    final MultiText text = gaService.createDefaultMultiText(getDiagram(), textShape, annotation.getText());
    text.setStyle(StyleUtil.getStyleForTask(getDiagram()));
    text.setVerticalAlignment(Orientation.ALIGNMENT_TOP);
    if (OSUtil.getOperatingSystem() == OSEnum.Mac) {
      text.setFont(gaService.manageFont(getDiagram(), text.getFont().getName(), 11));
    }
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.