/** * Sets whether the specified cell will allow word wrapping of its contents. * * @param row the row of the cell whose word-wrap is to be set * @param column the column of the cell whose word-wrap is to be set * @param wrap <code>false </code> to disable word wrapping in this cell * @throws IndexOutOfBoundsException */ public void setWordWrap(int row, int column, boolean wrap) { prepareCell(row, column); String wrapValue = wrap ? "" : "nowrap"; getElement(row, column).getStyle().setProperty("whiteSpace", wrapValue); }
public void updateColumnWidth(int column, int width) { if (!cm.isHidden(column)) { for (int i = 0; i < rows.size(); i++) { FooterRow row = rows.get(i); El.fly(row.table.getCellFormatter().getElement(0, column)).setWidth(width, true); Widget w = row.table.getWidget(0, column); El.fly(w.getElement()).setWidth(width - 2, true); } } }
public void addHTMLSection( String html ) { int row = table.getRowCount(); table.setHTML( row, 0, html ); table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX ); }
public void addSection( String text ) { int row = table.getRowCount(); table.setText( row, 0, text ); table.getCellFormatter().getElement( row, 0 ).getStyle().setVerticalAlign( VerticalAlign.TOP ); table.getCellFormatter().getElement( row, 0 ).setAttribute( "colSpan", "2" ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingTop( 25, Unit.PX ); table.getCellFormatter().getElement( row, 0 ).getStyle().setPaddingBottom( 10, Unit.PX ); }
/** * Determines whether or not this cell is visible. * * @param row the row of the cell whose visibility is to be set * @param column the column of the cell whose visibility is to be set * @return <code>true</code> if the object is visible */ public boolean isVisible(int row, int column) { Element e = getElement(row, column); return UIObject.isVisible(e); }
/** * Gets the primary style of a specified cell. * * @param row the cell's row * @param column the cell's column * @see UIObject#getStylePrimaryName() * @return returns the style name * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row, int column) { return UIObject.getStylePrimaryName(getElement(row, column)); }
/** * Gets the HTML contents of the specified cell. * * @param row the cell's row * @param column the cell's column * @return the cell's HTML contents * @throws IndexOutOfBoundsException */ public String getHTML(int row, int column) { return cellFormatter.getElement(row, column).getInnerHTML(); }
/** * Determines whether or not this cell is visible. * * @param row the row of the cell whose visibility is to be set * @param column the column of the cell whose visibility is to be set * @return <code>true</code> if the object is visible */ public boolean isVisible(int row, int column) { Element e = getElement(row, column); return UIObject.isVisible(e); }
/** * Gets the primary style of a specified cell. * * @param row the cell's row * @param column the cell's column * @see UIObject#getStylePrimaryName() * @return returns the style name * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row, int column) { return UIObject.getStylePrimaryName(getElement(row, column)); }
/** * Gets the style of a specified cell. * * @param row the cell's row * @param column the cell's column * @see UIObject#getStyleName() * @return returns the style name * @throws IndexOutOfBoundsException */ public String getStyleName(int row, int column) { return UIObject.getStyleName(getElement(row, column)); }
/** * Gets the cell's element. * * @return the cell's element. */ public com.google.gwt.user.client.Element getElement() { return DOM.asOld(getCellFormatter().getElement(rowIndex, cellIndex)); }
/** * Replaces the contents of the specified cell with a single space. * * @param row the cell's row * @param column the cell's column * @throws IndexOutOfBoundsException */ @Override public boolean clearCell(int row, int column) { Element td = getCellFormatter().getElement(row, column); boolean b = internalClearCell(td, false); td.setInnerHTML(" "); return b; }
/** * Clears the cell at the given row and column. If it contains a Widget, it * will be removed from the table. If not, its contents will simply be * cleared. * * @param row the widget's row * @param column the widget's column * @return true if a widget was removed * @throws IndexOutOfBoundsException */ public boolean clearCell(int row, int column) { Element td = getCellFormatter().getElement(row, column); return internalClearCell(td, true); }
/** * Convenience methods to get an attribute on a cell. * * @param row cell's row * @param column cell's column * @param attr attribute to get * @return the attribute's value * @throws IndexOutOfBoundsException */ protected String getAttr(int row, int column, String attr) { Element elem = getElement(row, column); return elem.getAttribute(attr); }
/** * Gets the text within the specified cell. * * @param row the cell's row * @param column the cell's column * @return the cell's text contents * @throws IndexOutOfBoundsException */ public String getText(int row, int column) { checkCellBounds(row, column); Element e = cellFormatter.getElement(row, column); return e.getInnerText(); }
/** * Gets the HTML contents of the specified cell. * * @param row the cell's row * @param column the cell's column * @return the cell's HTML contents * @throws IndexOutOfBoundsException */ public String getHTML(int row, int column) { return cellFormatter.getElement(row, column).getInnerHTML(); }
/** * Determines whether or not this cell is visible. * * @param row the row of the cell whose visibility is to be set * @param column the column of the cell whose visibility is to be set * @return <code>true</code> if the object is visible */ public boolean isVisible(int row, int column) { Element e = getElement(row, column); return UIObject.isVisible(e); }
/** * Gets the primary style of a specified cell. * * @param row the cell's row * @param column the cell's column * @see UIObject#getStylePrimaryName() * @return returns the style name * @throws IndexOutOfBoundsException */ public String getStylePrimaryName(int row, int column) { return UIObject.getStylePrimaryName(getElement(row, column)); }
/** * Gets the style of a specified cell. * * @param row the cell's row * @param column the cell's column * @see UIObject#getStyleName() * @return returns the style name * @throws IndexOutOfBoundsException */ public String getStyleName(int row, int column) { return UIObject.getStyleName(getElement(row, column)); }
/** * Gets the cell's element. * * @return the cell's element. */ public com.google.gwt.user.client.Element getElement() { return DOM.asOld(getCellFormatter().getElement(rowIndex, cellIndex)); }