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

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


    repositoryEntry = RepositoryManager.getInstance().lookupRepositoryEntry(course, false);
    accessForm = new AccessForm("accessForm", repositoryEntry, new PackageTranslator(ACCESS_PACKAGE, ureq.getLocale(),getTranslator()));
    accessForm.addListener(this);
    main.put("accessForm", accessForm);
   
    selectionTree = new SelectionTree("selTree", getTranslator());
//REFACTOR  selectionTree.setTreeModel(publishTreeModel);
    selectionTree.setMultiselect(true);
    selectionTree.setActionCommand(ACTION_PUBLISH);
    selectionTree.setFormButtonKey("command.publish");
    selectionTree.setGreyOutNonSelectableEntries(true);
View Full Code Here


  public CourseLinkProviderController(ICourse course, UserRequest ureq, WindowControl wControl) {
    super(ureq, wControl, new PackageTranslator(Util.getPackageName(CalendarManager.class), ureq.getLocale()));
    this.ores = course;
    setVelocityRoot(Util.getPackageVelocityRoot(CalendarManager.class))
    clpVC = createVelocityContainer("calCLP")
    selectionTree = new SelectionTree("clpTree", getTranslator());
    selectionTree.addListener(this);
    selectionTree.setMultiselect(true);
    selectionTree.setAllowEmptySelection(true);
    selectionTree.setShowCancelButton(true);
    selectionTree.setFormButtonKey(CAL_LINKS_SUBMIT);
View Full Code Here

    super(wControl);
    this.translator = translator;
    this.kalendarEvent = kalendarEvent;
   
    mainVC = new VelocityContainer("calCopy", VELOCITY_ROOT + "/calCopy.html", translator, this);
    calendarSelectionTree = new SelectionTree("calSelection", translator);
    calendarSelectionTree.addListener(this);
    calendarSelectionTree.setMultiselect(true);
    calendarSelectionTree.setFormButtonKey("cal.copy.submit");
    calendarSelectionTree.setShowCancelButton(true);
    calendarSelectionTree.setTreeModel(new CalendarSelectionModel(calendars, kalendarEvent.getCalendar(), translator));
View Full Code Here

        if (clickedNode instanceof ItemNode && ((SectionNode) clickedNode.getParent()).getChildCount() == 1) {       
          getWindowControl().setError(translate("error.move.atleastoneitem"));
          return;
        }
        TreeNode selectedNode = menuTree.getSelectedNode();
        moveTree = new SelectionTree("moveTree", getTranslator());
        moveTree.setFormButtonKey("submit");
        insertTreeModel = new InsertItemTreeModel(menuTreeModel,
            (selectedNode instanceof SectionNode) ? InsertItemTreeModel.INSTANCE_ASSESSMENT : InsertItemTreeModel.INSTANCE_SECTION);
        moveTree.setTreeModel(insertTreeModel);
        moveTree.addListener(this);
        cmc = new CloseableModalController(getWindowControl(),translate("close"), moveTree, true, translate("title.move"));
        cmc.activate();
        listenTo(cmc);
       
      } else if (cmd.equals(CMD_TOOLS_CHANGE_COPY)) {
        copyTree = new SelectionTree("copyTree", getTranslator());
        copyTree.setFormButtonKey("submit");
        insertTreeModel = new InsertItemTreeModel(menuTreeModel, InsertItemTreeModel.INSTANCE_SECTION);
        copyTree.setTreeModel(insertTreeModel);
        copyTree.addListener(this);
        cmc = new CloseableModalController(getWindowControl(), translate("close"), copyTree, true, translate("title.copy"));
        cmc.activate();
        listenTo(cmc);
       
      } else if (cmd.startsWith(CMD_TOOLS_ADD_PREFIX)) { // add new object
        // fetch new object
        if (cmd.equals(CMD_TOOLS_ADD_SECTION)) {
          Section newSection = QTIEditHelper.createSection(getTranslator());
          Item newItem = QTIEditHelper.createSCItem(getTranslator());
          newSection.getItems().add(newItem);
          SectionNode scNode = new SectionNode(newSection, qtiPackage);
          ItemNode itemNode = new ItemNode(newItem, qtiPackage);
          scNode.addChild(itemNode);
          insertObject = scNode;
        } else if (cmd.equals(CMD_TOOLS_ADD_SINGLECHOICE)) insertObject = new ItemNode(QTIEditHelper.createSCItem(getTranslator()), qtiPackage);
        else if (cmd.equals(CMD_TOOLS_ADD_MULTIPLECHOICE)) insertObject = new ItemNode(QTIEditHelper.createMCItem(getTranslator()), qtiPackage);
        else if (cmd.equals(CMD_TOOLS_ADD_KPRIM)) insertObject = new ItemNode(QTIEditHelper.createKPRIMItem(getTranslator()), qtiPackage);
        else if (cmd.equals(CMD_TOOLS_ADD_FIB)) insertObject = new ItemNode(QTIEditHelper.createFIBItem(getTranslator()), qtiPackage);
        else if (cmd.equals(CMD_TOOLS_ADD_FREETEXT)) insertObject = new ItemNode(QTIEditHelper.createEssayItem(getTranslator()), qtiPackage);

        // prepare insert tree
        insertTree = new SelectionTree("insertTree", getTranslator());
        insertTree.setFormButtonKey("submit");
        if (cmd.equals(CMD_TOOLS_ADD_SECTION)) insertTreeModel = new InsertItemTreeModel(menuTreeModel,
            InsertItemTreeModel.INSTANCE_ASSESSMENT);
        else insertTreeModel = new InsertItemTreeModel(menuTreeModel, InsertItemTreeModel.INSTANCE_SECTION);
        insertTree.setTreeModel(insertTreeModel);
View Full Code Here

TOP

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

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.