Package org.olat.core.gui.components.table

Examples of org.olat.core.gui.components.table.DefaultColumnDescriptor


   * @param showRemoveAction true: remove link will be showed; false: remove
   *          link is not showed
   * @param trans Translator for translating the delete action
   */
  public void addColumnDescriptors(TableController tableCtr, boolean showRemoveAction, Translator trans) {
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("categorieslist.header.category", 0, ACTION_GOTO, getLocale()));
    if (showRemoveAction) {
      tableCtr.addColumnDescriptor(new StaticColumnDescriptor(ACTION_DELETE, "categorieslist.header.action", trans.translate("delete")));
      cols = 2;
    }
  }
View Full Code Here


  }

  public void addColumnDescriptors(TableController tableCtr) {
    tableCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.filename", 0, WikiMainController.ACTION_SHOW_MEDIA,
        getLocale(), 1, new StrikeThroughCellRenderer()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.created.by", 1, null, getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.creation.date", 2, null, getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.deleted.by", 3, null, getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.deleted.at", 4, null, getLocale()));
  }
View Full Code Here

  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
      return new DefaultColumnDescriptor("stat.table.header.node", 0, null, ureq.getLocale());
    }

/*    if (headerId!=null) {
      Translator translator = Util.createPackageTranslator(ShibbolethModule.class, ureq.getLocale());
      if (translator!=null) {
View Full Code Here

  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
      return new DefaultColumnDescriptor("stat.table.header.node", 0, null, ureq.getLocale());
    }
   
    if (headerId!=null) {
      Translator translator = Util.createPackageTranslator(ShibbolethModule.class, ureq.getLocale());
      if (translator!=null) {
View Full Code Here

    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    // table columns
    nodeListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.node", 0, null, ureq.getLocale(),
        ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
    nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1, CMD_SELECT_NODE, ureq.getLocale()));

    // get list of course node data and populate table data model
    ICourse course = CourseFactory.loadCourse(ores);
    CourseNode rootNode = course.getRunStructure().getRootNode();
    List nodesTableObjectArrayList = addNodesAndParentsToList(0, rootNode);
View Full Code Here

  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
      return new DefaultColumnDescriptor("stat.table.header.node", 0, null, ureq.getLocale());
    }
    String hourOfDayLocaled = headerId;
   
    try{
      Calendar c = Calendar.getInstance(ureq.getLocale());
View Full Code Here

    tableConfig.setPageingEnabled(false);
    tableConfig.setDownloadOffered(false);
    tableController = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    // dummy header key, won't be used since setDisplayTableHeader is set to
    // false
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("calendar.date", 0, null, trans.getLocale()));
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("calendar.subject", 1, CMD_LAUNCH, trans.getLocale(),
        ColumnDescriptor.ALIGNMENT_LEFT));
   
   
    List events = getMatchingEvents(ureq, wControl);
    tableController.setTableDataModel(new EventsModel(events, ureq.getLocale(), trans));
View Full Code Here

  }

  public void addColumnDescriptors(TableController tableCtr) {
    Locale loc = translator.getLocale();
    if (callback != null) {
      DefaultColumnDescriptor coldesc = new DefaultColumnDescriptor("table.header.filename", 0, DialogElementsController.ACTION_SHOW_FILE,
          loc);
      coldesc.setHrefGenerator(new HrefGenerator() {
        public String generate(int row, String href) {
          DialogElement entry = getEntryAt(row);
          return "javascript:o_openPopUp('" + href + entry.getFilename() + "','fileview','600','700','no')";
        }
      });
//      coldesc.setIsPopUpWindowAction(true,
//      DefaultColumnDescriptor.DEFAULT_POPUP_ATTRIBUTES);
      tableCtr.addColumnDescriptor(coldesc);
    } else {
      tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.filename", 0, null, loc));
    }
    if (callback != null) {
      StaticColumnDescriptor statColdesc = new StaticColumnDescriptor(DialogElementsController.ACTION_START_FORUM, "table.header.forum",
          translator.translate("dialog.start"));
      // if configured open forum as popup
      String integration = (String) config.get(DialogConfigForm.DIALOG_CONFIG_INTEGRATION);
      if (integration.equals(DialogConfigForm.CONFIG_INTEGRATION_VALUE_POPUP)) {
        statColdesc.setIsPopUpWindowAction(true, DefaultColumnDescriptor.DEFAULT_POPUP_ATTRIBUTES);
      }
      tableCtr.addColumnDescriptor(statColdesc);
    }
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.author", 1, null, loc));
    tableCtr.addColumnDescriptor(false, new DefaultColumnDescriptor("table.header.size", 2, null, loc));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.date", 3, null, loc));
    if (callback != null) tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.newmessages", 4, null, loc));
    if (callback != null) tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.messages", 5, null, loc));
    // callback is null in course editor environement where we dont need
    // security calls
    if (callback != null && callback.mayDeleteMessageAsModerator()) tableCtr.addColumnDescriptor(new StaticColumnDescriptor(
        DialogElementsController.ACTION_DELETE_ELEMENT, "table.header.action", translator.translate("delete")));
  }
View Full Code Here

  }
 
  @Override
  public ColumnDescriptor createColumnDescriptor(UserRequest ureq, int column, String headerId) {
    if (column==0) {
      return new DefaultColumnDescriptor("stat.table.header.node", 0, null, ureq.getLocale());
    }

    if (headerId!=null) {
      Translator translator = Util.createPackageTranslator(ShibbolethModule.class, ureq.getLocale());
      if (translator!=null) {
View Full Code Here

   
    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    // table columns   
    nodeListCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.node", 0,
        null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
    nodeListCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.action.select", 1,
        CMD_SELECT_NODE, ureq.getLocale()));
   
    // get list of course node data and populate table data model
    ICourse course = CourseFactory.loadCourse(ores);
    CourseNode rootNode = course.getRunStructure().getRootNode();
View Full Code Here

TOP

Related Classes of org.olat.core.gui.components.table.DefaultColumnDescriptor

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.