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

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


      } else {
        tableFilterCtr = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
      }

      // table columns
      tableFilterCtr.addColumnDescriptor(new CustomRenderColumnDescriptor("table.header.node", 0, null,
          ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, new IndentedNodeRenderer()));
      tableFilterCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.details",1, null, ureq.getLocale()));
      tableFilterCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.attempts", 2, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));
      tableFilterCtr.addColumnDescriptor(new DefaultColumnDescriptor("table.header.score", 3, null, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT));
      tableFilterCtr.addColumnDescriptor(new BooleanColumnDescriptor("table.header.passed", 4, translate("passed.true"), translate("passed.false")));
View Full Code Here


    tableConfig.setDisplayRowCount(false);
    tableConfig.setPageingEnabled(false);
   
    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()));
   
    nodeTableModel = new NodeTableDataModel(nodesTableObjectArrayList, getTranslator());
View Full Code Here

    tableConfig.setSortingEnabled(true);
    TableController tableController = new TableController(tableConfig, ureq, getWindowControl(), getTranslator(), this);
    //    tableCtr.addColumnDescriptor(statisticManager.createColumnDescriptor(ureq, 0, null));
    IndentedStatisticNodeRenderer indentedNodeRenderer = new IndentedStatisticNodeRenderer(Util.createPackageTranslator(statisticManager.getClass(), ureq.getLocale()));
    indentedNodeRenderer.setSimpleRenderingOnExport(true);
    CustomRenderColumnDescriptor nodeCD = new CustomRenderColumnDescriptor("stat.table.header.node", 0,
        CLICK_NODE_ACTION, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_LEFT, indentedNodeRenderer) {
      @Override
      public int compareTo(int rowa, int rowb) {
        // order by original row order
        return new Integer(rowa).compareTo(rowb);
      }
    };
    tableController.addColumnDescriptor(nodeCD);

    int column = 1;
    List<String> headers = result.getHeaders();
    for (Iterator<String> it = headers.iterator(); it.hasNext();) {
      final String aHeader = it.next();
      final int aColumnId = column++;
      tableController.addColumnDescriptor(statisticManager.createColumnDescriptor(ureq, aColumnId, aHeader));
    }
   
    tableController.addColumnDescriptor(new CustomRenderColumnDescriptor("stat.table.header.total", column,
        StatisticDisplayController.CLICK_TOTAL_ACTION+column, ureq.getLocale(), ColumnDescriptor.ALIGNMENT_RIGHT, new TotalColumnRenderer()) {
      @Override
      public String getAction(int row) {
        if (row==table.getTableDataModel().getRowCount()-1) {
          return super.getAction(row);
View Full Code Here

    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header1", 0, null, ureq.getLocale()));
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header2", 1, null, ureq.getLocale()));
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header3", 2, null, ureq.getLocale()));
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header4", 3, null, ureq.getLocale()));
    table.addColumnDescriptor(new DefaultColumnDescriptor("guidemo.table.header5", 4, null, ureq.getLocale()));
    table.addColumnDescriptor(new CustomRenderColumnDescriptor("guidemo.table.header6", 5, null, ureq.getLocale(), CustomRenderColumnDescriptor.ALIGNMENT_CENTER, new ImageCellRenderer()));
    table.addColumnDescriptor(new StaticColumnDescriptor("action.select", "guidemo.table.header7", "Select"));
    model = new SampleTableModel();
    table.setTableDataModel(model);
    vcMain.put("table", table.getInitialComponent());
   
View Full Code Here

    tableConfig.setDisplayRowCount(false);
    tableConfig.setPageingEnabled(false);
   
    nodeListCtr = new TableController(tableConfig, ureq, getWindowControl(), this.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
View Full Code Here

TOP

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

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.