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

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


  private TreeModel buildTreeModel() {
    GenericTreeNode gtnChild, rootTreeNode;
    Translator translator = getTranslator();

    GenericTreeModel gtm = new GenericTreeModel();
    rootTreeNode = new GenericTreeNode();
    //there should be i18n key for main.menu.title for the rootNode in package of implementing type
    rootTreeNode.setTitle(translator.translate("main.menu.title"));
    rootTreeNode.setAltText(translator.translate("main.menu.title.alt"));
    gtm.setRootNode(rootTreeNode);

    // Prepend
    boolean rootNodeSet = false;
    if (nodesToPrepend.size() != 0) {
      for (GenericTreeNode node : nodesToPrepend) {
View Full Code Here


        nclr = navHandler.evaluateJumpToCourseNode(ureq, getWindowControl(), null, null, null);
      }
      if (!nclr.isVisible()) {
        getWindowControl().setWarning(translate("msg.nodenotavailableanymore"));
        content.setContent(null);
        luTree.setTreeModel(new GenericTreeModel());
        return false;
      }
    }

    treeModel = nclr.getTreeModel();
View Full Code Here

  }

  private TreeModel buildTreeModel() {
    GenericTreeNode root, gtn;

    GenericTreeModel gtm = new GenericTreeModel();
    root = new GenericTreeNode();
    root.setTitle(translate("menu.guest"));
    root.setUserObject("guest");
    root.setAltText(translate("menu.guest.alt"));
    gtm.setRootNode(root);

    gtn = new GenericTreeNode();
    gtn.setTitle(translate("menu.guestwelcome"));
    gtn.setUserObject("guestwelcome");
    gtn.setAltText(translate("menu.guestwelcome.alt"));
View Full Code Here

  }

  private TreeModel buildTreeModel() {
    GenericTreeNode root, gtn;

    GenericTreeModel gtm = new GenericTreeModel();
    root = new GenericTreeNode();
    root.setTitle(translate("menu.root"));
    root.setUserObject(MENU_ROOT);
    root.setAltText(translate("menu.root.alt"));
    gtm.setRootNode(root);

    gtn = new GenericTreeNode();
    gtn.setTitle(translate("menu.mysettings"));
    gtn.setUserObject(MENU_MYSETTINGS);
    gtn.setAltText(translate("menu.mysettings.alt"));
View Full Code Here

            calendarNode.addChild(eventNode);
          }
        }
        if (rootNode.getChildCount() != 0) {
          // add matching events to tree
          GenericTreeModel treeModel = new GenericTreeModel();
          treeModel.setRootNode(rootNode);
          eventSelectionTree.setTreeModel(treeModel);
          panel.setContent(eventSelectionTree);
        } else {
          // no matching events       
          this.showInfo("cal.search.noMatches");
View Full Code Here

        nclr = navHandler.evaluateJumpToCourseNode(ureq, getWindowControl(), null, null, null);
      }
      if (!nclr.isVisible()) {
        MessageController msgController = MessageUIFactory.createInfoMessage(ureq, this.getWindowControl(),  translate("course.noaccess.title"), translate("course.noaccess.text"));
        contentP.setContent(msgController.getInitialComponent());         
        luTree.setTreeModel(new GenericTreeModel());
        return false;
      }
    }

    treeModel = nclr.getTreeModel();
View Full Code Here

   * @return The generated menu tree model
   */
  private TreeModel buildTreeModel() {
    GenericTreeNode root, gtn;
   
    GenericTreeModel gtm = new GenericTreeModel();
    root = new GenericTreeNode();
    root.setTitle(translate("menu.index"));
    root.setUserObject(CMD_INDEX);
    root.setAltText(translate("menu.index.alt"));
    gtm.setRootNode(root);

    if (archiverCallback.mayArchiveQtiResults()) {
      gtn = new GenericTreeNode();   
      gtn.setTitle(translate("menu.qtiresults"));
      gtn.setUserObject(CMD_QTIRESULTS);
View Full Code Here

 
  private TreeModel buildTreeModel() {
    GenericTreeNode root, gtn;
   
    GenericTreeModel gtm = new GenericTreeModel();
    root = new GenericTreeNode();
    root.setTitle(translate("menu.root"));
    root.setUserObject(ACTION_LOGIN);
    root.setAltText(translate("menu.root.alt"));
    gtm.setRootNode(root);
   
    gtn = new GenericTreeNode();
    gtn.setTitle(translate("menu.login"));
    gtn.setUserObject(ACTION_LOGIN);
    gtn.setAltText(translate("menu.login.alt"));
View Full Code Here

  private void doInitContextListLayout(UserRequest ureq) {
    // Layout is controlled with generic controller: menu - content - tools to
    // look the same as in the groupmanagement
    // 1) menu
    olatMenuTree = new MenuTree("olatMenuTree");
    GenericTreeModel gtm = new GenericTreeModel();
    GenericTreeNode root = new GenericTreeNode();
    if (groupType.equals(BusinessGroup.TYPE_RIGHTGROUP)) {
      root.setTitle(translate("rightmanagement.index"));
      root.setAltText(translate("rightmanagement.index.alt"));
    } else {
      root.setTitle(translate("groupmanagement.index"));
      root.setAltText(translate("groupmanagement.index.alt"));
    }
    gtm.setRootNode(root);
    olatMenuTree.setTreeModel(gtm);
    olatMenuTree.setSelectedNodeId(gtm.getRootNode().getIdent());
    // 2) context list
    contextListVC = createVelocityContainer("contextlist");
    // 3) tools
    toolC = ToolFactory.createToolController(getWindowControl());
    listenTo(toolC);
View Full Code Here

  private TreeModel buildTreeModel() {
    GenericTreeNode gtnChild, admin, confSub;
    Translator translator = getTranslator();
   
    GenericTreeModel gtm = new GenericTreeModel();
    admin = new GenericTreeNode();   
    admin.setTitle(translator.translate("menu.admin"));
    admin.setUserObject("admin");
    admin.setAltText(translator.translate("menu.admin.alt"));
    gtm.setRootNode(admin);

    //
    // The sysinfo stuff
    //
View Full Code Here

TOP

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

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.