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

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


  /**
   * @return TreeModel
   */
  private TreeModel buildTreeModel() {
    GenericTreeModel gtm = new GenericTreeModel();

    GenericTreeNode rootNode = new GenericTreeNode();
    rootNode.setTitle(translate("menu.index"));
    rootNode.setUserObject(CMD_MENU_INDEX);
    rootNode.setAltText(translate("menu.index.alt"));
    gtm.setRootNode(rootNode);

    GenericTreeNode myEntriesTn = new GenericTreeNode();
    myEntriesTn.setTitle(translate("menu.buddygroups"));
    myEntriesTn.setUserObject(CMD_MENU_BUDDY);
    myEntriesTn.setAltText(translate("menu.buddygroups.alt"));
View Full Code Here


   * @return The menu tree model
   */
  private TreeModel buildTreeModel() {
    GenericTreeNode gtnChild, root;

    GenericTreeModel gtm = new GenericTreeModel();
    root = new GenericTreeNode();
    root.setTitle(businessGroup.getName());
    root.setUserObject(ACTIVITY_MENUSELECT_OVERVIEW);
    root.setAltText(translate("menutree.top.alt") + " " + businessGroup.getName());
    root.setIconCssClass("b_group_icon");
    gtm.setRootNode(root);
   
    CollaborationTools collabTools = CollaborationToolsFactory.getInstance().getOrCreateCollaborationTools(this.businessGroup);

    if (collabTools.isToolEnabled(CollaborationTools.TOOL_NEWS)) {
      gtnChild = new GenericTreeNode();
View Full Code Here

  }

  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);

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

      mainToolC = null;
    }
  }

  private TreeModel buildTreeModel(boolean bIsAuthor) {
    GenericTreeModel gtm = new GenericTreeModel();
    GenericTreeNode rootNode = new GenericTreeNode(translate("search.home"), "search.home");
    gtm.setRootNode(rootNode);

    // TODO:catalog not yet finished :
    rootNode.addChild(new GenericTreeNode(translate("search.catalog"), "search.catalog"));

    // check if repository portlet is configured in olat_portals.xml
View Full Code Here

      //fill the user list for the
      this.mode = MODE_USERFOCUS;
      this.identitiesList = getAllIdentitisFromGroupmanagement();
      doSimpleUserChoose(ureq, this.identitiesList);
     
      GenericTreeModel menuTreeModel = (GenericTreeModel)menuTree.getTreeModel();
      TreeNode userNode = menuTreeModel.findNodeByUserObject(CMD_USERFOCUS);
      if(userNode != null) {
        menuTree.setSelectedNode(userNode);
      }
     
      // select user
View Full Code Here

   * @return The tree model
   */
  private TreeModel buildTreeModel(boolean hasAssessableNodes) {
    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);

    // show real menu only when there are some assessable nodes
    if (hasAssessableNodes) { 
      gtn = new GenericTreeNode();
      gtn.setTitle(translate("menu.groupfocus"));
View Full Code Here

  }

  private TreeModel buildTreeModel(UserRequest ureq) {
    GenericTreeNode root, gtn;

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

    if (!this.bgContext.isDefaultContext() || ureq.getUserSession().getRoles().isOLATAdmin()) {
      gtn = new GenericTreeNode();
      gtn.setTitle(translate("menu.editcontext"));
      gtn.setUserObject(CMD_EDITCONTEXT);
View Full Code Here

  private TreeModel buildTreeModel(boolean isOlatAdmin) {
    GenericTreeNode gtnChild, admin;
    Map configuration = BaseSecurityModule.getConfiguration();
    Translator translator = getTranslator();
   
    GenericTreeModel gtm = new GenericTreeModel();
    admin = new GenericTreeNode();   
    admin.setTitle(translator.translate("menu.useradmin"));
    admin.setUserObject("useradmin");
    admin.setAltText(translator.translate("menu.useradmin.alt"));
    gtm.setRootNode(admin);

    gtnChild = new GenericTreeNode();   
    gtnChild.setTitle(translator.translate("menu.usearch"));
    gtnChild.setUserObject("usearch");
    gtnChild.setAltText(translator.translate("menu.usearch.alt"));
View Full Code Here

    return gtm;
  }
 
  public void activate(UserRequest ureq, String viewIdentifier) {
    if(viewIdentifier.startsWith("notifications")) {
      GenericTreeModel tm = (GenericTreeModel)olatMenuTree.getTreeModel();
      TreeNode node = tm.findNodeByUserObject("created.newUsersNotification");
      olatMenuTree.setSelectedNode(node);
      Component resComp = initComponentFromMenuCommand("created.newUsersNotification", ureq);
      content.setContent(resComp);
    }
  }
View Full Code Here

    sb.append(chosenIdentity.getUser().getProperty(UserConstants.LASTNAME, ureq.getLocale()));
    this.firstLastName = sb.toString();

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

    LayoutMain3ColsController columnLayoutCtr = new LayoutMain3ColsController(ureq, getWindowControl(), menuTree, null, main, "userinfomain");
    listenTo(columnLayoutCtr);
    //
    putInitialPanel(columnLayoutCtr.getInitialComponent());
   
    // Activate child controllers if a usable context entry is found
    BusinessControl bc = getWindowControl().getBusinessControl();
    ContextEntry ce = bc.popLauncherContextEntry();
    if (ce != null) { // a context path is left for me
      OLATResourceable ores = ce.getOLATResourceable();
      if (OresHelper.equals(ores, BUSINESS_CONTROL_TYPE_FOLDER)) {
        // Activate folder controller
        menuTree.setSelectedNode(tm.findNodeByUserObject(CMD_FOLDER));
        main.setContent(createComponent(ureq, CMD_FOLDER, chosenIdentity));
      }
    }

  }
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.