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

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


    tableConfig.setSortingEnabled(true);
    tableConfig.setTableEmptyMessage("manual.sorting.no.entries.found");
    tableController = new TableController(tableConfig, ureq, getWindowControl(), this.getTranslator(), this);
    int maxNumColumns = tableDataModel.getColumnCount();
    int columnCounter=0;
    tableController.addColumnDescriptor(new DefaultColumnDescriptor("table.manual.sorting.title", columnCounter++, null, ureq.getLocale()));
    if(maxNumColumns==2){
      tableController.addColumnDescriptor(new DefaultColumnDescriptor("table.manual.sorting.date", columnCounter++, null, ureq.getLocale()));
    } else {
      tableController.addColumnDescriptor(new DefaultColumnDescriptor("table.manual.sorting.description", columnCounter++, null, ureq.getLocale()));
    }
    if(maxNumColumns==4) {
      tableController.addColumnDescriptor(new DefaultColumnDescriptor("table.manual.sorting.type", columnCounter++, null, ureq.getLocale()));
    }
    tableController.addMultiSelectAction("action.choose", ACTION_MULTISELECT_CHOOSE);
    tableController.addMultiSelectAction("action.cancel", ACTION_MULTISELECT_CANCEL);
    tableController.setTableDataModel(tableDataModel);
    tablePanel.setContent(tableController.getInitialComponent());
View Full Code Here


    TableGuiConfiguration summaryTableConfig = new TableGuiConfiguration();
    summaryTableConfig.setDownloadOffered(true);
    summaryTableConfig.setTableEmptyMessage(getTranslator().translate("version.noRevisions"));

    revisionListTableCtr = new TableController(summaryTableConfig, ureq, getWindowControl(), getTranslator(), null);
    revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.nr", 0, null, ureq.getLocale()) {
      @Override
      public int compareTo(int rowa, int rowb) {
        Object a = table.getTableDataModel().getValueAt(rowa, dataColumn);
        Object b = table.getTableDataModel().getValueAt(rowb, dataColumn);
        if (a == null || b == null) {
          boolean bb = (b == null);
          return (a == null) ? (bb ? 0: -1) : (bb ? 1: 0);
        }
        try {
          Long la = new Long((String)a);
          Long lb = new Long((String)b);
          return la.compareTo(lb);
        } catch (NumberFormatException e) {
          return super.compareTo(rowa, rowb);
        }
      }
    });
    revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.author", 1, null, ureq.getLocale()));
    revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.comment", 2, null, ureq.getLocale()));
    revisionListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.date", 3, null, ureq.getLocale()));
    revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_DOWNLOAD, "version.download", getTranslator().translate(
        "version.download")));
    revisionListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_RESTORE, "version.restore", getTranslator().translate(
        "version.restore")));
View Full Code Here

    TableGuiConfiguration summaryTableConfig = new TableGuiConfiguration();
    summaryTableConfig.setDownloadOffered(false);
    summaryTableConfig.setTableEmptyMessage(getTranslator().translate("version.noDeletedFiles"));

    deletedFilesListTableCtr = new TableController(summaryTableConfig, ureq, getWindowControl(), getTranslator(), null);
    deletedFilesListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.name", 0, null, ureq.getLocale()));
    deletedFilesListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.author", 1, null, ureq.getLocale()));
    deletedFilesListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.deletedBy", 2, null, ureq.getLocale()));
    deletedFilesListTableCtr.addColumnDescriptor(new DefaultColumnDescriptor("version.date", 3, null, ureq.getLocale()));
    deletedFilesListTableCtr.addColumnDescriptor(new StaticColumnDescriptor(CMD_DOWNLOAD, "version.download", getTranslator().translate(
        "version.download")));

    VFSSecurityCallback secCallback = VFSManager.findInheritedSecurityCallback(container);
    if (secCallback != null) {
View Full Code Here

   * @param selectButtonLabel Label of action row or null if no action row should be used
   * @param enableDirectLaunch
   */
  public void addColumnDescriptors(TableController tableCtr) {
    if (chatEnabled) {
      tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.username", 0, TABLE_ACTION_LAUNCH_CLIENT, translator.getLocale()));
    } else {
      tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.username", 0, null, translator.getLocale()));
    }
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.prename", 1, null, translator.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.name", 2, null, translator.getLocale()));
    tableCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.IMstatus", 3, null,
        translator.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IMStatusIconRenderer()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.resource", 4, null, translator.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.awareness", 5, null, translator.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.onlineTime", 6, null, translator.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.lastActivity", 7, null, translator.getLocale()));
  }
