本文整理汇总了Java中com.google.gwt.cell.client.EditTextCell类的典型用法代码示例。如果您正苦于以下问题:Java EditTextCell类的具体用法?Java EditTextCell怎么用?Java EditTextCell使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
EditTextCell类属于com.google.gwt.cell.client包,在下文中一共展示了EditTextCell类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createAttributeNameColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeNameColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
// Attribute name.
final Cell<String> nameCell = canManageAttributes() ? new EditTextCell() : new TextCell();
final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> keyColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
nameCell) {
@Override
public String getValue(final Entry<String, String> object) {
return object.getKey() != null ? object.getKey() : "";
}
};
keyColumn.setSortable(true);
sortHandler.setComparator(keyColumn,
new Comparator<Entry<String, String>>() {
@Override
public int compare(Entry<String, String> o1,
Entry<String, String> o2) {
return o1.getKey().compareTo(o2.getKey());
}
});
keyColumn.setFieldUpdater(canManageAttributes() ? keyModifiedEventHandler : null);
return keyColumn;
}
示例2: createAttributeValueColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
protected com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> createAttributeValueColumn(ColumnSortEvent.ListHandler<Entry<String, String>> sortHandler) {
// Attribute value.
final Cell<String> valueCell = canManageAttributes() ? new EditTextCell() : new TextCell();
final com.google.gwt.user.cellview.client.Column<Entry<String, String>, String> valueColumn = new com.google.gwt.user.cellview.client.Column<Entry<String, String>, String>(
valueCell) {
@Override
public String getValue(final Entry<String, String> object) {
return object.getValue() != null ? object.getValue() : "";
}
};
valueColumn.setSortable(true);
sortHandler.setComparator(valueColumn,
new Comparator<Entry<String, String>>() {
@Override
public int compare(Entry<String, String> o1,
Entry<String, String> o2) {
return o1.getValue().compareTo(o2.getValue());
}
});
valueColumn.setFieldUpdater(canManageAttributes() ? valueModifiedEventHandler : null);
return valueColumn;
}
示例3: addTypeColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
private void addTypeColumn() {
Column<ListenerModel, String> column = new Column<ListenerModel, String>( new EditTextCell() ) {
@Override
public String getValue( ListenerModel listenerModel ) {
return listenerModel.getType();
}
};
column.setFieldUpdater( new FieldUpdater<ListenerModel, String>() {
@Override
public void update( int index,
ListenerModel model,
String value ) {
model.setType( value );
}
} );
dataGrid.addColumn( column,
ProjectEditorResources.CONSTANTS.Type() );
}
示例4: addPropertyNameColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
private void addPropertyNameColumn() {
Column<PropertyRow, String> column = new Column<PropertyRow, String>( new EditTextCell() ) {
@Override
public String getValue( PropertyRow propertyRow ) {
if ( propertyRow.getName() != null ) {
return propertyRow.getName();
} else {
return "";
}
}
};
column.setFieldUpdater( new PropertyNameFieldUpdater<PropertyRow, String>( (EditTextCell) column.getCell() ) );
dataGrid.addColumn( column,
Constants.INSTANCE.persistence_unit_property_grid_property_name_column() );
dataGrid.setColumnWidth( column, 45, Style.Unit.PCT );
}
示例5: addPropertyValueColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
private void addPropertyValueColumn() {
final Column<PropertyRow, String> column = new Column<PropertyRow, String>( new EditTextCell() ) {
@Override
public String getValue( PropertyRow propertyRow ) {
if ( propertyRow.getValue() != null ) {
return propertyRow.getValue();
} else {
return "";
}
}
};
column.setFieldUpdater( new PropertyValueFieldUpdater<PropertyRow, String>( (EditTextCell) column.getCell() ) );
dataGrid.addColumn( column,
Constants.INSTANCE.persistence_unit_property_grid_property_value_column() );
dataGrid.setColumnWidth( column, 45, Style.Unit.PCT );
}
示例6: addParamValueColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
private void addParamValueColumn() {
final Column<TemplateParam, String> column = new Column<TemplateParam, String>(new EditTextCell()) {
@Override
public String getValue(TemplateParam templateParam) {
if (templateParam.getValue() != null) {
return templateParam.getValue();
} else {
return EMPTY_STRING;
}
}
};
column.setFieldUpdater(new ParamValueFieldUpdater((EditTextCell) column.getCell()));
dataGrid.addColumn(column,
translationService.getTranslation(TemplateParamsTableView_ParamValueColumn));
dataGrid.setColumnWidth(column,
55,
Style.Unit.PCT);
}
示例7: addTextColumn
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
@Override
public MapEditor.View addTextColumn(final int columnIndex, final String heading, boolean isSortable, int width) {
final com.google.gwt.user.cellview.client.Column<Map.Entry<String, String>, String> keyColumn =
new com.google.gwt.user.cellview.client.Column<Map.Entry<String, String>, String>(new EditTextCell()) {
@Override
public String getValue(final Map.Entry<String, String> object) {
return presenter.getValue(columnIndex, object);
}
};
addColumn(keyColumn, columnIndex, heading, isSortable, width);
return this;
}
示例8: TextColumnReadWrite
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
public TextColumnReadWrite() {
super(new EditTextCell());
}
示例9: PropertyNameFieldUpdater
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
PropertyNameFieldUpdater( EditTextCell cell ) {
this.cell = cell;
}
示例10: PropertyValueFieldUpdater
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
PropertyValueFieldUpdater( EditTextCell cell ) {
this.cell = cell;
}
示例11: rollbackChange
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
private void rollbackChange(TableEntry<TYPE> model) {
EditTextCell cell = (EditTextCell) column.getCell();
cell.clearViewData(table.getDataProvider().getKey(model));
table.redraw();
}
示例12: ParamValueFieldUpdater
import com.google.gwt.cell.client.EditTextCell; //导入依赖的package包/类
ParamValueFieldUpdater(EditTextCell cell) {
this.cell = cell;
}