Package org.olat.core.gui.components

Examples of org.olat.core.gui.components.Component


        if (locale == null) {
          locale = ureq.getLocale();
        }
        // place disposed message
        Translator pT = Util.createPackageTranslator(DefaultController.class, locale);
        Component dispMsgVC = new VelocityContainer(DEFAULTDISPOSED_PAGE, DefaultController.class,DEFAULTDISPOSED_PAGE, pT, null);
        wrapperPanel.pushContent(dispMsgVC);
      }
    }
  }
View Full Code Here


        //fallback to default locale
        locale = I18nModule.getDefaultLocale();
      }
      // place disposed message
      Translator pT = Util.createPackageTranslator(DefaultController.class, locale);
      Component dispMsgVC = new VelocityContainer(DEFAULTDISPOSED_PAGE,DefaultController.class,DEFAULTDISPOSED_PAGE,pT,null);
      wrapperPanel.pushContent(dispMsgVC);
    }
     
     
    controllerCnt.decrementAndGet();//count controller count down. this should event work if a disposed msg controller is created.
View Full Code Here

      //so far no case in my mind where overriding makes sense.
      //typically a XYZRunMainController implementing a MainLayoutBasicController
      //will dispose all its children and place a disposed message in case of
      //an external event.
      String clazz = disposedMessageController.getClass().getName();
      Component comp = disposeMsgController.getInitialComponent();
      String compName = comp != null ? comp.getComponentName() : "Component is null";
      throw new AssertException("already defined disposedMsgController: "+clazz+" | "+ compName);
    }
    disposedMessageController  = disposeMsgController;
  }
View Full Code Here

    }
    sb.append("><div class=\"b_tabbedpane_content_inner b_floatscrollbox\">");

   
    // now let the selected component render itself
    Component paneToRender = tb.getTabAt(selPane);
    if (paneToRender == null) throw new RuntimeException("a tabbed pane must not be null, but a component");
    renderer.render(sb, paneToRender, null);
    sb.append("</div></div></div>");
  }
View Full Code Here

   */
  public void renderHeaderIncludes(Renderer renderer, StringOutput sb, Component source, URLBuilder ubu, Translator translator, RenderingState rstate) {
    TabbedPane tp = (TabbedPane)source;
    int cnt = tp.getTabCount();
    if (cnt > 0) {
      Component toRender = tp.getTabAt(tp.getSelectedPane());
      // delegate header rendering to the selected pane
      renderer.renderHeaderIncludes(sb, toRender, rstate);
    }
  }
View Full Code Here

   */
  public void renderBodyOnLoadJSFunctionCall(Renderer renderer, StringOutput sb, Component source, RenderingState rstate) {
    TabbedPane tp = (TabbedPane)source;
    int cnt = tp.getTabCount();
    if (cnt > 0) {
      Component toRender = tp.getTabAt(tp.getSelectedPane());
      //  delegate js rendering to the selected pane
      renderer.renderBodyOnLoadJSFunctionCall(sb, toRender, rstate);
    }
  }
View Full Code Here

    VelocityContainer vc = (VelocityContainer) source;
    // the velocity container itself needs no headerincludes, but ask the
    // children also
    Map comps = vc.getComponents();
    for (Iterator iter = comps.values().iterator(); iter.hasNext();) {
      Component child = (Component) iter.next();
      renderer.renderHeaderIncludes(sb, child, rstate);
    }
  }
View Full Code Here

    VelocityContainer vc = (VelocityContainer) source;
    // the velocity container itself needs no headerincludes, but ask the
    // children also
    Map comps = vc.getComponents();
    for (Iterator iter = comps.values().iterator(); iter.hasNext();) {
      Component child = (Component) iter.next();
      renderer.renderBodyOnLoadJSFunctionCall(sb, child, rstate);
    }
  }
View Full Code Here

   * @param ureq
   * @param newTaid
   */
  private void dispatchRequest(UserRequest ureq, int newTaid) {
    if (!isEnabled(newTaid)) throw new AssertException("tab with id "+newTaid+" is not enabled, but was dispatched");
    Component oldSelComp = getTabAt(selectedPane)
    setSelectedPane(newTaid);
    Component newSelComp = getTabAt(selectedPane);
    fireEvent(ureq, new TabbedPaneChangedEvent(oldSelComp, newSelComp));
  }
View Full Code Here

   *
   * @param selectedPane The selectedPane to set
   */
  public void setSelectedPane(int selectedPane) {
    // get old selected component and remove it from render tree
    Component oldSelComp = getTabAt(this.selectedPane);
    remove(oldSelComp);
   
    // activate new
    this.selectedPane = selectedPane;
    Component newSelComp = getTabAt(selectedPane);
    super.put("atp", newSelComp);
    //setDirty(true); not needed since: line above marks this container automatically dirty
  }
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.Component

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.