use of com.google.gwt.user.client.ui.HTMLTable.CellFormatter in project gerrit by GerritCodeReview.
the class ChangeTable method applyDataRowStyle.
@Override
protected void applyDataRowStyle(final int row) {
super.applyDataRowStyle(row);
final CellFormatter fmt = table.getCellFormatter();
fmt.addStyleName(row, C_STAR, Gerrit.RESOURCES.css().iconCell());
for (int i = C_ID; i < columns; i++) {
fmt.addStyleName(row, i, Gerrit.RESOURCES.css().dataCell());
}
if (!showLegacyId) {
fmt.addStyleName(row, C_ID, Gerrit.RESOURCES.css().dataCellHidden());
}
fmt.addStyleName(row, C_SUBJECT, Gerrit.RESOURCES.css().cSUBJECT());
fmt.addStyleName(row, C_STATUS, Gerrit.RESOURCES.css().cSTATUS());
fmt.addStyleName(row, C_OWNER, Gerrit.RESOURCES.css().cOWNER());
fmt.addStyleName(row, C_ASSIGNEE, showAssignee ? Gerrit.RESOURCES.css().cASSIGNEE() : Gerrit.RESOURCES.css().dataCellHidden());
fmt.addStyleName(row, C_LAST_UPDATE, Gerrit.RESOURCES.css().cLastUpdate());
fmt.addStyleName(row, C_SIZE, Gerrit.RESOURCES.css().cSIZE());
for (int i = C_SIZE + 1; i < columns; i++) {
fmt.addStyleName(row, i, Gerrit.RESOURCES.css().cAPPROVAL());
}
}
use of com.google.gwt.user.client.ui.HTMLTable.CellFormatter in project gerrit by GerritCodeReview.
the class DocTable method applyDataRowStyle.
@Override
protected void applyDataRowStyle(int row) {
super.applyDataRowStyle(row);
CellFormatter fmt = table.getCellFormatter();
fmt.addStyleName(row, C_TITLE, Gerrit.RESOURCES.css().dataCell());
fmt.addStyleName(row, C_TITLE, Gerrit.RESOURCES.css().cSUBJECT());
}
use of com.google.gwt.user.client.ui.HTMLTable.CellFormatter in project gerrit by GerritCodeReview.
the class NavigationTable method ensurePointerVisible.
protected void ensurePointerVisible() {
final int max = table.getRowCount();
int row = currentRow;
final int init = row;
if (row < 0) {
row = 0;
} else if (max <= row) {
row = max - 1;
}
final CellFormatter fmt = table.getCellFormatter();
final int sTop = Document.get().getScrollTop();
final int sEnd = sTop + Document.get().getClientHeight();
while (0 <= row && row < max) {
final Element cur = fmt.getElement(row, C_ARROW).getParentElement();
final int cTop = cur.getAbsoluteTop();
final int cEnd = cTop + cur.getOffsetHeight();
if (cEnd < sTop) {
row++;
} else if (sEnd < cTop) {
row--;
} else {
break;
}
}
if (init != row) {
movePointerTo(row, false);
}
}
use of com.google.gwt.user.client.ui.HTMLTable.CellFormatter in project gerrit by GerritCodeReview.
the class MyOAuthTokenScreen method row.
private void row(Grid grid, int row, String name, Widget field) {
final CellFormatter fmt = grid.getCellFormatter();
if (LocaleInfo.getCurrentLocale().isRTL()) {
grid.setText(row, 1, name);
grid.setWidget(row, 0, field);
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().header());
} else {
grid.setText(row, 0, name);
grid.setWidget(row, 1, field);
fmt.addStyleName(row, 0, Gerrit.RESOURCES.css().header());
}
}
use of com.google.gwt.user.client.ui.HTMLTable.CellFormatter in project gerrit by GerritCodeReview.
the class MyPasswordScreen method row.
private void row(final Grid info, final int row, final String name, final Widget field) {
final CellFormatter fmt = info.getCellFormatter();
if (LocaleInfo.getCurrentLocale().isRTL()) {
info.setText(row, 1, name);
info.setWidget(row, 0, field);
fmt.addStyleName(row, 1, Gerrit.RESOURCES.css().header());
} else {
info.setText(row, 0, name);
info.setWidget(row, 1, field);
fmt.addStyleName(row, 0, Gerrit.RESOURCES.css().header());
}
}
Aggregations