Package org.kite9.diagram.builders.java

Examples of org.kite9.diagram.builders.java.DiagramBuilder


    }
   
    @Kite9Item
    @Test
    public void test_2_11_MethodDeclaring() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(CallerClass.class)
    .withMethods(db.onlyAnnotated(), false)
      .show(db.asConnectedGlyphs())
      .withCalledMethods(null).show(db.asConnectedGlyphs())
        .withDeclaringClasses(null).show(db.asConnectedGlyphs());
  renderDiagram(db.getDiagram());
 
    }
View Full Code Here


  }

  @Test
  @Kite9Item
  public void test_15_1_CreateFSMModel() throws Exception {
    DiagramBuilder db = createBuilder();
    FiniteStateMachineWizard fsmf = new FiniteStateMachineWizard(db, null);
    Field f = StateMovingClass.class.getDeclaredField("current");
    EnumWithAnnotationFSMDataProvider provider
      = new EnumWithAnnotationFSMDataProvider(db.getNounFactory(), db.getProjectModel(), f , State.class, State.class.getClassLoader(), BeforeState.class, "value", AfterState.class, "value");
    fsmf.write(provider);
    renderDiagram(db.getDiagram());
  }
View Full Code Here

  }

  @Test
  @Kite9Item
  public void test_14_1_TestHierarchy() throws IOException {
    DiagramBuilder db = createBuilder();
    String rh = "Rob's Hierarchy";
    db.withObjects(rh).show(db.asConnectedContexts());
    HierarchyWizard hb = new HierarchyWizard(rh, db);
    hb.add(true, Top.class);
    hb.showClasses(db.asConnectedContexts(false, Layout.HORIZONTAL), db.asConnectedGlyphs(""));
    hb.showInheritance(db.asConnectedGlyphs(""));
    renderDiagram(db.getDiagram());
  }
View Full Code Here

   
   
    @Kite9Item
    @Test
    public void test_13_1_AugmentGlyph() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(SomeClass.class).show(db.asConnectedGlyphs());
  Glyph g = (Glyph) db.getNounElement(SomeClass.class);
  g.getText().add(new TextLine("This is a favourite of John's"));
  renderDiagram(db.getDiagram());
    }
View Full Code Here

    }
   
    @Kite9Item
    @Test
    public void test_13_2_DirectedArrow() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(SomeClass.class)
    .show(db.asConnectedGlyphs())
    .withClasses(new Relationship("inherits", Direction.LEFT), SomeInterface.class)
    .show(db.asConnectedGlyphs());
 
  renderDiagram(db.getDiagram());
    }
View Full Code Here

    }
   
    @Kite9Item
    @Test
    public void test_13_3_AugmentLinks() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(SomeClass.class)
    .show(db.asConnectedGlyphs())
    .withInterfaces(null, false)
    .show(db.asConnectedGlyphs());
 
  Arrow a = (Arrow) db.getRelationshipElement(SomeClass.class, JavaRelationships.IMPLEMENTS);
  Glyph sc = (Glyph) db.getNounElement(SomeClass.class);
  Glyph si = (Glyph) db.getNounElement(SomeInterface.class);
 
  Link top = (Link) a.getConnectionTo(si);
  Link bottom = (Link) a.getConnectionTo(sc);
 
  top.setDrawDirection(Direction.RIGHT);
  bottom.setDrawDirection(Direction.DOWN);
 
  top.setToLabel(new TextLine("some text here"));
  bottom.setFromLabel(new TextLine("some text there"));
 
  renderDiagram(db.getDiagram());
    }
View Full Code Here

    char d;
   
    @Kite9Item
    @Test
    public void test_12_1_AsText() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(Test12Primitives.class)
    .show(db.asConnectedGlyphs())
    .withFields(db.onlyAnnotated(), false).show(db.asTextLines()).withType(null).show(db.asTextLines());

  renderDiagram(db.getDiagram());
    }
View Full Code Here

    }
   
    @Kite9Item
    @Test
    public void test_12_2_AsGlyphs() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(Test12Primitives.class)
    .show(db.asConnectedGlyphs())
    .withFields(db.onlyAnnotated(), false).show(db.asConnectedGlyphs()).withType(null).show(db.asConnectedGlyphs());

  renderDiagram(db.getDiagram());
    }
View Full Code Here

   

    @Kite9Item
    @Test
    public void test_12_3_AsLabels() throws IOException {
  DiagramBuilder db = createBuilder();
  db.withClasses(Test12Primitives.class)
    .show(db.asConnectedGlyphs())
    .withFields(db.onlyAnnotated(), false).withType(null).show(db.asConnectedGlyphs());

  renderDiagram(db.getDiagram());
    }
View Full Code Here

  }
 
  @Kite9Item
  @Test
  public void test_16_3_CreateUnformattedSequenceDiagram() throws Exception {
    DiagramBuilder db = createBuilder();
    Context c = (Context) db.getInsertionInterface().returnContext(db.getDiagram(), db.getNounFactory().createNoun("Some context"), null, true, null);
    Method m = this.getClass().getDeclaredMethod("someMethod1");
    MethodBasedSequenceDiagramDataProvider mbsddp = new MethodBasedSequenceDiagramDataProvider(db, m);
    NoLayoutSequenceDiagramWizard format = new NoLayoutSequenceDiagramWizard(db);
    format.write(mbsddp, c);
    renderDiagram(db.getDiagram());
  }
View Full Code Here

TOP

Related Classes of org.kite9.diagram.builders.java.DiagramBuilder

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.