Package org.dmd.mvw.tools.mvwgenerator.extended

Examples of org.dmd.mvw.tools.mvwgenerator.extended.View


//        activity.getDMO().addUsesRunContextItem("eventBus");
      activities.put(def.getCamelCaseName(), activity);
      components.put(def.getCamelCaseName(), activity);
    }
    else if (def instanceof View){
      View view = (View) def;
      views.put(def.getCamelCaseName(), view);
     
      if (view.requiresEventBus()){
        view.getDMO().addUsesRunContextItem("eventBus");
      }
     
      // All Views are available for access from the run context. They are created on demand.
      RunContextItem rci = new RunContextItem();
      rci.setAutoCreated(true);
      RunContextItemCollection rcic = contexts.get(rci.getContextImpl());
     
      rci.setItemName(view.getViewName().getNameString() + "RCI");
      rci.setDescription("The auto generated run context item for the " + view.getViewName());
     
      if (view.getSubpackage() == null)
        rci.setUseClass(currentModule.getGenPackage() + ".extended." + view.getViewName());
      else
        rci.setUseClass(currentModule.getGenPackage() + ".extended." + view.getSubpackage() + "." + view.getViewName());
       
      if (view.getUsesRunContextItemHasValue()){
        if (view.isCodeSplit())
          rci.setConstruction("new " + view.getViewName() + "(presenter, thisContext)");
        else
          rci.setConstruction("new " + view.getViewName() + "(presenter, this)");
      }
      else
        rci.setConstruction("new " + view.getViewName() + "(presenter)");

//      // BIG NOTE: we don't specify the arguments to the constructor, this will depend on figuring
//      // out if the component needs run context items. We determine this in the RunContextItem.
//      rci.setConstruction("new " + view.getViewName());
     
     
      // NOTE: in addition to setting the construction mechanism, we also set the view
      // on the context item so that it knows how to create the on demand method that takes
      // the View's presenter.
      rci.setView(view);
      rci.setDefinedInModule(view.getDefinedInModule());
     
      if (rcic == null){
        rcic = new RunContextItemCollection(rci.getContextImpl());
        contexts.put(rci.getContextImpl(), rcic);
      }
      rcic.addItem(rci);
     
      // Add the item to its module
      rci.getDefinedInModule().addRunContextItem(rci);
     
      // We make it so that the view instance is created as required
      rci.setCreateOnDemand(true);
//      rci.setTheOne(view.isTheOne());
     
      // Tell the view its item
      view.setRunContextItem(rci);

    }
    else if (def instanceof Event){
      events.put(def.getCamelCaseName(), (Event) def);
    }
View Full Code Here


        super(new ViewDMO(mods), org.dmd.mvw.tools.mvwgenerator.generated.MvwSchemaAG._View);
    }

    // Generated from: org.dmd.dmg.generators.BaseDMWGeneratorNewest.dumpWrapper(BaseDMWGeneratorNewest.java:491)
    public View getModificationRecorder(){
        View rc = new View();
        rc.setViewName(getViewName());
        rc.setModifier(new DmcTypeModifierMV(MetaDMSAG.__modify));
        return(rc);
    }
View Full Code Here

    public ViewDMW(ViewDMO obj) {
        super(obj, org.dmd.mvw.tools.mvwgenerator.generated.MvwSchemaAG._View);
    }

    public View cloneIt() {
        View rc = new View();
        rc.setDmcObject(getDMO().cloneIt());
        return(rc);
    }
View Full Code Here

TOP

Related Classes of org.dmd.mvw.tools.mvwgenerator.extended.View

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.