protected void addGeneratedColumnInternal(Object id, com.vaadin.v7.ui.Table.ColumnGenerator generator) { component.addGeneratedColumn(id, generator); }
/** * Call this method before any of the {@link SelectionNotifier} methods to ensure * that the {@link SelectionListener} instances are registered with all of the * {@link ColumnGenerator} classes that also implement {@link SelectionNotifier}. */ public void setColumnGenerators(@SuppressWarnings("rawtypes") Map generators) { for (Object key : generators.keySet()) { super.addGeneratedColumn(key, (ColumnGenerator)generators.get(key)); // If any of the column generators are {@link SelectionNotifier} instances, // then register this component as a listener for events that they generate. try { m_selectionNotifiers.add((SelectionNotifier)generators.get(key)); } catch (ClassCastException e) {} } }
protected void createStubsForGeneratedColumns() { for (Column column : columnsOrder) { if (!(column.getId() instanceof MetaPropertyPath) && component.getColumnGenerator(column.getId()) == null) { component.addGeneratedColumn(column.getId(), VOID_COLUMN_GENERATOR); } } }
m_table.setSizeFull(); m_table.addGeneratedColumn("Edit", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Edit"); m_table.addGeneratedColumn("Remove", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Remove"); m_table.addGeneratedColumn("Preview", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Preview"); m_table.addGeneratedColumn("Default", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { CheckBox checkBox = new CheckBox();
component.addGeneratedColumn( generatedColumnId, new CustomColumnGenerator(generator, associatedRuntimeColumn) {
m_table.sort(new Object[]{"name"}, new boolean[]{true}); m_table.addGeneratedColumn("Edit", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Edit"); m_table.addGeneratedColumn("Remove", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Remove"); m_table.addGeneratedColumn("Preview", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { Button button = new Button("Preview"); m_table.addGeneratedColumn("Default", new Table.ColumnGenerator() { public Object generateCell(Table source, final Object itemId, Object columnId) { CheckBox checkBox = new CheckBox();