Package org.olat.core.gui.components.tree

Examples of org.olat.core.gui.components.tree.TreeModel


   *
   * @param ureq
   */
  public void init(UserRequest ureq) {
    olatMenuTree = new MenuTree("olatMenuTree");
    TreeModel tm = buildTreeModel();
    olatMenuTree.setTreeModel(tm);
    content = new Panel("content");
    // no child -> show a blank page
    if (tm.getRootNode().getChildCount() > 0) {
      INode firstNode = tm.getRootNode();
      olatMenuTree.setSelectedNodeId(firstNode.getIdent());
      olatMenuTree.addListener(this);

      Object uobject = tm.getRootNode().getUserObject();
      contentCtr = getContentCtr(uobject, ureq);
      listenTo(contentCtr); // auto dispose later
      Component resComp = contentCtr.getInitialComponent();
      content.setContent(resComp);
    }
View Full Code Here


   */
  public GuestHomeMainController(UserRequest ureq, WindowControl wControl) {
    super(ureq, wControl);

    olatMenuTree = new MenuTree("olatMenuTree");
    TreeModel tm = buildTreeModel();
    olatMenuTree.setTreeModel(tm);
    olatMenuTree.setSelectedNodeId(tm.getRootNode().getIdent());
    olatMenuTree.addListener(this);

    welcome = createVelocityContainer("guestwelcome");

    // add portal
    myPortal = PortalFactory.createPortal("guestportal", getWindowControl(), ureq);
    welcome.put("myPortal", myPortal.getInitialComponent());

    // Activate correct position in menu
    INode firstNode = tm.getRootNode().getChildAt(0);
    olatMenuTree.setSelectedNodeId(firstNode.getIdent());

    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, null, welcome, null);
    listenTo(columnLayoutCtr); // cleanup on dispose
    // add background image to home site
View Full Code Here

    super(ureq, updateBusinessPath(ureq,wControl));
   
    addLoggingResourceable(LoggingResourceable.wrap(ureq.getIdentity()));
   
    olatMenuTree = new MenuTree("olatMenuTree");
    TreeModel tm = buildTreeModel();
    olatMenuTree.setTreeModel(tm);
    olatMenuTree.setSelectedNodeId(tm.getRootNode().getIdent());
    olatMenuTree.addListener(this);
    // Activate correct position in menu
    olatMenuTree.setSelectedNode(tm.getRootNode());
    setState("root");

    // prepare main panel
    content = new Panel("content");
    content.setContent(createRootComponent(ureq));
View Full Code Here

    clonedArgs[cnt-1] = CheckboxElementComponent.RENDERARG_ESCAPEHTML;//
   
    SelectionTreeComponent stc = (SelectionTreeComponent)source;
    Map<String,Component> checkboxes = stc.getSubComponents();
   
    TreeModel tm = stc.getTreeModel();
    TreeNode rootNode = tm.getRootNode();
   
    sb.append("<div class=\"b_selectiontree\">");   
    renderRootNode(rootNode, sb);
    renderChildNodes(rootNode, "", stc.hashCode(), sb, renderer, checkboxes, args);   
    sb.append("</div>");
View Full Code Here

    intro = createVelocityContainer("archiver_index");
    main.setContent(intro);

    // Navigation menu
    menuTree = new MenuTree("menuTree");       
    TreeModel tm = buildTreeModel();
    menuTree.setTreeModel(tm);
    menuTree.setSelectedNodeId(tm.getRootNode().getIdent());
    menuTree.addListener(this);

    // Tool and action box
    toolC = ToolFactory.createToolController(getWindowControl());
    listenTo(toolC);
View Full Code Here

    content = initLoginContent(ureq, null);
    dmzPanel.pushContent(content);

    // DMZ navigation
    olatMenuTree = new MenuTree("olatMenuTree");       
    TreeModel tm = buildTreeModel();
    olatMenuTree.setTreeModel(tm);
    olatMenuTree.setSelectedNodeId(tm.getRootNode().getIdent());
    olatMenuTree.addListener(this);

    // Activate correct position in menu
    INode firstChild = tm.getRootNode().getChildAt(0);
    olatMenuTree.setSelectedNodeId(firstChild.getIdent());

    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), olatMenuTree, null, dmzPanel, "useradminmain");
    columnLayoutCtr.addCssClassToMain("o_loginscreen");
    listenTo(columnLayoutCtr); // for later autodisposing
View Full Code Here

   */
  public SystemAdminMainController(UserRequest ureq, WindowControl wControl) {
    super(ureq, wControl);   
   
    olatMenuTree = new MenuTree("olatMenuTree");       
    TreeModel tm = buildTreeModel();
    olatMenuTree.setTreeModel(tm);
    INode firstNode = tm.getRootNode().getChildAt(0);
    olatMenuTree.setSelectedNodeId(firstNode.getIdent());
    olatMenuTree.addListener(this);

    String cmd = (String) tm.getRootNode().getUserObject();
    contentCtr = createController(cmd, ureq);
    listenTo(contentCtr); // auto dispose later
    Component resComp = contentCtr.getInitialComponent();
   
    content = new Panel("content");
View Full Code Here

    initVC();

    // Layout is controlled with generic controller: menu - content - tools
    // Navigation menu
    this.olatMenuTree = new MenuTree("olatMenuTree");
    TreeModel tm = buildTreeModel();
    this.olatMenuTree.setTreeModel(tm);
    this.olatMenuTree.setSelectedNodeId(tm.getRootNode().getIdent());
    this.olatMenuTree.addListener(this);
    // Content
    this.content = new Panel("content");
    // Tools
    // 1 create empty Tools and init menuAndToolController
View Full Code Here

    mainPanel = new Panel("p_buddygroupRun");
    mainPanel.setContent(main);
    //
    bgTree = new MenuTree("bgTree");
    TreeModel trMdl = buildTreeModel();
    bgTree.setTreeModel(trMdl);
    bgTree.addListener(this);
    //
    columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), bgTree, null, mainPanel, "grouprun");
    listenTo(columnLayoutCtr); // cleanup on dispose
View Full Code Here

        mainPanel.setContent(main);
      }
    } else if (source == bgEditCntrllr) {
      // changes from the admin controller
      if (event == Event.CHANGED_EVENT) {
        TreeModel trMdl = buildTreeModel();
        bgTree.setTreeModel(trMdl);
      } else if (event == Event.CANCELLED_EVENT) {
        // could not get lock on business group, back to inital screen
        bgTree.setSelectedNodeId(bgTree.getTreeModel().getRootNode().getIdent());
        mainPanel.setContent(main);
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.tree.TreeModel

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.