Grid instead@Deprecated public class Table extends AbstractSelect implements Action.Container, Container.Sortable, ItemClickEvent.ItemClickNotifier, DragSource, DropTarget, HasChildMeasurementHint
Table is used for representing data or components in a pageable
and selectable table.
Scalability of the Table is largely dictated by the container. A table does not have a limit for the number of items and is just as fast with hundreds of thousands of items as with just a few. The current GWT implementation with scrolling however limits the number of rows to around 500000, depending on the browser and the pixel height of rows.
Components in a Table will not have their caption nor icon rendered.
| Modifier and Type | Class and Description |
|---|---|
static class |
Table.Align
Deprecated.
|
static class |
Table.CacheUpdateException
Deprecated.
|
static interface |
Table.CellStyleGenerator
Deprecated.
|
static class |
Table.ColumnCollapseEvent
Deprecated.
|
static interface |
Table.ColumnCollapseListener
Deprecated.
|
static interface |
Table.ColumnGenerator
Deprecated.
|
static class |
Table.ColumnHeaderMode
Deprecated.
|
static class |
Table.ColumnReorderEvent
Deprecated.
|
static interface |
Table.ColumnReorderListener
Deprecated.
|
static class |
Table.ColumnResizeEvent
Deprecated.
|
static interface |
Table.ColumnResizeListener
Deprecated.
|
static class |
Table.FooterClickEvent
Deprecated.
|
static interface |
Table.FooterClickListener
Deprecated.
|
static class |
Table.GeneratedRow
Deprecated.
|
static class |
Table.HeaderClickEvent
Deprecated.
|
static interface |
Table.HeaderClickListener
Deprecated.
|
static interface |
Table.RowGenerator
Deprecated.
|
static class |
Table.RowHeaderMode
Deprecated.
|
static class |
Table.TableContextClickEvent
Deprecated.
|
static class |
Table.TableDragMode
Deprecated.
|
static class |
Table.TableDropCriterion
Deprecated.
|
class |
Table.TableTransferable
Deprecated.
|
AbstractSelect.AbstractSelectTargetDetails, AbstractSelect.AcceptItem, AbstractSelect.CaptionChangeListener, AbstractSelect.DefaultNewItemHandler, AbstractSelect.Filtering, AbstractSelect.ItemCaptionMode, AbstractSelect.ItemDescriptionGenerator, AbstractSelect.NewItemHandler, AbstractSelect.TargetItemIs, AbstractSelect.VerticalLocationIsAbstractField.FocusShortcut, AbstractField.ReadOnlyStatusChangeEventContainer.Editor, Container.Filter, Container.Filterable, Container.Hierarchical, Container.Indexed, Container.ItemSetChangeEvent, Container.ItemSetChangeListener, Container.ItemSetChangeNotifier, Container.Ordered, Container.PropertySetChangeEvent, Container.PropertySetChangeListener, Container.PropertySetChangeNotifier, Container.SimpleFilterable, Container.Sortable, Container.ViewerHasChildMeasurementHint.ChildMeasurementHintHasComponents.ComponentAttachDetachNotifier, HasComponents.ComponentAttachEvent, HasComponents.ComponentAttachListener, HasComponents.ComponentDetachEvent, HasComponents.ComponentDetachListenerComponent.ErrorEvent, Component.Event, Component.Focusable, Component.ListenerClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSizeable.UnitField.ValueChangeEventBuffered.SourceExceptionProperty.Editor, Property.ReadOnlyException, Property.ReadOnlyStatusChangeListener, Property.ReadOnlyStatusChangeNotifier, Property.Transactional<T>, Property.ValueChangeListener, Property.ValueChangeNotifier, Property.ViewerITEM_CAPTION_MODE_EXPLICIT, ITEM_CAPTION_MODE_EXPLICIT_DEFAULTS_ID, ITEM_CAPTION_MODE_ICON_ONLY, ITEM_CAPTION_MODE_ID, ITEM_CAPTION_MODE_INDEX, ITEM_CAPTION_MODE_ITEM, ITEM_CAPTION_MODE_PROPERTY, itemIdMapper, itemsDESIGN_ATTR_PLAIN_TEXTSIZE_UNDEFINED, UNITS_CM, UNITS_EM, UNITS_EX, UNITS_INCH, UNITS_MM, UNITS_PERCENTAGE, UNITS_PICAS, UNITS_PIXELS, UNITS_POINTS| Constructor and Description |
|---|
Table()
Deprecated.
Creates a new empty table.
|
Table(String caption)
Deprecated.
Creates a new empty table with caption.
|
Table(String caption,
Container dataSource)
Deprecated.
Creates a new table with caption and connect it to a Container.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addActionHandler(Action.Handler actionHandler)
Deprecated.
Registers a new action handler for this container.
|
void |
addColumnCollapseListener(Table.ColumnCollapseListener listener)
Deprecated.
Adds a column collapse listener to the Table.
|
void |
addColumnReorderListener(Table.ColumnReorderListener listener)
Deprecated.
Adds a column reorder listener to the Table.
|
void |
addColumnResizeListener(Table.ColumnResizeListener listener)
Deprecated.
Adds a column resize listener to the Table.
|
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue)
Deprecated.
Adds a new property to the table and show it as a visible column.
|
boolean |
addContainerProperty(Object propertyId,
Class<?> type,
Object defaultValue,
String columnHeader,
Resource columnIcon,
Table.Align columnAlignment)
Deprecated.
Adds a new property to the table and show it as a visible column.
|
void |
addFooterClickListener(Table.FooterClickListener listener)
Deprecated.
Adds a footer click listener which handles the click events when the user
clicks on a column footer cell in the Table.
|
void |
addGeneratedColumn(Object id,
Table.ColumnGenerator generatedColumn)
Deprecated.
Adds a generated column to the Table.
|
void |
addHeaderClickListener(Table.HeaderClickListener listener)
Deprecated.
Adds a header click listener which handles the click events when the user
clicks on a column header cell in the Table.
|
Object |
addItem(Object[] cells,
Object itemId)
Deprecated.
Adds the new row to table and fill the visible cells (except generated
columns) with given values.
|
Object |
addItemAfter(Object previousItemId)
Deprecated.
Adds new item after the given item.
|
Item |
addItemAfter(Object previousItemId,
Object newItemId)
Deprecated.
Adds new item after the given item.
|
void |
addItemClickListener(ItemClickEvent.ItemClickListener listener)
Deprecated.
Register a listener to handle
ItemClickEvents. |
void |
addListener(ItemClickEvent.ItemClickListener listener)
Deprecated.
As of 7.0, replaced by
#addItemClickListener(ItemClickListener) |
void |
addListener(Table.ColumnReorderListener listener)
Deprecated.
As of 7.0, replaced by
addColumnReorderListener(ColumnReorderListener) |
void |
addListener(Table.ColumnResizeListener listener)
Deprecated.
As of 7.0, replaced by
addColumnResizeListener(ColumnResizeListener) |
void |
addListener(Table.FooterClickListener listener)
Deprecated.
As of 7.0, replaced by
addFooterClickListener(FooterClickListener) |
void |
addListener(Table.HeaderClickListener listener)
Deprecated.
As of 7.0, replaced by
addHeaderClickListener(HeaderClickListener) |
void |
attach()
Deprecated.
Notifies the component that it is connected to an application.
|
void |
beforeClientResponse(boolean initial)
Deprecated.
|
protected void |
bindPropertyToField(Object rowId,
Object colId,
Property property,
Field field)
Deprecated.
Binds an item property to a field generated by TableFieldFactory.
|
void |
changeVariables(Object source,
Map<String,Object> variables)
Deprecated.
Invoked when the value of a variable has changed.
|
void |
containerItemSetChange(Container.ItemSetChangeEvent event)
Deprecated.
Container datasource item set change.
|
void |
containerPropertySetChange(Container.PropertySetChangeEvent event)
Deprecated.
Container datasource property set change.
|
void |
detach()
Deprecated.
Notifies the component that it is detached from the application.
|
protected boolean |
disableContentRefreshing()
Deprecated.
Go to mode where content updates are not done.
|
protected void |
enableContentRefreshing(boolean refreshContent)
Deprecated.
Go to mode where content content refreshing has effect.
|
Object |
firstItemId()
Deprecated.
Gets the ID of the first Item in the Container.
|
protected String |
formatPropertyValue(Object rowId,
Object colId,
Property<?> property)
Deprecated.
Formats table cell property values.
|
protected int |
getAddedRowCount()
Deprecated.
Subclass and override this to enable partial row additions, bypassing the
normal caching mechanism.
|
double |
getCacheRate()
Deprecated.
|
Table.CellStyleGenerator |
getCellStyleGenerator()
Deprecated.
Get the current cell style generator.
|
HasChildMeasurementHint.ChildMeasurementHint |
getChildMeasurementHint()
Deprecated.
|
CollapseMenuContent |
getCollapseMenuContent()
Deprecated.
Checks whether only collapsible columns are shown to the user in the
column collapse menu.
|
Table.Align |
getColumnAlignment(Object propertyId)
Deprecated.
Gets the specified column's alignment.
|
Table.Align[] |
getColumnAlignments()
Deprecated.
Gets the array of column alignments.
|
float |
getColumnExpandRatio(Object propertyId)
Deprecated.
Gets the column expand ratio for a column.
|
String |
getColumnFooter(Object propertyId)
Deprecated.
Gets the footer caption beneath the rows.
|
Table.ColumnGenerator |
getColumnGenerator(Object columnId)
Deprecated.
Returns the ColumnGenerator used to generate the given column.
|
String |
getColumnHeader(Object propertyId)
Deprecated.
Gets the header for the specified column.
|
Table.ColumnHeaderMode |
getColumnHeaderMode()
Deprecated.
Getter for property columnHeaderMode.
|
String[] |
getColumnHeaders()
Deprecated.
Gets the headers of the columns.
|
Resource |
getColumnIcon(Object propertyId)
Deprecated.
Gets the icon Resource for the specified column.
|
Resource[] |
getColumnIcons()
Deprecated.
Gets the icons of the columns.
|
int |
getColumnWidth(Object propertyId)
Deprecated.
Gets the pixel width of column.
|
Iterator<Component> |
getComponentIterator()
Deprecated.
As of 7.0, use
iterator() instead. |
Converter<String,Object> |
getConverter(Object propertyId)
Deprecated.
Returns the converter used to format the given propertyId.
|
Object |
getCurrentPageFirstItemId()
Deprecated.
Getter for property currentPageFirstItem.
|
int |
getCurrentPageFirstItemIndex()
Deprecated.
Getter for property currentPageFirstItem.
|
protected Collection<String> |
getCustomAttributes()
Deprecated.
|
Table.TableDragMode |
getDragMode()
Deprecated.
|
DropHandler |
getDropHandler()
Deprecated.
|
protected int |
getFirstAddedItemIndex()
Deprecated.
Subclass and override this to enable partial row additions, bypassing the
normal caching mechanism.
|
protected int |
getFirstUpdatedItemIndex()
Deprecated.
Subclass and override this to enable partial row updates, bypassing the
normal caching and lazy loading mechanism.
|
protected Object |
getIdByIndex(int index)
Deprecated.
Returns the item ID for the item represented by the index given.
|
AbstractSelect.ItemDescriptionGenerator |
getItemDescriptionGenerator()
Deprecated.
Get the item description generator which generates tooltips for cells and
rows in the Table.
|
protected List<Object> |
getItemIds(int firstIndex,
int rows)
Deprecated.
|
com.vaadin.shared.ui.MultiSelectMode |
getMultiSelectMode()
Deprecated.
Returns the select mode in which multi-select is used.
|
int |
getPageLength()
Deprecated.
Gets the page length.
|
protected Object |
getPropertyValue(Object rowId,
Object colId,
Property property)
Deprecated.
Gets the value of property.
|
Table.RowGenerator |
getRowGenerator()
Deprecated.
|
Table.RowHeaderMode |
getRowHeaderMode()
Deprecated.
Gets the row header mode.
|
Collection<?> |
getSortableContainerPropertyIds()
Deprecated.
Gets the container property IDs, which can be used to sort the item.
|
Object |
getSortContainerPropertyId()
Deprecated.
Gets the currently sorted column property ID.
|
protected TableState |
getState()
Deprecated.
|
protected TableState |
getState(boolean markAsDirty)
Deprecated.
|
TableFieldFactory |
getTableFieldFactory()
Deprecated.
Gets the TableFieldFactory that is used to create editor for table cells.
|
Table.TableTransferable |
getTransferable(Map<String,Object> rawVariables)
Deprecated.
|
protected int |
getUpdatedRowCount()
Deprecated.
Subclass and override this to enable partial row updates, bypassing the
normal caching and lazy loading mechanism.
|
Object[] |
getVisibleColumns()
Deprecated.
Gets the array of visible column id:s, including generated columns.
|
Collection<?> |
getVisibleItemIds()
Deprecated.
Returns item identifiers of the items which are currently rendered on the
client.
|
protected boolean |
hasConverter(Object propertyId)
Deprecated.
Checks if there is a converter set explicitly for the given property id.
|
protected int |
indexOfId(Object itemId)
Deprecated.
|
boolean |
isColumnCollapsed(Object propertyId)
Deprecated.
Checks if the specified column is collapsed.
|
boolean |
isColumnCollapsible(Object propertyId)
Deprecated.
Checks if the given column is collapsible.
|
boolean |
isColumnCollapsingAllowed()
Deprecated.
Checks if column collapsing is allowed.
|
boolean |
isColumnReorderingAllowed()
Deprecated.
Checks if column reordering is allowed.
|
boolean |
isEditable()
Deprecated.
Is table editable.
|
boolean |
isFirstId(Object itemId)
Deprecated.
Tests if the Item corresponding to the given Item ID is the first Item in
the Container.
|
boolean |
isFooterVisible()
Deprecated.
Is the footer currently visible?
|
boolean |
isLastId(Object itemId)
Deprecated.
Tests if the Item corresponding to the given Item ID is the last Item in
the Container.
|
protected boolean |
isPartialRowUpdate()
Deprecated.
Subclass and override this to enable partial row updates and additions,
which bypass the normal caching mechanism.
|
protected boolean |
isRowCacheInvalidated()
Deprecated.
|
boolean |
isSelectable()
Deprecated.
Returns whether table is selectable.
|
boolean |
isSortAscending()
Deprecated.
Is the table currently sorted in ascending order.
|
boolean |
isSortDisabled()
Deprecated.
As of 7.0, use
isSortEnabled() instead |
boolean |
isSortEnabled()
Deprecated.
Checks if sorting is enabled.
|
Iterator<Component> |
iterator()
Deprecated.
|
Object |
lastItemId()
Deprecated.
Gets the ID of the last Item in the Container.
|
void |
markAsDirty()
Deprecated.
Requests that the Table should be repainted as soon as possible.
|
void |
markAsDirtyRecursive()
Deprecated.
|
Object |
nextItemId(Object itemId)
Deprecated.
Gets the ID of the Item following the Item that corresponds to itemId.
|
void |
paintContent(PaintTarget target)
Deprecated.
Paints the content of this component.
|
protected void |
paintRowAttributes(PaintTarget target,
Object itemId)
Deprecated.
A method where extended Table implementations may add their custom
attributes for rows.
|
protected void |
paintRowHeader(PaintTarget target,
Object[][] cells,
int indexInRowbuffer)
Deprecated.
|
protected void |
paintRowIcon(PaintTarget target,
Object[][] cells,
int indexInRowbuffer)
Deprecated.
|
Object |
prevItemId(Object itemId)
Deprecated.
Gets the ID of the Item preceding the Item that corresponds to the
itemId.
|
protected void |
readBody(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
|
void |
readDesign(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
|
protected Object |
readItem(org.jsoup.nodes.Element tr,
Set<String> selected,
DesignContext context)
Deprecated.
Reads an Item from a design and inserts it into the data source.
|
protected void |
readItems(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
|
protected void |
refreshRenderedCells()
Deprecated.
Refreshes the rows in the internal cache.
|
void |
refreshRowCache()
Deprecated.
Discards and recreates the internal row cache.
|
protected void |
registerComponent(Component component)
Deprecated.
|
void |
removeActionHandler(Action.Handler actionHandler)
Deprecated.
Removes a previously registered action handler for the contents of this
container.
|
void |
removeAllActionHandlers()
Deprecated.
Removes all action handlers.
|
boolean |
removeAllItems()
Deprecated.
Removes all Items from the Container.
|
void |
removeColumnCollapseListener(Table.ColumnCollapseListener listener)
Deprecated.
Removes a column reorder listener from the Table.
|
void |
removeColumnReorderListener(Table.ColumnReorderListener listener)
Deprecated.
Removes a column reorder listener from the Table.
|
void |
removeColumnResizeListener(Table.ColumnResizeListener listener)
Deprecated.
Removes a column resize listener from the Table.
|
boolean |
removeContainerProperty(Object propertyId)
Deprecated.
Removes a Property specified by the given Property ID from the Container.
|
void |
removeFooterClickListener(Table.FooterClickListener listener)
Deprecated.
Removes a footer click listener.
|
boolean |
removeGeneratedColumn(Object columnId)
Deprecated.
Removes a generated column previously added with addGeneratedColumn.
|
void |
removeHeaderClickListener(Table.HeaderClickListener listener)
Deprecated.
Removes a header click listener.
|
boolean |
removeItem(Object itemId)
Deprecated.
Removes the Item identified by
ItemId from the Container. |
void |
removeItemClickListener(ItemClickEvent.ItemClickListener listener)
Deprecated.
Removes an ItemClickListener.
|
void |
removeListener(ItemClickEvent.ItemClickListener listener)
Deprecated.
As of 7.0, replaced by
#removeItemClickListener(ItemClickListener) |
void |
removeListener(Table.ColumnReorderListener listener)
Deprecated.
As of 7.0, replaced by
removeColumnReorderListener(ColumnReorderListener) |
void |
removeListener(Table.ColumnResizeListener listener)
Deprecated.
As of 7.0, replaced by
removeColumnResizeListener(ColumnResizeListener) |
void |
removeListener(Table.FooterClickListener listener)
Deprecated.
As of 7.0, replaced by
removeFooterClickListener(FooterClickListener) |
void |
removeListener(Table.HeaderClickListener listener)
Deprecated.
As of 7.0, replaced by
removeHeaderClickListener(HeaderClickListener) |
void |
requestRepaint()
Deprecated.
As of 7.0, use
markAsDirty() instead |
protected void |
resetPageBuffer()
Deprecated.
Clears the current page buffer.
|
protected boolean |
rowHeadersAreEnabled()
Deprecated.
Checks whether row headers are visible.
|
void |
setCacheRate(double cacheRate)
Deprecated.
This method adjusts a possible caching mechanism of table implementation.
|
void |
setCellStyleGenerator(Table.CellStyleGenerator cellStyleGenerator)
Deprecated.
Set cell style generator for Table.
|
void |
setChildMeasurementHint(HasChildMeasurementHint.ChildMeasurementHint hint)
Deprecated.
|
void |
setCollapseMenuContent(CollapseMenuContent content)
Deprecated.
Sets whether only collapsible columns should be shown to the user in the
column collapse menu.
|
void |
setColumnAlignment(Object propertyId,
Table.Align alignment)
Deprecated.
Sets the specified column's alignment.
|
void |
setColumnAlignments(Table.Align... columnAlignments)
Deprecated.
Sets the column alignments.
|
void |
setColumnCollapsed(Object propertyId,
boolean collapsed)
Deprecated.
Sets whether the specified column is collapsed or not.
|
void |
setColumnCollapsible(Object propertyId,
boolean collapsible)
Deprecated.
Sets whether the given column is collapsible.
|
void |
setColumnCollapsingAllowed(boolean collapsingAllowed)
Deprecated.
Sets whether column collapsing is allowed or not.
|
void |
setColumnExpandRatio(Object propertyId,
float expandRatio)
Deprecated.
Sets the column expand ratio for given column.
|
void |
setColumnFooter(Object propertyId,
String footer)
Deprecated.
Sets the column footer caption.
|
void |
setColumnHeader(Object propertyId,
String header)
Deprecated.
Sets the column header for the specified column.
|
void |
setColumnHeaderMode(Table.ColumnHeaderMode columnHeaderMode)
Deprecated.
Setter for property columnHeaderMode.
|
void |
setColumnHeaders(String... columnHeaders)
Deprecated.
Sets the headers of the columns.
|
void |
setColumnIcon(Object propertyId,
Resource icon)
Deprecated.
Sets the icon Resource for the specified column.
|
void |
setColumnIcons(Resource... columnIcons)
Deprecated.
Sets the icons of the columns.
|
void |
setColumnReorderingAllowed(boolean columnReorderingAllowed)
Deprecated.
Sets whether column reordering is allowed or not.
|
void |
setColumnWidth(Object propertyId,
int width)
Deprecated.
Sets columns width (in pixels).
|
void |
setContainerDataSource(Container newDataSource)
Deprecated.
Sets the Container that serves as the data source of the viewer.
|
void |
setContainerDataSource(Container newDataSource,
Collection<?> visibleIds)
Deprecated.
Sets the container data source and the columns that will be visible.
|
void |
setConverter(Object propertyId,
Converter<String,?> converter)
Deprecated.
Sets a converter for a property id.
|
void |
setCurrentPageFirstItemId(Object currentPageFirstItemId)
Deprecated.
Setter for property currentPageFirstItemId.
|
void |
setCurrentPageFirstItemIndex(int newIndex)
Deprecated.
Setter for property currentPageFirstItem.
|
void |
setDragMode(Table.TableDragMode newDragMode)
Deprecated.
Sets the drag start mode of the Table.
|
void |
setDropHandler(DropHandler dropHandler)
Deprecated.
|
void |
setEditable(boolean editable)
Deprecated.
Sets the editable property.
|
void |
setEnabled(boolean enabled)
Deprecated.
|
void |
setFooterVisible(boolean visible)
Deprecated.
Sets the footer visible in the bottom of the table.
|
void |
setItemDescriptionGenerator(AbstractSelect.ItemDescriptionGenerator generator)
Deprecated.
Set the item description generator which generates tooltips for cells and
rows in the Table.
|
void |
setMultiSelectMode(com.vaadin.shared.ui.MultiSelectMode mode)
Deprecated.
Sets the behavior of how the multi-select mode should behave when the
table is both selectable and in multi-select mode.
|
void |
setNewItemsAllowed(boolean allowNewOptions)
Deprecated.
Adding new items is not supported.
|
void |
setPageLength(int pageLength)
Deprecated.
Sets the page length.
|
void |
setRowGenerator(Table.RowGenerator generator)
Deprecated.
Assigns a row generator to the table.
|
void |
setRowHeaderMode(Table.RowHeaderMode mode)
Deprecated.
Sets the row header mode.
|
void |
setSelectable(boolean selectable)
Deprecated.
Setter for property selectable.
|
void |
setSortAscending(boolean ascending)
Deprecated.
Sets the table in ascending order.
|
void |
setSortContainerPropertyId(Object propertyId)
Deprecated.
Sets the currently sorted column property id.
|
void |
setSortDisabled(boolean sortDisabled)
Deprecated.
As of 7.0, use
setSortEnabled(boolean) instead |
void |
setSortEnabled(boolean sortEnabled)
Deprecated.
Enables or disables sorting.
|
void |
setTableFieldFactory(TableFieldFactory fieldFactory)
Deprecated.
Sets the TableFieldFactory that is used to create editor for table cells.
|
void |
setVisible(boolean visible)
Deprecated.
|
void |
setVisibleColumns(Object... visibleColumns)
Deprecated.
Sets the array of visible column property id:s.
|
protected boolean |
shouldHideAddedRows()
Deprecated.
Subclass and override this to enable removing of rows, bypassing the
normal caching and lazy loading mechanism.
|
void |
sort()
Deprecated.
Sorts the table by currently selected sorting column.
|
void |
sort(Object[] propertyId,
boolean[] ascending)
Deprecated.
Sorts the table.
|
AbstractSelect.AbstractSelectTargetDetails |
translateDropTargetDetails(Map<String,Object> clientVariables)
Deprecated.
|
protected void |
unregisterComponent(Component component)
Deprecated.
This method cleans up a Component that has been generated when Table is
in editable mode.
|
void |
valueChange(Property.ValueChangeEvent event)
Deprecated.
Notifies this listener that the Property's value has changed.
|
void |
writeDesign(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
|
protected org.jsoup.nodes.Element |
writeItem(org.jsoup.nodes.Element tbody,
Object itemId,
DesignContext context)
Deprecated.
Writes a data source Item to a design.
|
protected void |
writeItems(org.jsoup.nodes.Element design,
DesignContext context)
Deprecated.
Writes the data source items to a design.
|
addItem, addItem, addItems, addItems, addItemSetChangeListener, addListener, addListener, addPropertySetChangeListener, containsId, fireItemSetChange, firePropertySetChange, getCaptionChangeListener, getContainerDataSource, getContainerProperty, getContainerPropertyIds, getItem, getItemCaption, getItemCaptionMode, getItemCaptionPropertyId, getItemIcon, getItemIconPropertyId, getItemIds, getListeners, getNewItemHandler, getNullSelectionItemId, getType, getType, getValue, isEmpty, isMultiSelect, isNewItemsAllowed, isNullSelectionAllowed, isSelected, paintItem, removeItemSetChangeListener, removeListener, removeListener, removePropertySetChangeListener, sanitizeSelection, select, setItemCaption, setItemCaptionMode, setItemCaptionPropertyId, setItemIcon, setItemIconPropertyId, setMultiSelect, setNewItemHandler, setNullSelectionAllowed, setNullSelectionItemId, setValue, setValue, size, unselectaddListener, addListener, addReadOnlyStatusChangeListener, addValidator, addValueChangeListener, clear, commit, discard, fireReadOnlyStatusChange, fireValueChange, focus, getConversionError, getConversionError, getConvertedValue, getConverter, getCurrentBufferedSourceException, getErrorMessage, getInternalValue, getModelType, getPropertyDataSource, getRequiredError, getTabIndex, getValidators, isBuffered, isInvalidAllowed, isInvalidCommitted, isModified, isReadOnly, isRequired, isValid, isValidationVisible, readOnlyStatusChange, removeAllValidators, removeListener, removeListener, removeReadOnlyStatusChangeListener, removeValidator, removeValueChangeListener, setBuffered, setConversionError, setConvertedValue, setConverter, setConverter, setCurrentBufferedSourceException, setInternalValue, setInvalidAllowed, setInvalidCommitted, setLocale, setPropertyDataSource, setReadOnly, setRequired, setRequiredError, setTabIndex, setValidationVisible, setValue, shouldHideErrors, validate, validategetExplicitImmediateValue, isImmediate, setImmediateaddContextClickListener, addListener, addShortcutListener, addStyleName, findAncestor, fireComponentErrorEvent, fireComponentEvent, getActionManager, getCaption, getComponentError, getData, getDebugId, getDescription, getHeight, getHeightUnits, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getWidth, getWidthUnits, isCaptionAsHtml, isConnectorEnabled, isEnabled, isOrHasAncestor, isRequiredIndicatorVisible, isResponsive, isVisible, removeContextClickListener, removeListener, removeShortcutListener, removeStyleName, setCaption, setCaptionAsHtml, setComponentError, setData, setDebugId, setDescription, setDescription, setHeight, setHeight, setHeightUndefined, setIcon, setId, setParent, setPrimaryStyleName, setRequiredIndicatorVisible, setResponsive, setSizeFull, setSizeUndefined, setStyleName, setWidth, setWidth, setWidthUndefinedaddAttachListener, addDetachListener, addExtension, addListener, addListener, addListener, addMethodInvocationToQueue, createState, encodeState, equals, fireEvent, getAllChildrenIterable, getConnectorId, getErrorHandler, getExtensions, getResource, getRpcManager, getRpcProxy, getSession, getStateType, getUI, handleConnectorRequest, hashCode, hasListeners, isAttached, isThis, registerRpc, registerRpc, removeAttachListener, removeDetachListener, removeExtension, removeListener, removeListener, removeListener, removeListener, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler, setResource, updateDiffstateclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitaddItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItem, getItemIds, getType, sizeaddListener, addStyleName, addStyleNames, getCaption, getDescription, getIcon, getId, getLocale, getParent, getPrimaryStyleName, getStyleName, getUI, isEnabled, isVisible, removeListener, removeStyleName, removeStyleNames, setCaption, setIcon, setId, setParent, setPrimaryStyleName, setStyleName, setStyleNameaddAttachListener, addDetachListener, encodeState, getErrorHandler, getExtensions, getRpcManager, getStateType, handleConnectorRequest, isAttached, isConnectorEnabled, removeAttachListener, removeDetachListener, removeExtension, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetHeight, getHeightUnits, getWidth, getWidthUnits, setHeight, setHeight, setHeightUndefined, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthUndefinedforEach, spliteratorisEnabledaddShortcutListener, removeShortcutListenerprotected static final int CELL_KEY
protected static final int CELL_HEADER
protected static final int CELL_ICON
protected static final int CELL_ITEMID
protected static final int CELL_GENERATED_ROW
protected static final int CELL_FIRSTCOL
@Deprecated public static final Table.Align ALIGN_LEFT
Table.Align.LEFT instead@Deprecated public static final Table.Align ALIGN_CENTER
Table.Align.CENTER instead@Deprecated public static final Table.Align ALIGN_RIGHT
Table.Align.RIGHT instead@Deprecated public static final Table.ColumnHeaderMode COLUMN_HEADER_MODE_HIDDEN
Table.ColumnHeaderMode.HIDDEN instead@Deprecated public static final Table.ColumnHeaderMode COLUMN_HEADER_MODE_ID
Table.ColumnHeaderMode.ID instead@Deprecated public static final Table.ColumnHeaderMode COLUMN_HEADER_MODE_EXPLICIT
Table.ColumnHeaderMode.EXPLICIT instead@Deprecated public static final Table.ColumnHeaderMode COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID
Table.ColumnHeaderMode.EXPLICIT_DEFAULTS_ID
instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_HIDDEN
Table.RowHeaderMode.HIDDEN instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_ID
Table.RowHeaderMode.ID instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_ITEM
Table.RowHeaderMode.ITEM instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_INDEX
Table.RowHeaderMode.INDEX instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID
Table.RowHeaderMode.EXPLICIT_DEFAULTS_ID
instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_EXPLICIT
Table.RowHeaderMode.EXPLICIT instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_ICON_ONLY
Table.RowHeaderMode.ICON_ONLY instead@Deprecated public static final Table.RowHeaderMode ROW_HEADER_MODE_PROPERTY
Table.RowHeaderMode.PROPERTY insteadprotected boolean alwaysRecalculateColumnWidths
public Table()
public Table(String caption)
caption - public Object[] getVisibleColumns()
The columns are show in the order of their appearance in this array.
public void setVisibleColumns(Object... visibleColumns)
The columns are show in the order of their appearance in this array.
visibleColumns - the Array of shown property id:s.public String[] getColumnHeaders()
The headers match the property id:s given by the set visible column
headers. The table must be set in either
COLUMN_HEADER_MODE_EXPLICIT or
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the
headers. In the defaults mode any nulls in the headers array are replaced
with id.toString().
public void setColumnHeaders(String... columnHeaders)
The headers match the property id:s given by the set visible column
headers. The table must be set in either
COLUMN_HEADER_MODE_EXPLICIT or
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the
headers. In the defaults mode any nulls in the headers array are replaced
with id.toString() outputs when rendering.
columnHeaders - the Array of column headers that match the
getVisibleColumns() method.public Resource[] getColumnIcons()
The icons in headers match the property id:s given by the set visible
column headers. The table must be set in either
COLUMN_HEADER_MODE_EXPLICIT or
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers
with icons.
getVisibleColumns().public void setColumnIcons(Resource... columnIcons)
The icons in headers match the property id:s given by the set visible
column headers. The table must be set in either
COLUMN_HEADER_MODE_EXPLICIT or
COLUMN_HEADER_MODE_EXPLICIT_DEFAULTS_ID mode to show the headers
with icons.
columnIcons - the Array of icons that match the getVisibleColumns()
.public Table.Align[] getColumnAlignments()
The items in the array must match the properties identified by
getVisibleColumns(). The possible values for the alignments
include:
Table.Align.LEFT: Left alignmentTable.Align.CENTER: CenteredTable.Align.RIGHT: Right alignmentTable.Align.LEFT: any null values are
rendered as align lefts.
public void setColumnAlignments(Table.Align... columnAlignments)
The amount of items in the array must match the amount of properties
identified by getVisibleColumns(). The possible values for the
alignments include:
Table.Align.LEFT: Left alignmentTable.Align.CENTER: CenteredTable.Align.RIGHT: Right alignmentTable.Align.LEFT
columnAlignments - the Column alignments array.public void setColumnWidth(Object propertyId, int width)
Column can either have a fixed width or expand ratio. The latter one set
is used. See @link setColumnExpandRatio(Object, float).
propertyId - columns property idwidth - width to be reserved for columns contentpublic void setColumnExpandRatio(Object propertyId, float expandRatio)
Expand ratios can be defined to customize the way how excess space is
divided among columns. Table can have excess space if it has its width
defined and there is horizontally more space than columns consume
naturally. Excess space is the space that is not used by columns with
explicit width (see setColumnWidth(Object, int)) or with natural
width (no width nor expand ratio).
By default (without expand ratios) the excess space is divided proportionally to columns natural widths.
Only expand ratios of visible columns are used in final calculations.
Column can either have a fixed width or expand ratio. The latter one set is used.
A column with expand ratio is considered to be minimum width by default (if no excess space exists). The minimum width is defined by terminal implementation.
If terminal implementation supports re-sizable columns the column becomes fixed width column if users resizes the column.
propertyId - columns property idexpandRatio - the expandRatio used to divide excess space for this columnpublic float getColumnExpandRatio(Object propertyId)
setColumnExpandRatio(Object, float)propertyId - columns property idpublic int getColumnWidth(Object propertyId)
propertyId - public int getPageLength()
Setting page length 0 disables paging.
public void setPageLength(int pageLength)
Setting page length 0 disables paging. The page length defaults to 15.
If Table has height set (Sizeable.setHeight(float, Unit) ) the client
side may update the page length automatically the correct value.
pageLength - the length of one page.public void setCacheRate(double cacheRate)
Table component may fetch and render some rows outside visible area. With complex tables (for example containing layouts and components), the client side may become unresponsive. Setting the value lower, UI will become more responsive. With higher values scrolling in client will hit server less frequently.
The amount of cached rows will be cacheRate multiplied with pageLength (
setPageLength(int) both below and above visible area..
cacheRate - a value over 0 (fastest rendering time). Higher value will
cache more rows on server (smoother scrolling). Default value
is 2.public double getCacheRate()
setCacheRate(double)public Object getCurrentPageFirstItemId()
protected Object getIdByIndex(int index)
Container.Indexed.
See Container.Indexed#getIdByIndex(int) for more information
about the exceptions that can be thrown.index - the index for which the item ID should be fetchedClassCastException - if container does not implement Container.IndexedIndexOutOfBoundsException - thrown by Container.Indexed#getIdByIndex(int) if the
index is invalidpublic void setCurrentPageFirstItemId(Object currentPageFirstItemId)
currentPageFirstItemId - the New value of property currentPageFirstItemId.protected int indexOfId(Object itemId)
public Resource getColumnIcon(Object propertyId)
propertyId - the propertyId identifying the column.public void setColumnIcon(Object propertyId, Resource icon)
Throws IllegalArgumentException if the specified column is not visible.
propertyId - the propertyId identifying the column.icon - the icon Resource to set.public String getColumnHeader(Object propertyId)
propertyId - the propertyId identifying the column.public void setColumnHeader(Object propertyId, String header)
propertyId - the propertyId identifying the column.header - the header to set.public Table.Align getColumnAlignment(Object propertyId)
propertyId - the propertyID identifying the column.Table.Align.LEFT
otherwise.public void setColumnAlignment(Object propertyId, Table.Align alignment)
Throws IllegalArgumentException if the alignment is not one of the
following: Table.Align.LEFT, Table.Align.CENTER or
Table.Align.RIGHT
propertyId - the propertyID identifying the column.alignment - the desired alignment.public boolean isColumnCollapsed(Object propertyId)
propertyId - the propertyID identifying the column.public void setColumnCollapsed(Object propertyId, boolean collapsed) throws IllegalStateException
propertyId - the propertyID identifying the column.collapsed - the desired collapsedness.IllegalStateException - if column collapsing is not allowedIllegalArgumentException - if the property id does not existpublic boolean isColumnCollapsingAllowed()
public void setColumnCollapsingAllowed(boolean collapsingAllowed)
collapsingAllowed - specifies whether column collapsing is allowed.public void setColumnCollapsible(Object propertyId, boolean collapsible)
setColumnCollapsed()) if
isColumnCollapsingAllowed() is true. By default all columns are
collapsible.propertyId - the propertyID identifying the column.collapsible - true if the column should be collapsible, false otherwise.public boolean isColumnCollapsible(Object propertyId)
true, the column can only be actually collapsed (via
UI or with setColumnCollapsed()) if isColumnCollapsingAllowed() is also
true.public boolean isColumnReorderingAllowed()
public void setColumnReorderingAllowed(boolean columnReorderingAllowed)
columnReorderingAllowed - specifies whether column reordering is allowed.public int getCurrentPageFirstItemIndex()
public void setCurrentPageFirstItemIndex(int newIndex)
newIndex - the New value of property currentPageFirstItem.public boolean isSelectable()
The table is not selectable until it's explicitly set as selectable or at
least one ValueChangeListener is added.
public void setSelectable(boolean selectable)
The table is not selectable until it's explicitly set as selectable via
this method or alternatively at least one ValueChangeListener is
added.
selectable - the New value of property selectable.public Table.ColumnHeaderMode getColumnHeaderMode()
public void setColumnHeaderMode(Table.ColumnHeaderMode columnHeaderMode)
columnHeaderMode - the New value of property columnHeaderMode.protected void refreshRenderedCells()
resetPageBuffer() is called before this then all values are
guaranteed to be recreated.@Deprecated public void requestRepaint()
markAsDirty() insteadTable does not necessarily repaint its contents when
this method has been called. See refreshRowCache() for forcing
an update of the contents.requestRepaint in interface ClientConnectorrequestRepaint in class AbstractClientConnectorpublic void markAsDirty()
Table does not necessarily repaint its contents when
this method has been called. See refreshRowCache() for forcing
an update of the contents.markAsDirty in interface ClientConnectormarkAsDirty in interface LegacyComponentmarkAsDirty in class AbstractClientConnectorpublic void markAsDirtyRecursive()
markAsDirtyRecursive in interface ClientConnectormarkAsDirtyRecursive in class AbstractClientConnectorprotected void registerComponent(Component component)
protected void unregisterComponent(Component component)
component - component that should be unregistered.getPropertyValue(Object, Object, Property)public void setRowHeaderMode(Table.RowHeaderMode mode)
The mode can be one of the following ones:
ROW_HEADER_MODE_HIDDEN: The row captions are hidden.ROW_HEADER_MODE_ID: Items Id-objects toString()
is used as row caption.
ROW_HEADER_MODE_ITEM: Item-objects toString()
is used as row caption.
ROW_HEADER_MODE_PROPERTY: Property set with
AbstractSelect.setItemCaptionPropertyId(Object) is used as row header.
ROW_HEADER_MODE_EXPLICIT_DEFAULTS_ID: Items Id-objects
toString() is used as row header. If caption is explicitly
specified, it overrides the id-caption.
ROW_HEADER_MODE_EXPLICIT: The row headers must be explicitly
specified.ROW_HEADER_MODE_INDEX: The index of the item is used as row
caption. The index mode can only be used with the containers implementing
Container.Indexed interface.ROW_HEADER_MODE_HIDDEN
mode - the One of the modes listed above.public Table.RowHeaderMode getRowHeaderMode()
setRowHeaderMode(com.vaadin.v7.ui.Table.RowHeaderMode)public Object addItem(Object[] cells, Object itemId) throws UnsupportedOperationException
cells - the Object array that is used for filling the visible cells
new row. The types must be settable to visible column property
types.itemId - the Id the new row. If null, a new id is automatically
assigned. If given, the table cannot already have a item with
given id.UnsupportedOperationExceptionpublic void refreshRowCache()
Do not call this e.g. if you have updated the data model through a Property. These types of changes are automatically propagated to the Table.
A typical case when this is needed is if you update a generator (e.g. CellStyleGenerator) and want to ensure that the rows are redrawn with new styles.
Note that calling this method is not cheap so avoid calling it unnecessarily.
public void setContainerDataSource(Container newDataSource)
setContainerDataSource(Container, Collection)
instead, especially if the table is editable.
Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.
setContainerDataSource in interface Container.ViewersetContainerDataSource in class AbstractSelectnewDataSource - the new data source.Container.Viewer#setContainerDataSource(Container)public void setContainerDataSource(Container newDataSource, Collection<?> visibleIds)
Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.
newDataSource - the new data source.visibleIds - IDs of the visible columnssetContainerDataSource(Container),
setVisibleColumns(Object[]),
Table#setConverter(Object, Converter) public void changeVariables(Object source, Map<String,Object> variables)
changeVariables in interface VariableOwnerchangeVariables in class AbstractSelectComboBox.changeVariables(java.lang.Object, java.util.Map)protected boolean disableContentRefreshing()
protected void enableContentRefreshing(boolean refreshContent)
refreshContent - true if content refresh needs to be donepublic void beforeClientResponse(boolean initial)
beforeClientResponse in interface ClientConnectorbeforeClientResponse in class AbstractField<Object>public void paintContent(PaintTarget target) throws PaintException
AbstractSelectpaintContent in interface LegacyComponentpaintContent in class AbstractSelecttarget - the Paint Event.PaintException - if the paint operation failed.protected boolean isRowCacheInvalidated()
protected boolean isPartialRowUpdate()
protected int getFirstAddedItemIndex()
protected int getAddedRowCount()
getFirstAddedItemIndex(). For plain Table it is always
0.protected boolean shouldHideAddedRows()
getFirstAddedItemIndex() and getAddedRowCount() should
be hidden instead of added.getFirstAddedItemIndex()
and getAddedRowCount()) should be added or hidden. For
plain Table it is always false.protected int getFirstUpdatedItemIndex()
protected int getUpdatedRowCount()
getFirstUpdatedItemIndex(). For plain table it is always
0.protected boolean rowHeadersAreEnabled()
false if row headers are hidden, true otherwiseprotected void paintRowHeader(PaintTarget target, Object[][] cells, int indexInRowbuffer) throws PaintException
PaintExceptionprotected void paintRowIcon(PaintTarget target, Object[][] cells, int indexInRowbuffer) throws PaintException
PaintExceptionprotected void paintRowAttributes(PaintTarget target, Object itemId) throws PaintException
target - itemId - PaintExceptionprotected Object getPropertyValue(Object rowId, Object colId, Property property)
rowId - the Id of the row (same as item Id).colId - the Id of the column.property - the Property to be presented.setTableFieldFactory(TableFieldFactory)protected void bindPropertyToField(Object rowId, Object colId, Property property, Field field)
rowId - colId - property - field - protected String formatPropertyValue(Object rowId, Object colId, Property<?> property)
rowId - the Id of the row (same as item Id).colId - the Id of the column.property - the Property to be formatted.public void addActionHandler(Action.Handler actionHandler)
addActionHandler in interface Action.ContainerAction.Container.addActionHandler(Action.Handler)public void removeActionHandler(Action.Handler actionHandler)
removeActionHandler in interface Action.ContainerAction.Container.removeActionHandler(Action.Handler)public void removeAllActionHandlers()
public void valueChange(Property.ValueChangeEvent event)
valueChange in interface Property.ValueChangeListenervalueChange in class AbstractField<Object>event - the value change event telling the data source contents have
changed.Property.ValueChangeListener#valueChange(Property.ValueChangeEvent)protected void resetPageBuffer()
refreshRenderedCells() to ensure that all content is updated
from the properties.public void attach()
attach in interface ClientConnectorattach in interface Componentattach in class AbstractSelectComponent.attach()public void detach()
detach in interface ClientConnectordetach in class AbstractSelectClientConnector.detach()public boolean removeAllItems()
removeAllItems in interface ContainerremoveAllItems in class AbstractSelectContainer.removeAllItems()public boolean removeItem(Object itemId)
ItemId from the Container.removeItem in interface ContainerremoveItem in class AbstractSelectitemId - ID of the Item to removetrue if the operation succeeded, false
if notContainer.removeItem(Object)public boolean removeContainerProperty(Object propertyId) throws UnsupportedOperationException
removeContainerProperty in interface ContainerremoveContainerProperty in class AbstractSelectpropertyId - ID of the Property to removeUnsupportedOperationException - if the container does not support removing container
propertiesContainer.removeContainerProperty(Object)public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue) throws UnsupportedOperationException
addContainerProperty in interface ContaineraddContainerProperty in class AbstractSelectpropertyId - the Id of the property.type - the class of the property.defaultValue - the default value given for all existing items.UnsupportedOperationException - if the container does not support explicitly adding container
propertiesContainer.addContainerProperty(Object, Class, Object)public boolean addContainerProperty(Object propertyId, Class<?> type, Object defaultValue, String columnHeader, Resource columnIcon, Table.Align columnAlignment) throws UnsupportedOperationException
propertyId - the Id of the propertytype - the class of the propertydefaultValue - the default value given for all existing itemscolumnHeader - the Explicit header of the column. If explicit header is not
needed, this should be set null.columnIcon - the Icon of the column. If icon is not needed, this should be
set null.columnAlignment - the Alignment of the column. Null implies align left.UnsupportedOperationException - if the operation is not supported.Container.addContainerProperty(Object, Class, Object)public void addGeneratedColumn(Object id, Table.ColumnGenerator generatedColumn)
A generated column is a column that exists only in the Table, not as a property in the underlying Container. It shows up just as a regular column.
A generated column will override a property with the same id, so that the generated column is shown instead of the column representing the property. Note that getContainerProperty() will still get the real property.
Table will not listen to value change events from properties overridden by generated columns. If the content of your generated column depends on properties that are not directly visible in the table, attach value change listener to update the content on all depended properties. Otherwise your UI might not get updated as expected.
Also note that getVisibleColumns() will return the generated columns, while getContainerPropertyIds() will not.
id - the id of the column to be addedgeneratedColumn - the Table.ColumnGenerator to use for this columnpublic Table.ColumnGenerator getColumnGenerator(Object columnId) throws IllegalArgumentException
columnId - The id of the generated columnIllegalArgumentExceptionpublic boolean removeGeneratedColumn(Object columnId)
columnId - id of the generated column to removepublic Collection<?> getVisibleItemIds()
Note, that some due to historical reasons the name of the method is bit
misleading. Some items may be partly or totally out of the viewport of
the table's scrollable area. Actually detecting rows which can be
actually seen by the end user may be problematic due to the client server
architecture. Using getCurrentPageFirstItemId() combined with
getPageLength() may produce good enough estimates in some
situations.
getVisibleItemIds in class AbstractSelectAbstractSelect.getVisibleItemIds()public void containerItemSetChange(Container.ItemSetChangeEvent event)
containerItemSetChange in interface Container.ItemSetChangeListenercontainerItemSetChange in class AbstractSelectevent - change event textContainer.ItemSetChangeListener#containerItemSetChange(Container.ItemSetChangeEvent)public void containerPropertySetChange(Container.PropertySetChangeEvent event)
containerPropertySetChange in interface Container.PropertySetChangeListenercontainerPropertySetChange in class AbstractSelectevent - Change event.Container.PropertySetChangeListener#containerPropertySetChange(Container.PropertySetChangeEvent)public void setNewItemsAllowed(boolean allowNewOptions)
throws UnsupportedOperationException
setNewItemsAllowed in class AbstractSelectallowNewOptions - the New value of property allowNewOptions.UnsupportedOperationException - if set to true.AbstractSelect.setNewItemsAllowed(boolean)public Object nextItemId(Object itemId)
nextItemId in interface Container.OrdereditemId - ID of a visible Item in the ContainernullContainer.Ordered#nextItemId(java.lang.Object)public Object prevItemId(Object itemId)
prevItemId in interface Container.OrdereditemId - ID of a visible Item in the ContainernullContainer.Ordered#prevItemId(java.lang.Object)public Object firstItemId()
firstItemId in interface Container.OrderedContainer.Ordered#firstItemId()public Object lastItemId()
lastItemId in interface Container.OrderedContainer.Ordered#lastItemId()public boolean isFirstId(Object itemId)
isFirstId in interface Container.OrdereditemId - ID of an Item in the Containertrue if the Item is first visible item in the
Container, false if notContainer.Ordered#isFirstId(java.lang.Object)public boolean isLastId(Object itemId)
isLastId in interface Container.Orderedtrue if the Item is last visible item in the
Container, false if notContainer.Ordered#isLastId(java.lang.Object)public Object addItemAfter(Object previousItemId) throws UnsupportedOperationException
addItemAfter in interface Container.OrderedpreviousItemId - Id of the visible item in ordered container after which to
insert the new item.UnsupportedOperationException - if the operation is not supported by the containerContainer.Ordered#addItemAfter(java.lang.Object)public Item addItemAfter(Object previousItemId, Object newItemId) throws UnsupportedOperationException
addItemAfter in interface Container.OrderedpreviousItemId - Id of the visible item in ordered container after which to
insert the new item.newItemId - Id of the new item to be added.UnsupportedOperationException - if the operation is not supported by the containerContainer.Ordered#addItemAfter(java.lang.Object, java.lang.Object)public void setTableFieldFactory(TableFieldFactory fieldFactory)
fieldFactory - the field factory to set.isEditable(),
DefaultFieldFactorypublic TableFieldFactory getTableFieldFactory()
isEditable()public boolean isEditable()
Field,
FieldFactorypublic void setEditable(boolean editable)
editable - true if table should be editable by user.Field,
FieldFactorypublic void sort(Object[] propertyId, boolean[] ascending) throws UnsupportedOperationException
sort in interface Container.SortablepropertyId - Array of container property IDs, whose values are used to
sort the items in container as primary, secondary, ...
sorting criterion. All of the item IDs must be in the
collection returned by
Container.Sortable.getSortableContainerPropertyIds()ascending - Array of sorting order flags corresponding to each
property ID used in sorting. If this array is shorter than
propertyId array, ascending order is assumed for items
where the order is not specified. Use true to
sort in ascending order, false to use
descending order.UnsupportedOperationException - if the container data source does not implement
Container.SortableContainer.Sortable#sort(java.lang.Object[], boolean[])public void sort()
UnsupportedOperationException - if the container data source does not implement
Container.Sortablepublic Collection<?> getSortableContainerPropertyIds()
Note that the isSortEnabled() state affects what this method
returns. Disabling sorting causes this method to always return an empty
collection.
getSortableContainerPropertyIds in interface Container.SortableContainer.Sortable#getSortableContainerPropertyIds()public Object getSortContainerPropertyId()
public void setSortContainerPropertyId(Object propertyId)
propertyId - the Container property id of the currently sorted column.public boolean isSortAscending()
true if ascending, false if descending.public void setSortAscending(boolean ascending)
ascending - true if ascending, false if
descending.@Deprecated public boolean isSortDisabled()
isSortEnabled() insteadpublic boolean isSortEnabled()
@Deprecated public void setSortDisabled(boolean sortDisabled)
setSortEnabled(boolean) insteadsortDisabled - True if sorting is disabled.public void setSortEnabled(boolean sortEnabled)
Setting this to false disallows sorting by the user. It is still possible
to call sort().
sortEnabled - true to allow the user to sort the table, false to disallow itpublic void setCellStyleGenerator(Table.CellStyleGenerator cellStyleGenerator)
cellStyleGenerator - New cell style generator or null to remove generator.public Table.CellStyleGenerator getCellStyleGenerator()
public void addItemClickListener(ItemClickEvent.ItemClickListener listener)
ItemClickEvent.ItemClickNotifierItemClickEvents.addItemClickListener in interface ItemClickEvent.ItemClickNotifierlistener - ItemClickListener to be registered@Deprecated public void addListener(ItemClickEvent.ItemClickListener listener)
#addItemClickListener(ItemClickListener)addListener in interface ItemClickEvent.ItemClickNotifierpublic void removeItemClickListener(ItemClickEvent.ItemClickListener listener)
ItemClickEvent.ItemClickNotifierremoveItemClickListener in interface ItemClickEvent.ItemClickNotifierlistener - ItemClickListener to be removed@Deprecated public void removeListener(ItemClickEvent.ItemClickListener listener)
#removeItemClickListener(ItemClickListener)removeListener in interface ItemClickEvent.ItemClickNotifierpublic void setEnabled(boolean enabled)
setEnabled in interface ComponentsetEnabled in class AbstractComponentpublic void setDragMode(Table.TableDragMode newDragMode)
newDragMode - public Table.TableDragMode getDragMode()
public Table.TableTransferable getTransferable(Map<String,Object> rawVariables)
getTransferable in interface DragSourcepublic DropHandler getDropHandler()
getDropHandler in interface DropTargetpublic void setDropHandler(DropHandler dropHandler)
public AbstractSelect.AbstractSelectTargetDetails translateDropTargetDetails(Map<String,Object> clientVariables)
translateDropTargetDetails in interface DropTargetpublic void setMultiSelectMode(com.vaadin.shared.ui.MultiSelectMode mode)
Note, that on some clients the mode may not be respected. E.g. on touch
based devices CTRL/SHIFT base selection method is invalid, so touch based
browsers always use the MultiSelectMode.SIMPLE.
mode - The select mode of the tablepublic com.vaadin.shared.ui.MultiSelectMode getMultiSelectMode()
public void addHeaderClickListener(Table.HeaderClickListener listener)
The listener will receive events which contain information about which column was clicked and some details about the mouse event.
listener - The handler which should handle the header click events.@Deprecated public void addListener(Table.HeaderClickListener listener)
addHeaderClickListener(HeaderClickListener)public void removeHeaderClickListener(Table.HeaderClickListener listener)
listener - The listener to remove.@Deprecated public void removeListener(Table.HeaderClickListener listener)
removeHeaderClickListener(HeaderClickListener)public void addFooterClickListener(Table.FooterClickListener listener)
The listener will receive events which contain information about which column was clicked and some details about the mouse event.
listener - The handler which should handle the footer click events.@Deprecated public void addListener(Table.FooterClickListener listener)
addFooterClickListener(FooterClickListener)public void removeFooterClickListener(Table.FooterClickListener listener)
listener - The listener to remove.@Deprecated public void removeListener(Table.FooterClickListener listener)
removeFooterClickListener(FooterClickListener)public String getColumnFooter(Object propertyId)
propertyId - The propertyId of the column *public void setColumnFooter(Object propertyId, String footer)
propertyId - The properyId of the columnfooter - The caption of the footerpublic void setFooterVisible(boolean visible)
The footer can be used to add column related data like sums to the bottom of the Table using setColumnFooter(Object propertyId, String footer).
visible - Should the footer be visiblepublic boolean isFooterVisible()
public void addColumnResizeListener(Table.ColumnResizeListener listener)
listener - The listener to attach to the Table@Deprecated public void addListener(Table.ColumnResizeListener listener)
addColumnResizeListener(ColumnResizeListener)public void removeColumnResizeListener(Table.ColumnResizeListener listener)
listener - The listener to remove@Deprecated public void removeListener(Table.ColumnResizeListener listener)
removeColumnResizeListener(ColumnResizeListener)public void addColumnReorderListener(Table.ColumnReorderListener listener)
listener - The listener to attach to the Table@Deprecated public void addListener(Table.ColumnReorderListener listener)
addColumnReorderListener(ColumnReorderListener)public void removeColumnReorderListener(Table.ColumnReorderListener listener)
listener - The listener to remove@Deprecated public void removeListener(Table.ColumnReorderListener listener)
removeColumnReorderListener(ColumnReorderListener)public void addColumnCollapseListener(Table.ColumnCollapseListener listener)
listener - The listener to attachpublic void removeColumnCollapseListener(Table.ColumnCollapseListener listener)
listener - The listener to removepublic void setItemDescriptionGenerator(AbstractSelect.ItemDescriptionGenerator generator)
generator - The generator to use or null to disablepublic AbstractSelect.ItemDescriptionGenerator getItemDescriptionGenerator()
public void setRowGenerator(Table.RowGenerator generator)
generator - the new row generatorpublic Table.RowGenerator getRowGenerator()
public void setConverter(Object propertyId, Converter<String,?> converter)
The converter is used to format the the data for the given property id before displaying it in the table.
propertyId - The propertyId to format using the converterconverter - The converter to use for the property idprotected boolean hasConverter(Object propertyId)
propertyId - The propertyId to checkpublic Converter<String,Object> getConverter(Object propertyId)
propertyId - The propertyId to checkpublic void setVisible(boolean visible)
setVisible in interface ComponentsetVisible in class AbstractComponentpublic Iterator<Component> iterator()
iterator in interface HasComponentsiterator in interface Iterable<Component>@Deprecated public Iterator<Component> getComponentIterator()
iterator() instead.public void readDesign(org.jsoup.nodes.Element design,
DesignContext context)
readDesign in interface ComponentreadDesign in class AbstractSelectprotected void readItems(org.jsoup.nodes.Element design,
DesignContext context)
readItems in class AbstractSelectprotected void readBody(org.jsoup.nodes.Element design,
DesignContext context)
protected Object readItem(org.jsoup.nodes.Element tr, Set<String> selected, DesignContext context)
AbstractSelectreadItem in class AbstractSelecttr - a child element representing the itemselected - A set accumulating selected items. If the item that is read is
marked as selected, its item id should be added to this set.context - the DesignContext instance used in parsingpublic void writeDesign(org.jsoup.nodes.Element design,
DesignContext context)
writeDesign in interface ComponentwriteDesign in class AbstractSelectprotected void writeItems(org.jsoup.nodes.Element design,
DesignContext context)
AbstractSelectwriteItems in class AbstractSelectdesign - the element into which to insert the itemscontext - the DesignContext instance used in writingprotected org.jsoup.nodes.Element writeItem(org.jsoup.nodes.Element tbody,
Object itemId,
DesignContext context)
AbstractSelectwriteItem in class AbstractSelecttbody - the element into which to insert the itemitemId - the id of the item to writecontext - the DesignContext instance used in writingprotected Collection<String> getCustomAttributes()
getCustomAttributes in class AbstractField<Object>protected TableState getState()
getState in class AbstractSelectprotected TableState getState(boolean markAsDirty)
getState in class AbstractSelectpublic void setChildMeasurementHint(HasChildMeasurementHint.ChildMeasurementHint hint)
setChildMeasurementHint in interface HasChildMeasurementHintpublic HasChildMeasurementHint.ChildMeasurementHint getChildMeasurementHint()
getChildMeasurementHint in interface HasChildMeasurementHintpublic void setCollapseMenuContent(CollapseMenuContent content)
CollapseMenuContent.ALL_COLUMNS.content - the desired collapsible menu content settingpublic CollapseMenuContent getCollapseMenuContent()
CollapseMenuContent.ALL_COLUMNS .Copyright © 2019 Vaadin Ltd. All rights reserved.