Package org.olat.core.gui.control.creator

Examples of org.olat.core.gui.control.creator.ControllerCreator


  public void event(UserRequest ureq, Component source, Event event) {
    if (source == mainVC) {
      if (event.getCommand().equals(CMD_CLONE)) { // clone request
        //TODO:pb: -> link component add new method / rename setTarget() to setPopupeable()
        // setPopup() -> deactivate AJAX on link
        ControllerCreator cloneControllerCreator = new ControllerCreator() {
          @SuppressWarnings("synthetic-access")
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            return readyToCloneC.cloneController(lureq, lwControl);
          }         
        };
       
        ControllerCreator newWindowContent;
        if(layoutCreator != null){
          //wrap with layout
          newWindowContent = layoutCreator.createLayoutControllerCreator(ureq, cloneControllerCreator);
        }else{
          //use default layout
View Full Code Here


   */
  @Override
  protected void event(UserRequest ureq, Component source, Event event) {
    if (source == startTranslationToolLink) {
      // wrap the content controller into a full header layout
      ControllerCreator controllerCreator = new ControllerCreator() {
        public Controller createController(UserRequest ureq, WindowControl wControl) {
          return new TranslationToolMainController(ureq, wControl, !I18nModule.isTransToolEnabled());
        }
      };
      // no need for later disposal, opens in popup window and will be disposed
      // by window manager
      ControllerCreator layoutCtrlr = BaseFullWebappPopupLayoutFactory.createAuthMinimalPopupLayout(ureq, controllerCreator);
      PopupBrowserWindow pbw = getWindowControl().getWindowBackOffice().getWindowManager()
          .createNewPopupBrowserWindowFor(ureq, layoutCtrlr);
      pbw.open(ureq);

    } else if (source == enableInlineTranslationLink) {
View Full Code Here

  public SlowBandWidthSimulatorImpl() {
    //
  }

  public ControllerCreator createAdminGUI() {
    return new ControllerCreator() {
      public Controller createController(UserRequest lureq,
          WindowControl lwControl) {
        return new BandWidthAdminController(lureq, lwControl, cps);
      }
    };
View Full Code Here

  public void event(UserRequest ureq, Component source, Event event) {
    if (source == mainVC) {
      if (event.getCommand().equals(CMD_UNDOCK)) {
        panel.setContent(null);
        // pop up in new browser window
        ControllerCreator undockControllerCreator = new ControllerCreator() {
          public Controller createController(UserRequest lureq,WindowControl lwControl) {
            delegWControl.setDelegate(lwControl);
            LayoutMain3ColsController layoutCtr = new LayoutMain3ColsController(lureq, delegWControl, null, null, controller.getInitialComponent(), null);
            layoutCtr.addDisposableChildController(controller); // cleanup on layout controller dispose
            return layoutCtr;
          }
        };
       
        ControllerCreator newWindowContent;
        if(layoutCreator != null){
          //wrap with layout
          newWindowContent = layoutCreator.createLayoutControllerCreator(ureq, undockControllerCreator);
        }else{
          //use default layout
View Full Code Here

  /* (non-Javadoc)
   * @see org.olat.core.commons.services.clipboard.ClipboardService#createCopyToUIService()
   */
  public ControllerCreator createCopyToUIService(final ClipboardEntryCreator cbec) {
    return new ControllerCreator() {
      public Controller createController(UserRequest ureq, WindowControl wControl) {
        return new CopyToClipboardController(ureq, wControl, ClipboardServiceImpl.this, cbec);
      }};
  }
View Full Code Here

        return new CopyToClipboardController(ureq, wControl, ClipboardServiceImpl.this, cbec);
      }};
  }
 
  public ControllerCreator createPasteFromUIService(final Class[] acceptedFlavorInterfaces) {
    return new ControllerCreator() {
      public Controller createController(UserRequest ureq, WindowControl wControl) {
        return new PasteFromClipboardController(ureq, wControl, ClipboardServiceImpl.this, acceptedFlavorInterfaces);
      }};
  }
View Full Code Here

  /* (non-Javadoc)
   * @see org.olat.core.commons.services.clipboard.ClipboardService#onceGetClipboardUI()
   */
  public ControllerCreator onceGetClipboardUI() {
    return new ControllerCreator(){
      public Controller createController(UserRequest ureq, WindowControl wControl) {
        return new ClipboardTrayController(ureq, wControl, ClipboardServiceImpl.this);
      }};
  }
View Full Code Here

        doAfterDispatch = true;
        // activate next event on source
        Step current = steps.peek();
        // TODO:pb detach previous from "submit" cycle
        nextStep = current.nextStep();
        nextChildCreator = new ControllerCreator() {
          private final UserRequest ureqForAfterDispatch = ureq;

          @SuppressWarnings("unused")
          public Controller createController(UserRequest lureq, WindowControl lwControl) {
            // lureq unused as the remembered ureqForAfterDispatch is
View Full Code Here

   
      public Controller createTopNavController(UserRequest ureq, WindowControl wControl) {
        Controller topnavCtr = null;
        // ----------- topnav, optional (e.g. for imprint, logout) ------------------   
        if (CoreSpringFactory.containsBean("fullWebApp.ContextHelpTopNavControllerCreator")) {
          ControllerCreator topnavControllerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.ContextHelpTopNavControllerCreator");
          topnavCtr = topnavControllerCreator.createController(ureq, wControl);
        }
        return topnavCtr;
      }
   
      public Controller createHeaderController(UserRequest ureq, WindowControl control) {
        Controller headerCtr = null;
        // ----------- header, optional (e.g. for logo, advertising ) ------------------   
        if (CoreSpringFactory.containsBean("fullWebApp.ContextHelpHeaderControllerCreator")) {
          ControllerCreator headerControllerCreator = (ControllerCreatorCoreSpringFactory.getBean("fullWebApp.ContextHelpHeaderControllerCreator");
          headerCtr = headerControllerCreator.createController(ureq, control);
        }
        return headerCtr;
      }
   
      public Controller createFooterController(UserRequest ureq, WindowControl control) {
        Controller footerCtr = null;
        // ----------- footer, optional (e.g. for copyright, powerd by) ------------------
        if (CoreSpringFactory.containsBean("fullWebApp.ContextHelpFooterControllerCreator")) {
          ControllerCreator footerCreator = (ControllerCreator) CoreSpringFactory.getBean("fullWebApp.ContextHelpFooterControllerCreator");
          footerCtr = footerCreator.createController(ureq, control);
        }
        return footerCtr;
      }
    };
  }
View Full Code Here

     
      // Creator code to create
      // 1) the chief controller
      // 2) the layout controller
      // 3) the context help main controller
      ControllerCreator cHelpPopupWindowControllerCreator = new ControllerCreator() {
        public Controller createController(UserRequest lureq, WindowControl lwControl) {
          ControllerCreator cHelpMainControllerCreator = new ControllerCreator() {
            public Controller createController(UserRequest lureq, WindowControl lwControl) {
              // create the context help controller and wrapp it using the layout controller
              ContextHelpMainController helpCtr =  new ContextHelpMainController(lureq, lwControl);
              LayoutMain3ColsController layoutCtr =  new LayoutMain3ColsController(lureq, lwControl, null, null, helpCtr.getInitialComponent(), null);
              layoutCtr.addDisposableChildController(helpCtr);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.creator.ControllerCreator

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.