getColumnFormatter().resizeColumnGroup(columns, false);
/*************************************** * Returns the width of a certain table column. * * @param nColumn The column index * * @return The column width in pixels */ private int getColumnWidth(int nColumn) { String sHtmlWidth = aColumnHeaders.get(nColumn).getColumnWidth(); int nWidth; if (sHtmlWidth != null) { nWidth = Integer.parseInt(sHtmlWidth.substring(0, sHtmlWidth.length() - 2)); } else { nWidth = aHeaderTable.getColumnFormatter().getElement(nColumn) .getOffsetWidth(); } return nWidth; }
/*************************************** * Sets the width of a certain column. * * @param nColumn The column index * @param sWidth The new column width */ private void setColumnWidth(int nColumn, String sWidth) { aColumnHeaders.get(nColumn).sWidth = sWidth; aHeaderTable.getColumnFormatter().setWidth(nColumn, sWidth); rTable.getDataTable().getColumnFormatter().setWidth(nColumn, sWidth); }
getColumnFormatter().resizeColumnGroup(columns, false);
getColumnFormatter().resizeColumnGroup(columns, false);
private void initReset() { for (int i = 0; i < fieldNames.length; i++) { Label label = new Label(fieldNames[i]); label.setStyleName("soa-prop-grid-label"); grid.setWidget(i, 0, label); grid.setWidget(i, 1, new HTML("")); String style = (i % 2 == 0) ? "soa-prop-grid-even" : "soa-prop-grid-odd"; grid.getRowFormatter().setStyleName(i, style); grid.getColumnFormatter().setWidth(0, "20%"); grid.getColumnFormatter().setWidth(1, "80%"); } }
/*************************************** * Sets the widths of the table columns. */ void setAllColumnWidths() { ColumnFormatter rHeaderColumnFormatter = aHeaderTable.getColumnFormatter(); ColumnFormatter rDataColumnFormatter = rTable.getDataTable().getColumnFormatter(); int nColumns = rColumns.getElementCount(); for (int nCol = 0; nCol < nColumns; nCol++) { String sColumnWidth = aColumnHeaders.get(nCol).getColumnWidth(); if (sColumnWidth != null) { rHeaderColumnFormatter.setWidth(nCol, sColumnWidth); rDataColumnFormatter.setWidth(nCol, sColumnWidth); } } }
/*************************************** * Sets the style of a certain column depending on user interface properties * of the column definition. * * @param nColumn The column index * @param rColumn The column definition */ private void setColumnStyle(int nColumn, ColumnDefinition rColumn) { ColumnFormatter rHeaderColumnFormatter = aHeaderTable.getColumnFormatter(); ColumnFormatter rDataColumnFormatter = rTable.getDataTable().getColumnFormatter(); String sStyle = TextConvert.capitalizedLastElementOf(rColumn.getId()); rHeaderColumnFormatter.setStyleName(nColumn, sStyle); rDataColumnFormatter.setStyleName(nColumn, sStyle); }
ruleContentWidget ); layout.getColumnFormatter().setWidth( 0, "10%" ); layout.getColumnFormatter().setWidth( 1, "90%" ); layout.getCellFormatter().setAlignment( 0,