本文整理匯總了Java中com.vaadin.ui.Grid.setEditorBuffered方法的典型用法代碼示例。如果您正苦於以下問題:Java Grid.setEditorBuffered方法的具體用法?Java Grid.setEditorBuffered怎麽用?Java Grid.setEditorBuffered使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.Grid
的用法示例。
在下文中一共展示了Grid.setEditorBuffered方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildGrid
import com.vaadin.ui.Grid; //導入方法依賴的package包/類
protected void buildGrid() {
grid = new Grid();
grid.setSelectionMode(SelectionMode.NONE);
grid.setSizeFull();
grid.setEditorEnabled(!readOnly);
container = new BeanItemContainer<Record>(Record.class);
grid.setContainerDataSource(container);
grid.setColumnOrder("entityName", "attributeName", "excelMapping");
HeaderRow filterRow = grid.appendHeaderRow();
addColumn("entityName", filterRow);
addColumn("attributeName", filterRow);
TextField tfExcelMapping = new TextField();
tfExcelMapping.addBlurListener(e->saveExcelMappingSettings());
tfExcelMapping.setWidth(100, Unit.PERCENTAGE);
tfExcelMapping.setImmediate(true);
grid.getColumn("excelMapping").setEditorField(tfExcelMapping).setExpandRatio(1);
addShowPopulatedFilter("excelMapping", filterRow);
grid.setEditorBuffered(false);
addComponent(grid);
setExpandRatio(grid, 1);
}
示例2: buildGrid
import com.vaadin.ui.Grid; //導入方法依賴的package包/類
protected void buildGrid() {
grid = new Grid();
grid.setSelectionMode(SelectionMode.NONE);
grid.setSizeFull();
grid.setEditorEnabled(!readOnly);
container = new BeanItemContainer<Record>(Record.class);
grid.setContainerDataSource(container);
grid.setColumns("entityName", "attributeName", "xpath");
HeaderRow filterRow = grid.appendHeaderRow();
addColumn("entityName", filterRow);
addColumn("attributeName", filterRow);
ComboBox combo = new ComboBox();
combo.addValueChangeListener(e->saveXPathSettings());
combo.setWidth(100, Unit.PERCENTAGE);
combo.setImmediate(true);
combo.setNewItemsAllowed(true);
combo.setInvalidAllowed(true);
combo.setTextInputAllowed(true);
combo.setScrollToSelectedItem(true);
combo.setFilteringMode(FilteringMode.CONTAINS);
grid.getColumn("xpath").setEditorField(combo).setExpandRatio(1);
addShowPopulatedFilter("xpath", filterRow);
grid.setEditorBuffered(false);
addComponent(grid);
setExpandRatio(grid, 1);
}
示例3: CheckBoxDemo
import com.vaadin.ui.Grid; //導入方法依賴的package包/類
public CheckBoxDemo() {
Random random = new Random(4837291937l);
BeanItemContainer<SimplePojo> container = new BeanItemContainer<SimplePojo>(SimplePojo.class);
SimplePojo bean1 = new SimplePojo(0, "Me", true, new Date(), BigDecimal.valueOf(random.nextDouble()*100), Double.valueOf(random.nextInt(5)), Integer.valueOf(random.nextInt(5)));
SimplePojo bean2 = new SimplePojo(1, "You", false, new Date(), BigDecimal.valueOf(random.nextDouble()*100), Double.valueOf(random.nextInt(5)), Integer.valueOf(random.nextInt(5)));
SimplePojo bean3 = new SimplePojo(2, "He", true, new Date(), BigDecimal.valueOf(random.nextDouble()*100), Double.valueOf(random.nextInt(5)), Integer.valueOf(random.nextInt(5)));
container.addBean(bean1);
container.addBean(bean2);
container.addBean(bean3);
byte[] image = Base64.decodeBase64(castle);
bean1.setImage(image);
bean2.setImage(image);
bean3.setImage(image);
Grid grid = new Grid(container);
grid.setColumns("description","yes","truth","date","number","image");
grid.setSizeFull();
grid.setEditorEnabled(true);
grid.setEditorBuffered(false);
Grid.Column yes = grid.getColumn("yes");
yes.setRenderer(new CheckboxRenderer());
yes.setEditable(true);
grid.getColumn("image").setEditable(false);
grid.getColumn("image").setRenderer(new BlobImageRenderer(30,30,"image/png"));
Grid.Column truth = grid.getColumn("truth");
truth.setRenderer(new HtmlRenderer(), new StringToBooleanConverter() {
@Override
protected String getTrueString() {
return FontAwesome.CHECK_CIRCLE_O.getHtml();
}
@Override
protected String getFalseString() {
return FontAwesome.CIRCLE_O.getHtml();
}
});
truth.setEditable(false);
setStyleName("demoContentLayout");
setSizeFull();
addComponent(grid);
setComponentAlignment(grid
, Alignment.MIDDLE_CENTER);
setMargin(true);
}