Package org.gwtlib.client.table

Examples of org.gwtlib.client.table.Row$State


    }
   
    private Rows transform(Person[] persons) {
      Row[] rows = new Row[persons.length];
      for(int i = 0; i < persons.length; ++i) {
        rows[i] = new Row(i, new Object[] { persons[i].getFirst(), persons[i].getLast() });
      }
      return new Rows(rows, 0);
    }
View Full Code Here


          if(row == 0) {
            if(column.isSortable()) {
              sort(c, column.getSortDirection() != Column.Sort.ASCENDING);
            }
          } else {
            Row r = _cache.getRow(_begin + row - 1);
            if(r != null) {
              fireCellClickedEvent(r, column);
              fireRowClickedEvent(r);
            }
          }
View Full Code Here

  public void refreshRowState() {
    Rows rows = getRows(_begin);
    int r = 1;
    for(int i = 0; i < rows.size(); ++i, ++r) {
      Row row = rows.getRow(i);
      _table.getRowFormatter().setStyleName(r, STYLE_ROW);
      _table.getRowFormatter().addStyleName(r, i % 2 == 0 ? STYLE_ROW_EVEN : STYLE_ROW_ODD);
      if(row.hasState(Row.State.SELECT)) _table.getRowFormatter().addStyleName(r, STYLE_ROW_SELECT);
      for(int j = 0, c = 0; j < _layout.getTotalColumnCount(); ++j) {
        Column column = _layout.getColumn(j);
        if(column.isVisible()) {
          _table.getCellFormatter().removeStyleName(r, c, STYLE_COLUMN_SELECT);
          _table.getCellFormatter().removeStyleName(r, c, STYLE_CELL_SELECT);
          if(column.hasState(Column.State.SELECT)) {
            _table.getCellFormatter().addStyleName(r, c, STYLE_COLUMN_SELECT);
            if(row.hasState(Row.State.SELECT)) _table.getCellFormatter().addStyleName(r, c, STYLE_CELL_SELECT);
          }
          c++;
        }
      }
    }
View Full Code Here

  protected void render(int pos) {
    Rows rows = getRows(pos);
    GWT.log("Rendering " + rows.size() + " rows", null);
    int r = 1;
    for(int i = 0; i < rows.size(); ++i, ++r) {
      final Row row = rows.getRow(i);
      for(int j = 0, c = 0; j < _layout.getTotalColumnCount(); ++j) {
        final Column column = _layout.getColumn(j);
        if(column.isVisible()) {
          final Widget widget = column.getRenderer().render(row, column, row.getValue(j));
          if(widget instanceof HasClickHandlers) {
            ((HasClickHandlers)widget).addClickHandler(new ClickHandler() {
              @Override
              public void onClick(ClickEvent event) {
                fireClickEvent(row, column, widget);       
View Full Code Here

TOP

Related Classes of org.gwtlib.client.table.Row$State

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.