Package org.kite9.diagram.primitives

Examples of org.kite9.diagram.primitives.Container


  @Kite9Item
  public Diagram example_1_11_MethodCallDiagramMethods(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    MethodBasedSequenceDiagramDataProvider mbsddp = createMethodProvider(db, m, packageLimit);
    NoLayoutSequenceDiagramWizard format = new NoLayoutSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    return db.getDiagram();
  }
View Full Code Here


  @Kite9Item
  public Diagram example_1_12_MethodCallDiagramClasses(DiagramBuilder db) throws Exception {
    Method m = LibraryFacade.class.getDeclaredMethod("borrow", int.class, int.class);
    final String packageLimit = Book.class.getPackage().getName();
    ClassBasedSequenceDiagramDataProvider mbsddp = createClassProvider(db, m, packageLimit);
    NoLayoutSequenceDiagramWizard format = new NoLayoutSequenceDiagramWizard(db);
    format.write(mbsddp, db.getDiagram());
    db.withKeyText("BorrowBook", "Exception routes are ommitted for clarity");
    return db.getDiagram();
  }
View Full Code Here

              : new TextLine(fromLabel);
          String toLabel = getLabel(object, to, ii);
          TextLine toLabelTL = toLabel.length() == 0 ? null
              : new TextLine(toLabel);

          Direction direction = d == null ? activeVerb.getDirection()
              : d;
          if (verb.getType() == RelationshipType.PASSIVE) {
            ii.returnConnection(toEl, arrowEl, or, toLabelTL, null, false, direction);
            if (!arrowPreExists) {
              ii.returnConnection(arrowEl, fromEl, null, null, fromLabelTL, true, direction);
View Full Code Here

    return "[A:"+getID()+"]";
  }
 
  public RenderingInformation getRenderingInformation() {
    if (renderingInformation==null)
      renderingInformation = new RectangleRenderingInformation();
   
    return renderingInformation;
  }
View Full Code Here

            subject, verb);
        PropositionBinding or = new PropositionBinding(subject, verb, object);
       

        SimpleNoun to = NounFactory.getRawSimpleNoun(object);
        Container cont = c == null ? getContainerFor(from, verb, ii) : c;
        DiagramElement toEl = toElementFormat.returnElement(cont, to,
            ii);

        if ((from != null) && (verb != null)) {
          DiagramElement fromEl = ii.returnExisting(from);
View Full Code Here

    DiagramElement existing = stateMap.get(from);
    if (existing != null) {
      return existing;
    }

    Container container = c;
    if (fromGroup != null) {
      container = (Container) stateMap.get(fromGroup);
      if (container == null) {
        container = (Container) ii.returnContext(c, fromGroup, new TextLine(fromGroup.getLabel()), true, null);
        stateMap.put(fromGroup, container);
View Full Code Here


  private int depth(DiagramElement de) {
    if (de instanceof Contained) {
      Contained c = (Contained) de;
      Container cc = c.getContainer();
      if (cc == null) {
        return 0;
      } else {
        return depth(cc)+1;
      }
View Full Code Here

    while (dTo > dFrom) {
      to = ((Contained)to).getContainer() ;
      dTo --;
    }
   
    Container cf = ((Contained)from).getContainer();
    Container ct = ((Contained)to).getContainer();
    if (cf == ct) {
      return cf.getContents().indexOf(from) < cf.getContents().indexOf(to);
    } else {
      return isFromBefore(cf, dFrom-1, ct, dTo-1);
    }
View Full Code Here

    return extension;
  }

  private DiagramElement buildGlyph(Container c, SimpleNoun from, SimpleNoun fromGroup, Map<Object, DiagramElement> stateMap, Set<DiagramElement> headerGlyphs, Map<DiagramElement, DiagramElement> rootElements, Stack<DiagramElement> elementStack, Map<DiagramElement, Integer> elementDepth) {
    DiagramElement existing = stateMap.get(from);
    Container container = (Container) stateMap.get(fromGroup);
   
    if (container==null) {
      DiagramElement de = ii.returnContext(c, fromGroup, new TextLine(fromGroup.getLabel()), true, null);
      if (!(de instanceof Context)) {
        throw new Kite9ProcessingException(fromGroup + " already exists in the diagram as a " + de.getClass()
View Full Code Here

  public static NounFormat asGlyph(final String stereotypeOverride) {
    return new NounFormat() {
      public Connected returnElement(Container c, SimpleNoun to,
          InsertionInterface ii) {
        DiagramElement de = ii.returnGlyph(c, to, to.getLabel(),
            stereotypeOverride == null ? to.getStereotype()
                : stereotypeOverride);

        if (to.getDisambiguation() != null) {
          for (NounPart item : to.getDisambiguation()) {
View Full Code Here

TOP

Related Classes of org.kite9.diagram.primitives.Container

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.