List of usage examples for com.google.gwt.user.cellview.client Column setCellStyleNames
public void setCellStyleNames(String styleNames)
From source file:uk.ac.ebi.fg.annotare2.web.gwt.editor.client.view.experiment.design.ExtractAttributesViewImpl.java
License:Apache License
private void addColumnForPairedLayout(final ExtractAttribute attr) { Cell<String> cell = attr.hasOptions() ? new SelectionCell(attr.getOptions()) : new EditTextCell(); Column<ExtractAttributesRow, String> column = new ConditionalColumn<ExtractAttributesRow>(cell) { @Override//from w ww .j a v a 2 s .c o m public String getValue(ExtractAttributesRow row) { String value = row.getValue(attr); return value == null ? "" : attr.hasOptions() ? attr.getOption(value) : value; } @Override public boolean isEditable(ExtractAttributesRow row) { return isPairedLayout(row.getValue(LIBRARY_LAYOUT)); } }; column.setCellStyleNames("app-SelectionCell"); column.setFieldUpdater(new FieldUpdater<ExtractAttributesRow, String>() { @Override public void update(int index, ExtractAttributesRow row, String value) { row.setValue(attr.hasOptions() ? attr.getValue(value) : value, attr); updateRow(row); } }); gridView.addPermanentColumn(attr.getTitle(), column, null, 150, Style.Unit.PX); }