本文整理汇总了Java中com.google.gwt.cell.client.HasCell类的典型用法代码示例。如果您正苦于以下问题:Java HasCell类的具体用法?Java HasCell怎么用?Java HasCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HasCell类属于com.google.gwt.cell.client包,在下文中一共展示了HasCell类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: initActionsColumn
import com.google.gwt.cell.client.HasCell; //导入依赖的package包/类
private com.google.gwt.user.cellview.client.Column initActionsColumn() {
List<HasCell<DataGridFilterSummary, ?>> cells = new LinkedList<HasCell<DataGridFilterSummary, ?>>();
cells.add(new RemoveActionHasCell("Remove",
new ActionCell.Delegate<DataGridFilterSummary>() {
@Override
public void execute(DataGridFilterSummary filter) {
gridPreferenceStore.removeCustomFilter(filter.getFilterName());
refreshGrid();
}
}));
CompositeCell<DataGridFilterSummary> cell = new CompositeCell<DataGridFilterSummary>(cells);
com.google.gwt.user.cellview.client.Column<DataGridFilterSummary, DataGridFilterSummary> actionsColumn = new com.google.gwt.user.cellview.client.Column<DataGridFilterSummary, DataGridFilterSummary>(
cell) {
@Override
public DataGridFilterSummary getValue(DataGridFilterSummary object) {
return object;
}
};
return actionsColumn;
}
开发者ID:kiegroup,项目名称:appformer,代码行数:23,代码来源:NewFilterPopup.java
示例2: fireEventToCell
import com.google.gwt.cell.client.HasCell; //导入依赖的package包/类
/**
* Fire an event to the Cell within the specified {@link TableCellElement}.
*/
private <C> void fireEventToCell(Event event, String eventType, Element parentElem,
final T rowValue, Context context, HasCell<T, C> column) {
// Check if the cell consumes the event.
Cell<C> cell = column.getCell();
if (!cellConsumesEventType(cell, eventType)) {
return;
}
C cellValue = column.getValue(rowValue);
boolean cellWasEditing = cell.isEditing(context, parentElem, cellValue);
if (column instanceof Column) {
/*
* If the HasCell is a Column, let it handle the event itself. This is
* here for legacy support.
*/
Column<T, C> col = (Column<T, C>) column;
col.onBrowserEvent(context, parentElem, rowValue, event);
} else {
// Create a FieldUpdater.
final FieldUpdater<T, C> fieldUpdater = column.getFieldUpdater();
final int index = context.getIndex();
ValueUpdater<C> valueUpdater = (fieldUpdater == null) ? null : (value) -> {
fieldUpdater.update(index, rowValue, value);
};
// Fire the event to the cell.
cell.onBrowserEvent(context, parentElem, cellValue, event, valueUpdater);
}
// Reset focus if needed.
cellIsEditing = cell.isEditing(context, parentElem, cellValue);
if (cellWasEditing && !cellIsEditing) {
CellBasedWidgetImpl.get().resetFocus(() -> {
setFocus(true);
});
}
}
开发者ID:GwtMaterialDesign,项目名称:gwt-material-table,代码行数:41,代码来源:AbstractDataTable.java
示例3: render
import com.google.gwt.cell.client.HasCell; //导入依赖的package包/类
@Override
protected <X> void render(Context context, GlobalPermissionEnum value,
SafeHtmlBuilder sb, HasCell<GlobalPermissionEnum, X> hasCell) {
Cell<X> cell = hasCell.getCell();
sb.appendHtmlConstant("<td>");
cell.render(context, hasCell.getValue(value), sb);
sb.appendHtmlConstant("</td>");
}
开发者ID:sigmah-dev,项目名称:sigmah,代码行数:9,代码来源:PermissionTree.java
注:本文中的com.google.gwt.cell.client.HasCell类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论