Package org.olat.core.gui.control

Examples of org.olat.core.gui.control.Event


   */
  public void event(UserRequest ureq, Component source, Event event) {
    String command = event.getCommand();
    if (source == content) {
      if (command.equals(ACTION_GO)) {
        fireEvent(ureq, new Event(ureq.getModuleURI()));
      }
    }
  }
View Full Code Here


          CoordinatorManager.getCoordinator().getEventBus().fireEventToListenersOf(modifiedEvent, repositoryEntry);
         
          // do logging
          ThreadLocalUserActivityLogger.log(LearningResourceLoggingAction.REPOSITORY_ENTRY_PROPERTIES, getClass());
         
          fireEvent(ureq, new Event("courseChanged"));
        } else {     
          // yesNoCommitConfigsCtr => NO => do not change repository, reset changed flag
          repositoryEntryChanged = false;
        }
      }
View Full Code Here

  public void event(UserRequest urequest, Controller source, Event event) {
    if (source == tableCtr) { // process table actions
      TableEvent te = (TableEvent)event;
      selectedEntry =  (RepositoryEntry)tableCtr.getTableDataModel().getObject(te.getRowId());
      if (te.getActionId().equals(RepositoryTableModel.TABLE_ACTION_SELECT_ENTRY)) {
        fireEvent(urequest, new Event(RepositoryTableModel.TABLE_ACTION_SELECT_ENTRY));
        return;
      } else if (te.getActionId().equals(RepositoryTableModel.TABLE_ACTION_SELECT_LINK)) {
        fireEvent(urequest, new Event(RepositoryTableModel.TABLE_ACTION_SELECT_LINK));
        return;
      }
    }
    else if (event instanceof EntryChangedEvent) { // remove deleted entry
      EntryChangedEvent ecv = (EntryChangedEvent)event;
View Full Code Here

  @Override
  protected void formInnerEvent(UserRequest ureq, FormItem source, FormEvent event) {
    if(source == groupChoice) {
      fireEvent(ureq, Event.CHANGED_EVENT);
    } else if(source == exportButton) {
      fireEvent(ureq, new Event(EXPORT_TABLE));
    }
  }
View Full Code Here

    }
    // DB transaction must be in error state for this test
    try {
      ClusterLocker locker = new ClusterLocker();
      System.out.println("ClusterLocker created");
      Event event = new SignOnOffEvent(identity, false);
      System.out.println("START locker.event(event)");
      locker.event(event);
      System.out.println("DONE locker.event(event)");
    } catch(Exception ex) {
      System.err.println(ex);
View Full Code Here

  /**
   * @see org.olat.core.gui.control.DefaultController#event(org.olat.core.gui.UserRequest, org.olat.core.gui.components.Component, org.olat.core.gui.control.Event)
   */
  public void event(UserRequest ureq, Component source, Event event) {
    if (source == editProjectButton) {
      fireEvent(ureq, new Event("switchToEditMode"));
    } else if (source == deleteProjectButton) {
      OLATResourceable projectOres = OresHelper.createOLATResourceableInstance(Project.class, project.getKey());
      this.lock = CoordinatorManager.getCoordinator().getLocker().acquireLock(projectOres, ureq.getIdentity(), null);
      if (lock.isSuccess()) {
        deleteConfirmController = activateOkCancelDialog(ureq, null, translate("delete.confirm",project.getTitle()), deleteConfirmController);
View Full Code Here

    } else {
      currentPage.setFile((VFSLeaf) f);
      setContent(ureq, filePath);
    }
    fireEvent(ureq, new Event("Page loaded"));
  }
View Full Code Here

    page.setTitle(title.getValue());
    page.setMetadata(metadata);
   
    if (buttonClickedIndex == 0) {
      this.flc.setDirty(true);
      fireEvent(ureq, new Event("saved"));
    } else {
      fireEvent(ureq, Event.DONE_EVENT);
    }
  }
View Full Code Here

      offCommand = LinkFactory.createLink("command.glossary.off", mainVC, this);
      offCommand.setTitle("command.glossary.off.alt");
      offCommand.setCustomEnabledLinkCSS("b_toolbox_toggle");
      // notify textmarker controller
      glossMarkupItmCtr.setTextMarkingEnabled(true);
      fireEvent(ureq, new Event("glossaryOn"));

    } else if (source == offCommand) {
      // toggle off
      Preferences prefs = ureq.getUserSession().getGuiPreferences();
      prefs.put(CourseGlossaryToolLinkController.class, guiPrefsKey, Boolean.FALSE);
      prefs.save();
      // update gui
      mainVC.remove(offCommand);
      onCommand = LinkFactory.createLink("command.glossary.on", mainVC, this);
      onCommand.setTitle("command.glossary.on.alt");
      onCommand.setCustomEnabledLinkCSS("b_toolbox_toggle");
      // notify textmarker controller
      glossMarkupItmCtr.setTextMarkingEnabled(false);
      fireEvent(ureq, new Event("glossaryOff"));
    } else if (source == mainVC && event.getCommand().equals("command.glossary")){
      // start glossary in window
      final CourseConfig cc = courseEnvir.getCourseConfig(); // do not cache cc, not save
     
      // if glossary had been opened from LR as Tab before, warn user:
View Full Code Here

        parentTargetNode.insert(newNode, targetPos);
        // insert into model
        parentTargetNode.insertQTIObjectAt(qtiItem, targetPos);
        // activate copied node
        menuTree.setSelectedNodeId(newNode.getIdent());
        event(ureq, menuTree, new Event(MenuTree.COMMAND_TREENODE_CLICKED));
        qtiPackage.serializeQTIDocument();
      }
    } else if (source == insertTree) { // catch insert operations
      cmc.deactivate();
      removeAsListenerAndDispose(cmc);
      cmc = null;
     
      TreeEvent te = (TreeEvent) event;
      if (te.getCommand().equals(TreeEvent.COMMAND_TREENODE_CLICKED)) { // insert
        // new
        // node
        String nodeId = te.getNodeId();
        TreePosition tp = insertTreeModel.getTreePosition(nodeId);
        GenericQtiNode parentTargetNode = (GenericQtiNode) tp.getParentTreeNode();
        // insert into menu tree
        parentTargetNode.insert(insertObject, tp.getChildpos());
        // insert into model
        parentTargetNode.insertQTIObjectAt(insertObject.getUnderlyingQTIObject(), tp.getChildpos());
        // activate inserted node
        menuTree.setSelectedNodeId(insertObject.getIdent());
        event(ureq, menuTree, new Event(MenuTree.COMMAND_TREENODE_CLICKED));
        qtiPackage.serializeQTIDocument();
      }
    } else if (source == exitVC) {
      if (event.getCommand().equals(CMD_EXIT_SAVE)) {
        if (isRestrictedEdit() && history.size() > 0) {
View Full Code Here

TOP

Related Classes of org.olat.core.gui.control.Event

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.