rf.getElement(i * 2 + 1).getStyle().clearBackgroundColor(); if ((i % 2) == 0) { rf.addStyleName(i * 2, "subg"); rf.addStyleName(i * 2 + 1, "subg"); logs.setText(i * 2 + 1, 0, msg.substring(pos)); // message fcf.setColSpan(i * 2 + 1, 0, 4); rf.addStyleName(i * 2, "fwf"); rf.addStyleName(i * 2 + 1, "fwf");
table.getRowFormatter().addStyleName(rowNumber, style);
public void markDiffs(String style){ //skip first row, will always be title related for(int i = 1; i < rowIndex; i++){ if(getFlexCellFormatter().getColSpan(i, 0) == 1 && getFlexCellFormatter().getColSpan(i, 1) == 1 && getFlexCellFormatter().getColSpan(i, 2) == 1){ Element cell1 = this.getCellFormatter().getElement(i, 1); Element cell2 = this.getCellFormatter().getElement(i, 2); if(!cell1.getInnerText().equals(cell2.getInnerText())){ this.getRowFormatter().addStyleName(i, style); } else{ this.getRowFormatter().removeStyleName(i, style); } } } }
"100%"); layout.getRowFormatter().addStyleName(currentLayoutRow, (i % 2 == 0 ? GuidedRuleEditorResources.INSTANCE.css().evenRow() : GuidedRuleEditorResources.INSTANCE.css().oddRow()));
"100%"); layout.getRowFormatter().addStyleName(currentLayoutRow, (i % 2 == 0 ? GuidedRuleEditorResources.INSTANCE.css().evenRow() : GuidedRuleEditorResources.INSTANCE.css().oddRow()));
"100%"); layout.getRowFormatter().addStyleName(currentLayoutRow, (i % 2 == 0 ? GuidedRuleEditorResources.INSTANCE.css().evenRow() : GuidedRuleEditorResources.INSTANCE.css().oddRow()));
"100%"); layout.getRowFormatter().addStyleName(currentLayoutRow, (i % 2 == 0 ? GuidedRuleEditorResources.INSTANCE.css().evenRow() : GuidedRuleEditorResources.INSTANCE.css().oddRow()));
table.getRowFormatter().addStyleName(row, "warning"); SpanPanel warning = new SpanPanel(); warning.setHTML("<b> Warning </b> <br/>" +
rRowFormatter.addStyleName(nRow, CSS.ewtOdd()); rRowFormatter.addStyleName(nRow, rFlag.toString());
_grid.getRowFormatter().addStyleName(row, "metric-table-baseline"); //$NON-NLS-1$
drawRow(row.getData(), rowNumber); if (row.getParent() != null) getGrid().getRowFormatter().addStyleName(rowNumber, "subgrid-row"); drawPager(((TreeGrid) getGrid()).getTreeCell(rowNumber)); rowNumber++;
this.getRowFormatter().addStyleName(topRowIndex, "firstRowInUnnamedBlock");
/*************************************** * Sets the style of a row to be selected. * * @param nRow The row to set to be selected * @param bFireEvent TRUE to dispatch a selection event */ void setRowSelected(int nRow, boolean bFireEvent) { if (nRow >= -1 && nRow < nVisibleDataRows) { if (nRow != -1) { RowFormatter rRowFormatter = aDataTable.getRowFormatter(); rRowFormatter.addStyleName(nRow, CSS.ewtSelected()); } if (nSelectedRow != nRow) { nSelectedRow = nRow; if (bFireEvent) { rEventDispatcher.dispatchEvent(EventType.SELECTION, null); } } } }
/*************************************** * Updates the odd/even row styles for all visible rows beginning with a * certain starting row. * * @param nRow The starting row */ private void updateRowStyles(int nRow) { RowFormatter rRowFormatter = aDataTable.getRowFormatter(); int nMax = nVisibleDataRows; boolean bOdd = (nRow % 2) == 1; while (nRow < nMax) { if (bOdd) { rRowFormatter.addStyleName(nRow, CSS.ewtOdd()); } else { rRowFormatter.removeStyleName(nRow, CSS.ewtOdd()); } bOdd = !bOdd; nRow++; } } }
/** * This method marks the specified row as selected.<p/> * It works similarly to the {@link #setCurrentRow(int)} method but doesn't clear a previous selection. * If the multiple rows selection is disabled it checks whether there is at least one selected row and if no * it makes selection. Otherwise it does nothing.<p/> * If multiple mode is enabled it always selects a row. * * @param row is a row number to make selected. */ public void selectRow(int row) { if ((isMultiRowModeEnabled() || getSelectionModel().size() <= 0) && row >= 0 && row < getRowCount()) { HTMLTable.RowFormatter rowFormatter = getRowFormatter(); rowFormatter.removeStyleName(row, "selected-row"); rowFormatter.addStyleName(row, "selected-row"); getSelectionModel().add(row, getGridRowByRowNumber(row)); } }
/*************************************** * Sets the table styles of an empty row. * * @param nRow The index of the row to set the style of */ private void setEmptyRowStyle(int nRow) { RowFormatter rRowFormatter = aDataTable.getRowFormatter(); rRowFormatter.setStyleName(nRow, CSS.ewtTableRow()); rRowFormatter.addStyleName(nRow, CSS.ewtEmpty()); }
private void styleRow(final int row, final boolean selected) { String style = resources.css().browserTabSelectedRow(); if (selected) { table.getRowFormatter().addStyleName(row, style); } else { table.getRowFormatter().removeStyleName(row, style); } }