Class Table

    • Constructor Detail

      • Table

        public Table()
        Deprecated.
        Creates a new empty table.
      • Table

        public Table​(String caption)
        Deprecated.
        Creates a new empty table with caption.
        Parameters:
        caption -
      • Table

        public Table​(String caption,
                     Container dataSource)
        Deprecated.
        Creates a new table with caption and connect it to a Container.
        Parameters:
        caption -
        dataSource -
    • Method Detail

      • getVisibleColumns

        public Object[] getVisibleColumns()
        Deprecated.
        Gets the array of visible column id:s, including generated columns.

        The columns are show in the order of their appearance in this array.

        Returns:
        an array of currently visible propertyIds and generated column ids.
      • setVisibleColumns

        public void setVisibleColumns​(Object... visibleColumns)
        Deprecated.
        Sets the array of visible column property id:s.

        The columns are show in the order of their appearance in this array.

        Parameters:
        visibleColumns - the Array of shown property id:s.
      • getColumnHeaders

        public String[] getColumnHeaders()
        Deprecated.
        Gets the headers of the columns.

        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().

        Returns:
        the Array of column headers.
      • setColumnHeaders

        public void setColumnHeaders​(String... columnHeaders)
        Deprecated.
        Sets the headers of the columns.

        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.

        Parameters:
        columnHeaders - the Array of column headers that match the getVisibleColumns() method.
      • setColumnWidth

        public void setColumnWidth​(Object propertyId,
                                   int width)
        Deprecated.
        Sets columns width (in pixels). Theme may not necessarily respect very small or very big values. Setting width to -1 (default) means that theme will make decision of width.

        Column can either have a fixed width or expand ratio. The latter one set is used. See @link setColumnExpandRatio(Object, float).

        Parameters:
        propertyId - columns property id
        width - width to be reserved for columns content
        Since:
        4.0.3
      • setColumnExpandRatio

        public void setColumnExpandRatio​(Object propertyId,
                                         float expandRatio)
        Deprecated.
        Sets the column expand ratio for given column.

        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.

        Parameters:
        propertyId - columns property id
        expandRatio - the expandRatio used to divide excess space for this column
      • getColumnExpandRatio

        public float getColumnExpandRatio​(Object propertyId)
        Deprecated.
        Gets the column expand ratio for a column. See setColumnExpandRatio(Object, float)
        Parameters:
        propertyId - columns property id
        Returns:
        the expandRatio used to divide excess space for this column
      • getColumnWidth

        public int getColumnWidth​(Object propertyId)
        Deprecated.
        Gets the pixel width of column.
        Parameters:
        propertyId -
        Returns:
        width of column or -1 when value not set
      • getPageLength

        public int getPageLength()
        Deprecated.
        Gets the page length.

        Setting page length 0 disables paging.

        Returns:
        the Length of one page.
      • setPageLength

        public void setPageLength​(int pageLength)
        Deprecated.
        Sets the page length.

        Setting page length 0 disables paging. The page length defaults to 15.

        If Table has height set (AbstractComponent.setHeight(float, Unit) ) the client side may update the page length automatically the correct value.

        Parameters:
        pageLength - the length of one page.
      • setCacheRate

        public void setCacheRate​(double cacheRate)
        Deprecated.
        This method adjusts a possible caching mechanism of table implementation.

        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..

        Parameters:
        cacheRate - a value over 0 (fastest rendering time). Higher value will cache more rows on server (smoother scrolling). Default value is 2.
      • getCacheRate

        public double getCacheRate()
        Deprecated.
        Returns:
        the current cache rate value
        See Also:
        setCacheRate(double)
      • getCurrentPageFirstItemId

        public Object getCurrentPageFirstItemId()
        Deprecated.
        Getter for property currentPageFirstItem.
        Returns:
        the Value of property currentPageFirstItem.
      • setCurrentPageFirstItemId

        public void setCurrentPageFirstItemId​(Object currentPageFirstItemId)
        Deprecated.
        Setter for property currentPageFirstItemId.
        Parameters:
        currentPageFirstItemId - the New value of property currentPageFirstItemId.
      • indexOfId

        protected int indexOfId​(Object itemId)
        Deprecated.
      • getColumnIcon

        public Resource getColumnIcon​(Object propertyId)
        Deprecated.
        Gets the icon Resource for the specified column.
        Parameters:
        propertyId - the propertyId identifying the column.
        Returns:
        the icon for the specified column; null if the column has no icon set, or if the column is not visible.
      • setColumnIcon

        public void setColumnIcon​(Object propertyId,
                                  Resource icon)
        Deprecated.
        Sets the icon Resource for the specified column.

        Throws IllegalArgumentException if the specified column is not visible.

        Parameters:
        propertyId - the propertyId identifying the column.
        icon - the icon Resource to set.
      • getColumnHeader

        public String getColumnHeader​(Object propertyId)
        Deprecated.
        Gets the header for the specified column.
        Parameters:
        propertyId - the propertyId identifying the column.
        Returns:
        the header for the specified column if it has one.
      • setColumnHeader

        public void setColumnHeader​(Object propertyId,
                                    String header)
        Deprecated.
        Sets the column header for the specified column.
        Parameters:
        propertyId - the propertyId identifying the column.
        header - the header to set.
      • getColumnAlignment

        public Table.Align getColumnAlignment​(Object propertyId)
        Deprecated.
        Gets the specified column's alignment.
        Parameters:
        propertyId - the propertyID identifying the column.
        Returns:
        the specified column's alignment if it as one; Table.Align.LEFT otherwise.
      • setColumnAlignment

        public void setColumnAlignment​(Object propertyId,
                                       Table.Align alignment)
        Deprecated.
        Sets the specified column's alignment.

        Throws IllegalArgumentException if the alignment is not one of the following: Table.Align.LEFT, Table.Align.CENTER or Table.Align.RIGHT

        Parameters:
        propertyId - the propertyID identifying the column.
        alignment - the desired alignment.
      • isColumnCollapsed

        public boolean isColumnCollapsed​(Object propertyId)
        Deprecated.
        Checks if the specified column is collapsed.
        Parameters:
        propertyId - the propertyID identifying the column.
        Returns:
        true if the column is collapsed; false otherwise;
      • setColumnCollapsed

        public void setColumnCollapsed​(Object propertyId,
                                       boolean collapsed)
                                throws IllegalStateException
        Deprecated.
        Sets whether the specified column is collapsed or not.
        Parameters:
        propertyId - the propertyID identifying the column.
        collapsed - the desired collapsedness.
        Throws:
        IllegalStateException - if column collapsing is not allowed
        IllegalArgumentException - if the property id does not exist
      • isColumnCollapsingAllowed

        public boolean isColumnCollapsingAllowed()
        Deprecated.
        Checks if column collapsing is allowed.
        Returns:
        true if columns can be collapsed; false otherwise.
      • setColumnCollapsingAllowed

        public void setColumnCollapsingAllowed​(boolean collapsingAllowed)
        Deprecated.
        Sets whether column collapsing is allowed or not.
        Parameters:
        collapsingAllowed - specifies whether column collapsing is allowed.
      • setColumnCollapsible

        public void setColumnCollapsible​(Object propertyId,
                                         boolean collapsible)
        Deprecated.
        Sets whether the given column is collapsible. Note that collapsible columns can only be actually collapsed (via UI or with setColumnCollapsed()) if isColumnCollapsingAllowed() is true. By default all columns are collapsible.
        Parameters:
        propertyId - the propertyID identifying the column.
        collapsible - true if the column should be collapsible, false otherwise.
      • isColumnCollapsible

        public boolean isColumnCollapsible​(Object propertyId)
        Deprecated.
        Checks if the given column is collapsible. Note that even if this method returns true, the column can only be actually collapsed (via UI or with setColumnCollapsed()) if isColumnCollapsingAllowed() is also true.
        Returns:
        true if the column can be collapsed; false otherwise.
      • isColumnReorderingAllowed

        public boolean isColumnReorderingAllowed()
        Deprecated.
        Checks if column reordering is allowed.
        Returns:
        true if columns can be reordered; false otherwise.
      • setColumnReorderingAllowed

        public void setColumnReorderingAllowed​(boolean columnReorderingAllowed)
        Deprecated.
        Sets whether column reordering is allowed or not.
        Parameters:
        columnReorderingAllowed - specifies whether column reordering is allowed.
      • getCurrentPageFirstItemIndex

        public int getCurrentPageFirstItemIndex()
        Deprecated.
        Getter for property currentPageFirstItem.
        Returns:
        the Value of property currentPageFirstItem.
      • setCurrentPageFirstItemIndex

        public void setCurrentPageFirstItemIndex​(int newIndex)
        Deprecated.
        Setter for property currentPageFirstItem.
        Parameters:
        newIndex - the New value of property currentPageFirstItem.
      • isSelectable

        public boolean isSelectable()
        Deprecated.
        Returns whether table is selectable.

        The table is not selectable until it's explicitly set as selectable or at least one Property.ValueChangeListener is added.

        Returns:
        whether table is selectable.
      • setSelectable

        public void setSelectable​(boolean selectable)
        Deprecated.
        Setter for property selectable.

        The table is not selectable until it's explicitly set as selectable via this method or alternatively at least one Property.ValueChangeListener is added.

        Parameters:
        selectable - the New value of property selectable.
      • getColumnHeaderMode

        public Table.ColumnHeaderMode getColumnHeaderMode()
        Deprecated.
        Getter for property columnHeaderMode.
        Returns:
        the Value of property columnHeaderMode.
      • setColumnHeaderMode

        public void setColumnHeaderMode​(Table.ColumnHeaderMode columnHeaderMode)
        Deprecated.
        Setter for property columnHeaderMode.
        Parameters:
        columnHeaderMode - the New value of property columnHeaderMode.
      • refreshRenderedCells

        protected void refreshRenderedCells()
        Deprecated.
        Refreshes the rows in the internal cache. Only if resetPageBuffer() is called before this then all values are guaranteed to be recreated.
      • getItemIds

        protected List<Object> getItemIds​(int firstIndex,
                                          int rows)
        Deprecated.
      • registerComponent

        protected void registerComponent​(Component component)
        Deprecated.
      • unregisterComponent

        protected void unregisterComponent​(Component component)
        Deprecated.
        This method cleans up a Component that has been generated when Table is in editable mode. The component needs to be detached from its parent and if it is a field, it needs to be detached from its property data source in order to allow garbage collection to take care of removing the unused component from memory. Override this method and getPropertyValue(Object, Object, Property) with custom logic if you need to deal with buffered fields.
        Parameters:
        component - component that should be unregistered.
        See Also:
        getPropertyValue(Object, Object, Property)
      • addItem

        public Object addItem​(Object[] cells,
                              Object itemId)
                       throws UnsupportedOperationException
        Deprecated.
        Adds the new row to table and fill the visible cells (except generated columns) with given values.
        Parameters:
        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.
        Returns:
        Returns item id for the new row. Returns null if operation fails.
        Throws:
        UnsupportedOperationException
      • refreshRowCache

        public void refreshRowCache()
        Deprecated.
        Discards and recreates the internal row cache. Call this if you make changes that affect the rows but the information about the changes are not automatically propagated to the Table.

        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.

        Since:
        6.7.2
      • setContainerDataSource

        public void setContainerDataSource​(Container newDataSource,
                                           Collection<?> visibleIds)
        Deprecated.
        Sets the container data source and the columns that will be visible. Columns are shown in the collection's iteration order.

        Keeps propertyValueConverters if the corresponding id exists in the new data source and is of a compatible type.

        Parameters:
        newDataSource - the new data source.
        visibleIds - IDs of the visible columns
        See Also:
        setContainerDataSource(Container), setVisibleColumns(Object[]), setConverter(Object, Converter)
      • disableContentRefreshing

        protected boolean disableContentRefreshing()
        Deprecated.
        Go to mode where content updates are not done. This is due we want to bypass expensive content for some reason (like when we know we may have other content changes on their way).
        Returns:
        true if content refresh flag was enabled prior this call
      • enableContentRefreshing

        protected void enableContentRefreshing​(boolean refreshContent)
        Deprecated.
        Go to mode where content content refreshing has effect.
        Parameters:
        refreshContent - true if content refresh needs to be done
      • isRowCacheInvalidated

        protected boolean isRowCacheInvalidated()
        Deprecated.
      • isPartialRowUpdate

        protected boolean isPartialRowUpdate()
        Deprecated.
        Subclass and override this to enable partial row updates and additions, which bypass the normal caching mechanism. This is useful for e.g. TreeTable.
        Returns:
        true if this update is a partial row update, false if not. For plain Table it is always false.
      • getFirstAddedItemIndex

        protected int getFirstAddedItemIndex()
        Deprecated.
        Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
        Returns:
        The index of the first added item. For plain Table it is always 0.
      • getAddedRowCount

        protected int getAddedRowCount()
        Deprecated.
        Subclass and override this to enable partial row additions, bypassing the normal caching mechanism. This is useful for e.g. TreeTable, where expanding a node should only fetch and add the items inside of that node.
        Returns:
        the number of rows to be added, starting at the index returned by getFirstAddedItemIndex(). For plain Table it is always 0.
      • shouldHideAddedRows

        protected boolean shouldHideAddedRows()
        Deprecated.
        Subclass and override this to enable removing of rows, bypassing the normal caching and lazy loading mechanism. This is useful for e.g. TreeTable, when you need to hide certain rows as a node is collapsed. This should return true if the rows pointed to by getFirstAddedItemIndex() and getAddedRowCount() should be hidden instead of added.
        Returns:
        whether the rows to add (see getFirstAddedItemIndex() and getAddedRowCount()) should be added or hidden. For plain Table it is always false.
      • getFirstUpdatedItemIndex

        protected int getFirstUpdatedItemIndex()
        Deprecated.
        Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism.
        Returns:
        the index of the first item to be updated. For plain Table it is always 0.
      • getUpdatedRowCount

        protected int getUpdatedRowCount()
        Deprecated.
        Subclass and override this to enable partial row updates, bypassing the normal caching and lazy loading mechanism. This is useful for updating the state of certain rows, e.g. in the TreeTable the collapsed state of a single node is updated using this mechanism.
        Returns:
        the number of rows to update, starting at the index returned by getFirstUpdatedItemIndex(). For plain table it is always 0.
      • rowHeadersAreEnabled

        protected boolean rowHeadersAreEnabled()
        Deprecated.
        Checks whether row headers are visible.
        Returns:
        false if row headers are hidden, true otherwise
        Since:
        7.3.9
      • paintRowAttributes

        protected void paintRowAttributes​(PaintTarget target,
                                          Object itemId)
                                   throws PaintException
        Deprecated.
        A method where extended Table implementations may add their custom attributes for rows.
        Parameters:
        target -
        itemId -
        Throws:
        PaintException
      • getPropertyValue

        protected Object getPropertyValue​(Object rowId,
                                          Object colId,
                                          Property property)
        Deprecated.
        Gets the value of property. By default if the table is editable the fieldFactory is used to create editors for table cells. Otherwise formatPropertyValue is used to format the value representation.
        Parameters:
        rowId - the Id of the row (same as item Id).
        colId - the Id of the column.
        property - the Property to be presented.
        Returns:
        Object Either formatted value or Component for field.
        See Also:
        setTableFieldFactory(TableFieldFactory)
      • bindPropertyToField

        protected void bindPropertyToField​(Object rowId,
                                           Object colId,
                                           Property property,
                                           Field field)
        Deprecated.
        Binds an item property to a field generated by TableFieldFactory. The default behavior is to bind property straight to Field. If Property.Viewer type property (e.g. PropertyFormatter) is already set for field, the property is bound to that Property.Viewer.
        Parameters:
        rowId -
        colId -
        property -
        field -
        Since:
        6.7.3
      • formatPropertyValue

        protected String formatPropertyValue​(Object rowId,
                                             Object colId,
                                             Property<?> property)
        Deprecated.
        Formats table cell property values. By default the property.toString() and return a empty string for null properties.
        Parameters:
        rowId - the Id of the row (same as item Id).
        colId - the Id of the column.
        property - the Property to be formatted.
        Returns:
        the String representation of property and its value.
        Since:
        3.1
      • removeAllActionHandlers

        public void removeAllActionHandlers()
        Deprecated.
        Removes all action handlers.
      • resetPageBuffer

        protected void resetPageBuffer()
        Deprecated.
        Clears the current page buffer. Call this before refreshRenderedCells() to ensure that all content is updated from the properties.
      • addContainerProperty

        public boolean addContainerProperty​(Object propertyId,
                                            Class<?> type,
                                            Object defaultValue,
                                            String columnHeader,
                                            Resource columnIcon,
                                            Table.Align columnAlignment)
                                     throws UnsupportedOperationException
        Deprecated.
        Adds a new property to the table and show it as a visible column.
        Parameters:
        propertyId - the Id of the property
        type - the class of the property
        defaultValue - the default value given for all existing items
        columnHeader - 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.
        Throws:
        UnsupportedOperationException - if the operation is not supported.
        See Also:
        Container.addContainerProperty(Object, Class, Object)
      • addGeneratedColumn

        public void addGeneratedColumn​(Object id,
                                       Table.ColumnGenerator generatedColumn)
        Deprecated.
        Adds a generated column to the Table.

        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.

        Parameters:
        id - the id of the column to be added
        generatedColumn - the Table.ColumnGenerator to use for this column
      • removeGeneratedColumn

        public boolean removeGeneratedColumn​(Object columnId)
        Deprecated.
        Removes a generated column previously added with addGeneratedColumn.
        Parameters:
        columnId - id of the generated column to remove
        Returns:
        true if the column could be removed (existed in the Table)
      • getVisibleItemIds

        public Collection<?> getVisibleItemIds()
        Deprecated.
        Returns item identifiers of the items which are currently rendered on the client.

        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.

        Overrides:
        getVisibleItemIds in class AbstractSelect
        See Also:
        AbstractSelect.getVisibleItemIds()
      • isFirstId

        public boolean isFirstId​(Object itemId)
        Deprecated.
        Tests if the Item corresponding to the given Item ID is the first Item in the Container.
        Specified by:
        isFirstId in interface Container.Ordered
        Parameters:
        itemId - ID of an Item in the Container
        Returns:
        true if the Item is first visible item in the Container, false if not
        See Also:
        Container.Ordered.isFirstId(java.lang.Object)
      • setTableFieldFactory

        public void setTableFieldFactory​(TableFieldFactory fieldFactory)
        Deprecated.
        Sets the TableFieldFactory that is used to create editor for table cells. The TableFieldFactory is only used if the Table is editable. By default the DefaultFieldFactory is used.
        Parameters:
        fieldFactory - the field factory to set.
        See Also:
        isEditable(), DefaultFieldFactory
      • getTableFieldFactory

        public TableFieldFactory getTableFieldFactory()
        Deprecated.
        Gets the TableFieldFactory that is used to create editor for table cells. The FieldFactory is only used if the Table is editable.
        Returns:
        TableFieldFactory used to create the Field instances.
        See Also:
        isEditable()
      • isEditable

        public boolean isEditable()
        Deprecated.
        Is table editable. If table is editable a editor of type Field is created for each table cell. The assigned TableFieldFactory is used to create the instances. To provide custom editors for table cells create a class implementing the TableFieldFactory interface, and assign it to table, and set the editable property to true.
        Returns:
        true if table is editable, false otherwise.
        See Also:
        Field, TableFieldFactory
      • setEditable

        public void setEditable​(boolean editable)
        Deprecated.
        Sets the editable property. If table is editable a editor of type Field is created for each table cell. The assigned TableFieldFactory is used to create the instances. To provide custom editors for table cells create a class implementing the TableFieldFactory interface, and assign it to table, and set the editable property to true.
        Parameters:
        editable - true if table should be editable by user.
        See Also:
        Field, TableFieldFactory
      • sort

        public void sort()
        Deprecated.
        Sorts the table by currently selected sorting column.
        Throws:
        UnsupportedOperationException - if the container data source does not implement Container.Sortable
      • getSortContainerPropertyId

        public Object getSortContainerPropertyId()
        Deprecated.
        Gets the currently sorted column property ID.
        Returns:
        the Container property id of the currently sorted column.
      • setSortContainerPropertyId

        public void setSortContainerPropertyId​(Object propertyId)
        Deprecated.
        Sets the currently sorted column property id.
        Parameters:
        propertyId - the Container property id of the currently sorted column.
      • isSortAscending

        public boolean isSortAscending()
        Deprecated.
        Is the table currently sorted in ascending order.
        Returns:
        true if ascending, false if descending.
      • setSortAscending

        public void setSortAscending​(boolean ascending)
        Deprecated.
        Sets the table in ascending order.
        Parameters:
        ascending - true if ascending, false if descending.
      • isSortDisabled

        @Deprecated
        public boolean isSortDisabled()
        Deprecated.
        As of 7.0, use isSortEnabled() instead
        Is sorting disabled altogether. True if no sortable columns are given even in the case where data source would support this.
        Returns:
        True if sorting is disabled.
      • isSortEnabled

        public boolean isSortEnabled()
        Deprecated.
        Checks if sorting is enabled.
        Returns:
        true if sorting by the user is allowed, false otherwise
      • setSortDisabled

        @Deprecated
        public void setSortDisabled​(boolean sortDisabled)
        Deprecated.
        As of 7.0, use setSortEnabled(boolean) instead
        Disables the sorting by the user altogether.
        Parameters:
        sortDisabled - True if sorting is disabled.
      • setSortEnabled

        public void setSortEnabled​(boolean sortEnabled)
        Deprecated.
        Enables or disables sorting.

        Setting this to false disallows sorting by the user. It is still possible to call sort().

        Parameters:
        sortEnabled - true to allow the user to sort the table, false to disallow it
      • setCellStyleGenerator

        public void setCellStyleGenerator​(Table.CellStyleGenerator cellStyleGenerator)
        Deprecated.
        Set cell style generator for Table.
        Parameters:
        cellStyleGenerator - New cell style generator or null to remove generator.
      • getCellStyleGenerator

        public Table.CellStyleGenerator getCellStyleGenerator()
        Deprecated.
        Get the current cell style generator.
      • setDragMode

        public void setDragMode​(Table.TableDragMode newDragMode)
        Deprecated.
        Sets the drag start mode of the Table. Drag start mode controls how Table behaves as a drag source.
        Parameters:
        newDragMode -
      • getDragMode

        public Table.TableDragMode getDragMode()
        Deprecated.
        Returns:
        the current start mode of the Table. Drag start mode controls how Table behaves as a drag source.
      • setDropHandler

        public void setDropHandler​(DropHandler dropHandler)
        Deprecated.
      • setMultiSelectMode

        public 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.

        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 unless touch multi select is explicitly disabled.

        Parameters:
        mode - The select mode of the table
        See Also:
        setMultiSelectTouchDetectionEnabled(boolean)
      • getMultiSelectMode

        public com.vaadin.shared.ui.MultiSelectMode getMultiSelectMode()
        Deprecated.
        Returns the select mode in which multi-select is used.
        Returns:
        The multi select mode
      • setMultiSelectTouchDetectionEnabled

        public void setMultiSelectTouchDetectionEnabled​(boolean multiSelectTouchDetectionEnabled)
        Deprecated.
        Default behavior on touch-reporting devices is to switch from CTRL/SHIFT based multi-selection to simple mode, but you can use this method to explicitly disable the touch device detection. Thus you can keep using keyboard-based multi selection on hybrid devices that have both a touch screen and a keyboard.
        Parameters:
        multiSelectTouchDetectionEnabled - Whether to enable or disable touch screen detection
      • isMultiSelectTouchDetectionEnabled

        public boolean isMultiSelectTouchDetectionEnabled()
        Deprecated.
        Returns if touch screen detection is used to toggle multi select mode.
        Returns:
        If touch screen detection for multi select is enabled
      • addHeaderClickListener

        public 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.

        The listener will receive events which contain information about which column was clicked and some details about the mouse event.

        Parameters:
        listener - The handler which should handle the header click events.
      • removeHeaderClickListener

        public void removeHeaderClickListener​(Table.HeaderClickListener listener)
        Deprecated.
        Removes a header click listener.
        Parameters:
        listener - The listener to remove.
      • addFooterClickListener

        public 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.

        The listener will receive events which contain information about which column was clicked and some details about the mouse event.

        Parameters:
        listener - The handler which should handle the footer click events.
      • removeFooterClickListener

        public void removeFooterClickListener​(Table.FooterClickListener listener)
        Deprecated.
        Removes a footer click listener.
        Parameters:
        listener - The listener to remove.
      • getColumnFooter

        public String getColumnFooter​(Object propertyId)
        Deprecated.
        Gets the footer caption beneath the rows.
        Parameters:
        propertyId - The propertyId of the column *
        Returns:
        The caption of the footer or NULL if not set
      • setColumnFooter

        public void setColumnFooter​(Object propertyId,
                                    String footer)
        Deprecated.
        Sets the column footer caption. The column footer caption is the text displayed beneath the column if footers have been set visible.
        Parameters:
        propertyId - The properyId of the column
        footer - The caption of the footer
      • setFooterVisible

        public void setFooterVisible​(boolean visible)
        Deprecated.
        Sets the footer visible in the bottom of the table.

        The footer can be used to add column related data like sums to the bottom of the Table using setColumnFooter(Object propertyId, String footer).

        Parameters:
        visible - Should the footer be visible
      • isFooterVisible

        public boolean isFooterVisible()
        Deprecated.
        Is the footer currently visible?
        Returns:
        Returns true if visible else false
      • addColumnResizeListener

        public void addColumnResizeListener​(Table.ColumnResizeListener listener)
        Deprecated.
        Adds a column resize listener to the Table. A column resize listener is called when a user resizes a columns width.
        Parameters:
        listener - The listener to attach to the Table
      • removeColumnResizeListener

        public void removeColumnResizeListener​(Table.ColumnResizeListener listener)
        Deprecated.
        Removes a column resize listener from the Table.
        Parameters:
        listener - The listener to remove
      • addColumnReorderListener

        public void addColumnReorderListener​(Table.ColumnReorderListener listener)
        Deprecated.
        Adds a column reorder listener to the Table. A column reorder listener is called when a user reorders columns.
        Parameters:
        listener - The listener to attach to the Table
      • removeColumnReorderListener

        public void removeColumnReorderListener​(Table.ColumnReorderListener listener)
        Deprecated.
        Removes a column reorder listener from the Table.
        Parameters:
        listener - The listener to remove
      • addColumnCollapseListener

        public void addColumnCollapseListener​(Table.ColumnCollapseListener listener)
        Deprecated.
        Adds a column collapse listener to the Table. A column collapse listener is called when the collapsed state of a column changes.
        Parameters:
        listener - The listener to attach
        Since:
        7.6
      • removeColumnCollapseListener

        public void removeColumnCollapseListener​(Table.ColumnCollapseListener listener)
        Deprecated.
        Removes a column reorder listener from the Table.
        Parameters:
        listener - The listener to remove
        Since:
        7.6
      • setItemDescriptionGenerator

        public void setItemDescriptionGenerator​(AbstractSelect.ItemDescriptionGenerator generator)
        Deprecated.
        Set the item description generator which generates tooltips for cells and rows in the Table.
        Parameters:
        generator - The generator to use or null to disable
      • getItemDescriptionGenerator

        public AbstractSelect.ItemDescriptionGenerator getItemDescriptionGenerator()
        Deprecated.
        Get the item description generator which generates tooltips for cells and rows in the Table.
      • setRowGenerator

        public void setRowGenerator​(Table.RowGenerator generator)
        Deprecated.
        Assigns a row generator to the table. The row generator will be able to replace rows in the table when it is rendered.
        Parameters:
        generator - the new row generator
      • getRowGenerator

        public Table.RowGenerator getRowGenerator()
        Deprecated.
        Returns:
        the current row generator
      • setConverter

        public void setConverter​(Object propertyId,
                                 Converter<String,​?> converter)
        Deprecated.
        Sets a converter for a property id.

        The converter is used to format the the data for the given property id before displaying it in the table.

        Parameters:
        propertyId - The propertyId to format using the converter
        converter - The converter to use for the property id
      • hasConverter

        protected boolean hasConverter​(Object propertyId)
        Deprecated.
        Checks if there is a converter set explicitly for the given property id.
        Parameters:
        propertyId - The propertyId to check
        Returns:
        true if a converter has been set for the property id, false otherwise
      • getConverter

        public Converter<String,​Object> getConverter​(Object propertyId)
        Deprecated.
        Returns the converter used to format the given propertyId.
        Parameters:
        propertyId - The propertyId to check
        Returns:
        The converter used to format the propertyId or null if no converter has been set
      • readBody

        protected void readBody​(org.jsoup.nodes.Element design,
                                DesignContext context)
        Deprecated.
      • readItem

        protected Object readItem​(org.jsoup.nodes.Element tr,
                                  Set<String> selected,
                                  DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Reads an Item from a design and inserts it into the data source. Hierarchical select components should override this method to recursively recursively read any child items as well.
        Overrides:
        readItem in class AbstractSelect
        Parameters:
        tr - a child element representing the item
        selected - 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 parsing
        Returns:
        the item id of the new item
      • writeItems

        protected void writeItems​(org.jsoup.nodes.Element design,
                                  DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Writes the data source items to a design. Hierarchical select components should override this method to only write the root items.
        Overrides:
        writeItems in class AbstractSelect
        Parameters:
        design - the element into which to insert the items
        context - the DesignContext instance used in writing
      • writeItem

        protected org.jsoup.nodes.Element writeItem​(org.jsoup.nodes.Element tbody,
                                                    Object itemId,
                                                    DesignContext context)
        Deprecated.
        Description copied from class: AbstractSelect
        Writes a data source Item to a design. Hierarchical select components should override this method to recursively write any child items as well.
        Overrides:
        writeItem in class AbstractSelect
        Parameters:
        tbody - the element into which to insert the item
        itemId - the id of the item to write
        context - the DesignContext instance used in writing
        Returns:
      • setCollapseMenuContent

        public void setCollapseMenuContent​(CollapseMenuContent content)
        Deprecated.
        Sets whether only collapsible columns should be shown to the user in the column collapse menu. The default is CollapseMenuContent.ALL_COLUMNS.
        Parameters:
        content - the desired collapsible menu content setting
        Since:
        7.6
      • getCollapseMenuContent

        public CollapseMenuContent getCollapseMenuContent()
        Deprecated.
        Checks whether only collapsible columns are shown to the user in the column collapse menu. The default is CollapseMenuContent.ALL_COLUMNS .
        Returns:
        the current collapsible menu content setting
        Since:
        7.6