Package org.olat.core.util.nodes

Examples of org.olat.core.util.nodes.INode


    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
    putInitialPanel(columnLayoutCtr.getInitialComponent());
View Full Code Here


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

    // we always start with a search controller
    contentCtr = new UsermanagerUserSearchController(ureq, getWindowControl());
    listenTo(contentCtr); // auto dispose later
View Full Code Here

    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
View Full Code Here

      it.remove();
    }
   
    int childCount = node.getChildCount();
    for(int i = 0; i < childCount; i++) {
      INode n = node.getChildAt(i);
      if(n instanceof CourseNode) {
        doAddQueryListResultsForNodeAndChildren((CourseNode)n, result, groupByKeys);
      }
    }
  }
View Full Code Here

    if (row>=orderedNodesList_.size()) {
      throw new IllegalStateException("row count too big: "+row+", only having "+orderedNodesList_.size()+" elements");
    }
    CourseNode node = orderedNodesList_.get(row);
    int recursionLevel = 0;
    INode parent = node.getParent();
    while(parent!=null) {
      recursionLevel++;
      parent = parent.getParent();
    }
   
    // Store node data in hash map. This hash map serves as data model for
    // the user assessment overview table. Leave user data empty since not used in
    // this table. (use only node data)
View Full Code Here

   * @return <code>true</code> if all course node configurations are valid,
   *         <code>false</code> if at least one course node has a config
   *         error.
   */
  private boolean isAllParentsConfigValid(CourseEditorTreeNode child) {
    INode parent = child.getParent();
    if(parent==null) {
      return !child.getCourseNode().isConfigValid().isError();
    }else {
      boolean myConfigIsValid = !child.getCourseNode().isConfigValid().isError();
      if(myConfigIsValid) {
View Full Code Here

    List<AjaxTreeNode> childAjaxTreeNodes = new ArrayList<AjaxTreeNode>();
    TreeNode treeNode = findNode(nodeId, getRootNode());
    // Now build the ajax tree nodes for each child
    int childCount = treeNode.getChildCount();
    for (int i = 0; i < childCount; i++) {
      INode childNode = treeNode.getChildAt(i);
      AjaxTreeNode childAjaxNode = buildAjaxTreeNode((TreeNode) childNode);
      childAjaxTreeNodes.add(childAjaxNode);
    }
    return childAjaxTreeNodes;   
  }
View Full Code Here

      return false;
    } else if (currentRunStructure.getNode(cetn.getCourseNode().getIdent()) == null) {
      // No course node in runstructure
      return true;
    } else {
      INode node = currentRunStructure.getNode(cetn.getCourseNode().getIdent());
      String runPath = getPositionPathFor(node);
      String editorPath = getPositionPathFor(cetn);
      return (!(runPath.equals(editorPath))) && cetn.isDirty(); // TODO: pb: Review : cetn.isDirty() added by chg to FIX OLAT-1662
    }
  }
View Full Code Here

    }
  }

  private String getPositionPathFor(INode node) {
    String path = "";
    INode parent = node.getParent();
    if (parent == null) {
      path = "__root__";
    }
    while (parent!= null) {
      path += parent.getIdent() + ":" + node.getPosition() + "]";
      parent = parent.getParent();
    }
    return path;
  }
View Full Code Here

TOP

Related Classes of org.olat.core.util.nodes.INode

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.