/** * Returns the total width of all columns. * * @return the total width */ public int getTotalWidth() { return getTotalWidth(false); }
protected int getTotalWidth() { return cm.getTotalWidth(); }
protected boolean isHorizontalScrollBarShowing() { return cm.getTotalWidth() + getScrollAdjust() > scroller.dom.getOffsetWidth(); }
protected void syncHScroll() { if (!hasRows()) { El child = mainBody.firstChild(); if (child != null) { child.setWidth(cm.getTotalWidth(), true); } } }
protected void fitColumns(boolean preventRefresh, boolean onlyExpand, int omitColumn) { int tw = cm.getTotalWidth(false); int aw = grid.el().getWidth(true) - getScrollAdjust(); if (aw <= 0) {
private void updateGroupWidths() { if (!enableGrouping || ds.getCount() < 1) { return; } String tw = Math.max(cm.getTotalWidth(), el.dom.getOffsetWidth() - getScrollAdjust()) + "px"; NodeList<Element> gs = getGroups(); for (int i = 0, len = gs.getLength(); i < len; i++) { Element e = gs.getItem(i).getFirstChild().cast(); e.getStyle().setProperty("width", tw); } }
protected void autoExpand(boolean preventUpdate) { if (!userResized && grid.getAutoExpandColumn() != null) { int tw = cm.getTotalWidth(false); int aw = grid.getWidth(true) - getScrollAdjust(); if (tw != aw) { int ci = cm.getIndexById(grid.getAutoExpandColumn()); assert ci != Style.DEFAULT : "auto expand column not found"; if (cm.isHidden(ci)) { return; } int currentWidth = cm.getColumnWidth(ci); int cw = Math.min(Math.max(((aw - tw) + currentWidth), grid.getAutoExpandMin()), grid.getAutoExpandMax()); if (cw != currentWidth) { cm.setColumnWidth(ci, cw, true); if (!preventUpdate) { updateColumnWidth(ci, cw); } } } } }
table.setWidth(cm.getTotalWidth() + "px");
c.setScrollTop(ctop); } else if (cbot > sbot) { if (hscroll && (cm.getTotalWidth() > scroller.getWidth() - scrollOffset)) { cbot += scrollOffset;