description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);
description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(4, 0, HasVerticalAlignment.ALIGN_TOP);
detailsTable.setWidget(idx, 0, descriptionLabel); detailsTable.setWidget(idx, 1, description); detailsTable.getCellFormatter().setVerticalAlignment(6, 0, HasVerticalAlignment.ALIGN_TOP); description.addInputHandler(this);
DOM.setStyleAttribute(tr, "margin", "0"); getCellFormatter().setStyleName(0, 0, "header-table-cell"); getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP); getHeaderTable().setStyleName("advanced-Grid"); getHeaderTable().setCellSpacing(0); DOM.setStyleAttribute(tr, "margin", "0"); getCellFormatter().setStyleName(1, 0, "body-table-cell"); getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP); getBodyTable().setStyleName("advanced-Grid"); getBodyTable().setCellSpacing(0); DOM.setStyleAttribute(tr, "margin", "0"); getCellFormatter().setStyleName(2, 0, "footer-table-cell"); getCellFormatter().setVerticalAlignment(2, 0, HasVerticalAlignment.ALIGN_TOP); getFooterTable().setStyleName("advanced-Grid"); getFooterTable().setCellSpacing(0);
/*************************************** * Method for subclasses to set the cell alignment in GWT tables according * to the style flags in a style data object. * * @param rStyle The style data * @param rCellFormatter The cell formatter of the table * @param nRow The row of the cell * @param nCol The column of the cell */ protected void setCellAlignment(StyleData rStyle, CellFormatter rCellFormatter, int nRow, int nCol) { HorizontalAlignmentConstant rHAlign = rStyle.mapHorizontalAlignment(); VerticalAlignmentConstant rVAlign = rStyle.mapVerticalAlignment(); if (rHAlign != null) { rCellFormatter.setHorizontalAlignment(nRow, nCol, rHAlign); } if (rVAlign != null) { rCellFormatter.setVerticalAlignment(nRow, nCol, rVAlign); } } }
/*************************************** * @see Table#setData(DataModel) */ public void setData(DataModel<? extends DataModel<?>> rData) { this.rData = rData; if (aToolBar == null) { // the toolbar depends on model features, so it can only be created // after the model is available aToolBar = new TableToolBar(this); aMainPanel.setWidget(TOOLBAR_ROW, 0, aToolBar); aMainPanel.getCellFormatter() .setVerticalAlignment(TOOLBAR_ROW, 0, HasVerticalAlignment.ALIGN_BOTTOM); } update(); }
/** * Sets the horizontal and vertical alignment of the specified cell's * contents. * * @param row the row of the cell whose alignment is to be set * @param column the column of the cell whose alignment is to be set * @param hAlign the cell's new horizontal alignment as specified in * {@link HasHorizontalAlignment} * @param vAlign the cell's new vertical alignment as specified in * {@link HasVerticalAlignment} * @throws IndexOutOfBoundsException */ public void setAlignment(int row, int column, HorizontalAlignmentConstant hAlign, VerticalAlignmentConstant vAlign) { setHorizontalAlignment(row, column, hAlign); setVerticalAlignment(row, column, vAlign); }
/** * Sets the horizontal and vertical alignment of the specified cell's * contents. * * @param row the row of the cell whose alignment is to be set * @param column the column of the cell whose alignment is to be set * @param hAlign the cell's new horizontal alignment as specified in * {@link HasHorizontalAlignment} * @param vAlign the cell's new vertical alignment as specified in * {@link HasVerticalAlignment} * @throws IndexOutOfBoundsException */ public void setAlignment(int row, int column, HorizontalAlignmentConstant hAlign, VerticalAlignmentConstant vAlign) { setHorizontalAlignment(row, column, hAlign); setVerticalAlignment(row, column, vAlign); }
/** {@inheritDoc} */ protected void prepareScrolling(boolean enabled) { if (enabled) { DOM.setStyleAttribute(getScrollPanel().getElement(), "overflowY", "auto"); } else { DOM.setStyleAttribute(getScrollPanel().getElement(), "overflowX", "visible"); } this.initialized = false; Element td = getCellFormatter().getElement(1, 0); DOM.setStyleAttribute(td, "border", "0"); DOM.setStyleAttribute(td, "padding", "0"); DOM.setStyleAttribute(td, "margin", "0"); getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP); this.initialized = true; }
/** * Sets the horizontal and vertical alignment of the specified cell's * contents. * * @param row the row of the cell whose alignment is to be set * @param column the column of the cell whose alignment is to be set * @param hAlign the cell's new horizontal alignment as specified in * {@link HasHorizontalAlignment} * @param vAlign the cell's new vertical alignment as specified in * {@link HasVerticalAlignment} * @throws IndexOutOfBoundsException */ public void setAlignment(int row, int column, HorizontalAlignmentConstant hAlign, VerticalAlignmentConstant vAlign) { setHorizontalAlignment(row, column, hAlign); setVerticalAlignment(row, column, vAlign); }
Grid grid = new Grid(); HTMLTable.CellFormatter formatter = grid.getCellFormatter(); formatter.setHorizontalAlignment(0, 0, HasHorizontalAlignment.ALIGN_CENTER); formatter.setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_MIDDLE);
detailsTable.getFlexCellFormatter().setColSpan(row, 1, 2); description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(row, 0, HasVerticalAlignment.ALIGN_TOP);
detailsTable.setWidget(0, 1, description); detailsTable.getCellFormatter().setVerticalAlignment(0, 0, HasVerticalAlignment.ALIGN_TOP); detailsTable.setWidget(1, 0, bodyLabel); detailsTable.setWidget(1, 1, (Widget) body); detailsTable.getCellFormatter().setVerticalAlignment(1, 0, HasVerticalAlignment.ALIGN_TOP); } else { detailsTable.setWidget(1, 0, (Widget) body);
description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);
description.addInputHandler(this); detailsTable.getCellFormatter().setVerticalAlignment(5, 0, HasVerticalAlignment.ALIGN_TOP);