private void addHeader(String header, int colIndex, ColumnModel columnModel) { HeaderGroupConfig headerConfig = new HeaderGroupConfig(SafeHtmlUtils.fromTrustedString(header),1,2); columnModel.addHeaderGroup(0, colIndex, headerConfig); }
protected HeaderGroupConfig getGroup(int row, int column) { for (HeaderGroupConfig config : getHeaderGroups()) { Rectangle r = new Rectangle(); r.x = config.getColumn(); r.y = config.getRow(); r.width = config.getColspan(); r.height = config.getRowspan(); if (r.contains(column, row)) { return config; } } return null; }
@Override protected void doAttachChildren() { ComponentHelper.doAttach(config.getWidget()); }
@Override protected void onRender(Element target, int index) { table.setCellPadding(0); table.setCellSpacing(0); table.getElement().getStyle().setProperty("tableLayout", "fixed"); table.getElement().setAttribute("role", "presentation"); table.getElement().getFirstChildElement().setAttribute("role", "presentation"); setElement(table.getElement(), target, index); List<HeaderGroupConfig> configs = cm.getHeaderGroups(); rows = 0; for (HeaderGroupConfig config : configs) { rows = Math.max(rows, config.getRow() + 1); } rows++; quickTip = new QuickTip(this); refresh(); }
int mark = group.config.getColumn(); for (int k = mark; k < (mark + colspan); k++) { ColumnConfig c = cm.getColumn(k);
rows = Math.max(rows, config.getRow() + 1); for (int i = 0; i < rows - 1; i++) { for (HeaderGroupConfig config : cm.getHeaderGroups()) { int col = config.getColumn(); int row = config.getRow(); Integer start = map.get(row); int col = config.getColumn(); int row = config.getRow(); int rs = config.getRowspan(); int cs = config.getColspan(); HorizontalAlignment align = config.getHorizontalAlignment(); if (align == HorizontalAlignment.RIGHT) { cf.setHorizontalAlignment(row, col, HasHorizontalAlignment.ALIGN_RIGHT);
new HeaderGroupConfig(SafeHtmlUtils.fromString(child.getLabel()), 1, colSpan));
@Override protected void doDetachChildren() { ComponentHelper.doDetach(config.getWidget()); }