View Full Code Here

    tableConfig.setPageingEnabled(false);
    tableConfig.setDownloadOffered(false);
    //disable the default sorting for this table
    tableConfig.setSortingEnabled(false);
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    DefaultColumnDescriptor cd0 = new DefaultColumnDescriptor("table.header.course", 0, CMD_LAUNCH, trans.getLocale());
    cd0.setIsPopUpWindowAction(true, "height=600, width=800, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
    tableCtr.addColumnDescriptor(cd0);
   
    this.sortingCriteria = getPersistentSortingConfiguration(ureq);
    reloadModel(sortingCriteria);
View Full Code Here

 
  /**
   * @see org.olat.core.id.UserField#getColumnDescriptor(int, java.lang.String, java.util.Locale)
   */
  public ColumnDescriptor getColumnDescriptor(int position, String action, Locale locale) {
    return new DefaultColumnDescriptor(i18nColumnDescriptorLabelKey(), position, action, locale);   
  }
View Full Code Here

    tableConfig.setDownloadOffered(false);
    //disable the default sorting for this table
    tableConfig.setSortingEnabled(false);
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    // dummy header key, won't be used since setDisplayTableHeader is set to false
    DefaultColumnDescriptor cd0 = new DefaultColumnDescriptor("notesPortlet.bgname", 0, CMD_LAUNCH, trans.getLocale());
    cd0.setIsPopUpWindowAction(true, "height=550, width=750, location=no, menubar=no, resizable=yes, status=no, scrollbars=yes, toolbar=no");
    tableCtr.addColumnDescriptor(cd0);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("notesPortlet.type", 1, null, trans.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));

    this.sortingCriteria = getPersistentSortingConfiguration(ureq);
    reloadModel( sortingCriteria);
    this.notesVC.put("table", tableCtr.getInitialComponent());
   
View Full Code Here

    main = createVelocityContainer("qtires");
    details = createVelocityContainer("qtires_details");
   
    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("column.header.date", 0, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("column.header.duration", 1, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("column.header.assesspoints", 2, null, ureq.getLocale()));
    tableCtr.addColumnDescriptor(new StaticColumnDescriptor("sel", "column.header.details", getTranslator().translate("select")));

    QTIResultManager qrm = QTIResultManager.getInstance();
    tableModel = new QTIResultTableModel(
        qrm.getResultSets(courseResourceableId, nodeIdent, repositoryEntry.getKey(), identity));
View Full Code Here

    tableConfig.setDownloadOffered(false);
    //disable the default sorting for this table
    tableConfig.setSortingEnabled(false);
    tableCtr = new TableController(tableConfig, ureq, getWindowControl(), trans, this);
    // dummy header key, won't be used since setDisplayTableHeader is set to false
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("notificationsPortlet.bgname", 0, CMD_LAUNCH, trans.getLocale()));
    tableCtr.addColumnDescriptor(new DefaultColumnDescriptor("notificationsPortlet.type", 1, null, trans.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));
 
    this.sortingCriteria = getPersistentSortingConfiguration(ureq);
    man = NotificationsManager.getInstance();
    // default use the interval
    compareDate = man.getCompareDateFromInterval(man.getUserIntervalOrDefault(ureq.getIdentity()));
View Full Code Here

    TableGuiConfiguration tableConfig = new TableGuiConfiguration();
    tableConfig.setDownloadOffered(false);
    tableConfig.setTableEmptyMessage(translate("note.nonotes"));
    tableC = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), null);
    listenTo(tableC); // autodispose on controller dispose
    tableC.addColumnDescriptor(new DefaultColumnDescriptor("table.note.title", 0, "choose", ureq.getLocale()));
    tableC.addColumnDescriptor(new DefaultColumnDescriptor("table.note.resource", 1, null, ureq.getLocale()));
    tableC.addColumnDescriptor(new StaticColumnDescriptor("delete", "table.header.delete", translate(
        "action.delete")));
    populateNLTable();

    putInitialPanel(tableC.getInitialComponent());
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.