本文整理汇总了Java中com.google.gwt.user.cellview.client.RowStyles.getStyleNames方法的典型用法代码示例。如果您正苦于以下问题:Java RowStyles.getStyleNames方法的具体用法?Java RowStyles.getStyleNames怎么用?Java RowStyles.getStyleNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.cellview.client.RowStyles
的用法示例。
在下文中一共展示了RowStyles.getStyleNames方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: buildRowImpl
import com.google.gwt.user.cellview.client.RowStyles; //导入方法依赖的package包/类
@Override
protected void buildRowImpl(TraceInfo rowValue, int absRowIndex) {
// Calculate the row styles.
SelectionModel<? super TraceInfo> selectionModel = cellTable.getSelectionModel();
boolean isSelected = (selectionModel == null || rowValue == null) ? false : selectionModel.isSelected(rowValue);
StringBuilder trClasses = new StringBuilder(evenRowStyle);
if (isSelected) {
trClasses.append(selectedRowStyle);
}
// Add custom row styles.
RowStyles<TraceInfo> rowStyles = cellTable.getRowStyles();
if (rowStyles != null) {
String extraRowStyles = rowStyles.getStyleNames(rowValue, absRowIndex);
if (extraRowStyles != null) {
trClasses.append(" ").append(extraRowStyles);
}
}
buildStandardRow(rowValue, absRowIndex, isSelected, trClasses.toString());
if (expandedDetails.contains(rowValue.getDataOffs())) {
buildDetailRow(rowValue, absRowIndex, isSelected, trClasses.toString());
}
}
示例2: buildRowImpl
import com.google.gwt.user.cellview.client.RowStyles; //导入方法依赖的package包/类
@Override
protected void buildRowImpl(TraceRecordInfo rowValue, int absRowIndex) {
// Calculate the row styles.
SelectionModel<? super TraceRecordInfo> selectionModel = cellTable.getSelectionModel();
boolean isSelected = (selectionModel == null || rowValue == null) ? false : selectionModel.isSelected(rowValue);
StringBuilder trClasses = new StringBuilder(evenRowStyle);
if (isSelected) {
trClasses.append(selectedRowStyle);
}
// Add custom row styles.
RowStyles<TraceRecordInfo> rowStyles = cellTable.getRowStyles();
if (rowStyles != null) {
String extraRowStyles = rowStyles.getStyleNames(rowValue, absRowIndex);
if (extraRowStyles != null) {
trClasses.append(" ").append(extraRowStyles);
}
}
buildStandardRow(rowValue, absRowIndex, isSelected, trClasses.toString());
if (expandedDetails.contains(rowValue.getPath())) {
buildDetailRow(rowValue, absRowIndex, isSelected, trClasses.toString());
}
}