Package org.kite9.diagram.builders.java

Examples of org.kite9.diagram.builders.java.ClassBuilder.show()


  public Diagram example_1_5_UseCases(DiagramBuilder builder) throws IOException {
    // show use cases inside a context
    PackageBuilder ucp = builder.withPackages(UseCase.class);
    ucp.show(builder.asConnectedContexts());
    ClassBuilder uc = ucp.withMemberClasses(builder.not(builder.only(UseCase.class, Uses.class)));
    uc.show(builder.asConnectedGlyphs(null));

    // show actors inside context
    PackageBuilder ac = builder.withPackages(Actor.class);
    ac.show(builder.asConnectedContexts(true, Layout.VERTICAL));
    ClassBuilder contents = ac.withMembers(Person.class);
View Full Code Here


    // show actors inside context
    PackageBuilder ac = builder.withPackages(Actor.class);
    ac.show(builder.asConnectedContexts(true, Layout.VERTICAL));
    ClassBuilder contents = ac.withMembers(Person.class);
    contents.show(builder.asConnectedGlyphs());
    contents.withMethods(null, false).show(builder.asTextLines());
    contents.withSubClasses(builder.onlyAnnotated(), true).show(builder.asConnectedGlyphs())
      .withMethods(null, false).show(builder.asTextLines());
    // show references between the two
    uc.withReferencingAnnotatedElements(builder.only(Uses.class)).show(builder.asConnectedGlyphs(null,Direction.RIGHT));
View Full Code Here

  }

  @Kite9Item
  public Diagram example_1_7_ClassDependency(DiagramBuilder db) throws IOException {
    ClassBuilder cb = db.withClasses(Book.class, Member.class);
    cb.show(db.asConnectedGlyphs());
    cb.withDependencies(db.not(db.only(Object.class)), true).show(db.asConnectedGlyphs());
    return db.getDiagram();
  }

  @Kite9Item
View Full Code Here

  }

  @Kite9Item
  public Diagram example_1_8_StateTransition(DiagramBuilder db) throws Exception {
    ClassBuilder cb = db.withClasses(Book.class);
    cb.show(db.asConnectedContexts());
    Context c = (Context) db.getNounElement(Book.class);
    FiniteStateMachineWizard fsmFormat = new FiniteStateMachineWizard(db, c);
    Field f = Book.class.getDeclaredField("state");
    FSMDataProvider provider = new EnumWithAnnotationFSMDataProvider(db, f, BookState.class, BeforeState.class,
        AfterState.class);
View Full Code Here

      if (ob instanceof ObjectBuilder) {
        if (((ObjectBuilder) ob).size()>0) {
          ObjectBuilder notDoneYet = ((ObjectBuilder)ob).reduce(db.not(db.onlyOnDiagram()));
          ObjectBuilder alreadyDone = ((ObjectBuilder)ob).reduce(db.onlyOnDiagram());
          notDoneYet.show(objectFormatNew);
          alreadyDone.show(objectFormatExisting);
          if (isShowFieldValues()) {
            s.add(notDoneYet.withFieldValues(fieldFilter));
          }
          if (isShowMethodReturnValues()) {
            s.add(notDoneYet.withMethodReturnValues(methodFilter));
View Full Code Here

  @Kite9Item
  public Diagram example_1_5_UseCases(DiagramBuilder builder) throws IOException {
    // show use cases inside a context
    PackageBuilder ucp = builder.withPackages(UseCase.class);
    ucp.show(builder.asConnectedContexts());
    ClassBuilder uc = ucp.withMemberClasses(builder.not(builder.only(UseCase.class, Uses.class)));
    uc.show(builder.asConnectedGlyphs(null));

    // show actors inside context
    PackageBuilder ac = builder.withPackages(Actor.class);
View Full Code Here

    ClassBuilder uc = ucp.withMemberClasses(builder.not(builder.only(UseCase.class, Uses.class)));
    uc.show(builder.asConnectedGlyphs(null));

    // show actors inside context
    PackageBuilder ac = builder.withPackages(Actor.class);
    ac.show(builder.asConnectedContexts(true, Layout.VERTICAL));
    ClassBuilder contents = ac.withMembers(Person.class);
    contents.show(builder.asConnectedGlyphs());
    contents.withMethods(null, false).show(builder.asTextLines());
    contents.withSubClasses(builder.onlyAnnotated(), true).show(builder.asConnectedGlyphs())
      .withMethods(null, false).show(builder.asTextLines());
View Full Code Here

  }

  @Kite9Item
  public Diagram example_1_6_Packaging(DiagramBuilder db) throws IOException {
    PackageBuilder p1 = db.withPackages(UseCase.class, Actor.class, Uses.class);
    p1.show(db.asConnectedGlyphs());
    p1.withMemberClasses(null).show(db.asTextLines());
    p1.withDependencies(new Filter<Package>() {

      public boolean accept(Package o) {
        return o.getName().startsWith("org.kite9.java.examples");
View Full Code Here

 
  @Kite9Item
  public static Diagram orderEntityRelationshipDiagramb(final DiagramBuilder db) {
    ClassBuilder classBuilder = db.withAnnotatedClasses();
    ClassDiagramWizard erf = new ClassDiagramWizard(db);
    erf.show(classBuilder);
    return db.getDiagram();
  }
 
}
View Full Code Here

        "Default Diagram", getProjectModel());
    ClassDiagramWizard erw = new ClassDiagramWizard(db);

    ClassBuilder cb = db.withClasses(items);

    erw.show(cb);

    if (key)
      db.withKeyText("Kite9 Class Diagram Example",
          "This is a default diagram created by Kite9");
   
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.