com.vaadin.client.widget.escalator.

Interface RowContainer

    • Field Summary

      Fields
      Modifier and Type Field Description
      static double INITIAL_DEFAULT_ROW_HEIGHT

      An arbitrary pixel height of a row, before any autodetection for the row height has been made.

    • Method Summary

      All Methods
      Modifier and Type Method Description
      Cell getCell​(com.google.gwt.dom.client.Element element)

      Returns the cell object which contains information about the cell the element is in.

      double getDefaultRowHeight()

      Returns the default height of the rows in this RowContainer.

      com.google.gwt.dom.client.TableSectionElement getElement()

      Returns the root element of RowContainer

      EscalatorUpdater getEscalatorUpdater()

      Returns the current EscalatorUpdater used to render cells.

      int getRowCount()

      Gets the number of rows in the current row container.

      com.google.gwt.dom.client.TableRowElement getRowElement​(int index)

      Gets the row element with given logical index.

      void insertRows​(int index, int numberOfRows)

      Adds rows at a certain index in this row container.

      void refreshRows​(int index, int numberOfRows)

      Refreshes a range of rows in the current row container.

      void removeRows​(int index, int numberOfRows)

      Removes rows at a certain index in the current row container.

      void setDefaultRowHeight​(double px)

      The default height of the rows in this RowContainer.

      void setEscalatorUpdater​(EscalatorUpdater escalatorUpdater)

      Sets the EscalatorUpdater to use when displaying data in the escalator.

    • Field Detail

      • INITIAL_DEFAULT_ROW_HEIGHT

        static final double INITIAL_DEFAULT_ROW_HEIGHT

        An arbitrary pixel height of a row, before any autodetection for the row height has been made.

        See Also:

        Constant Field Values

    • Method Detail

      • removeRows

        void removeRows​(int index,
                        int numberOfRows)
                 throws IndexOutOfBoundsException,
                        IllegalArgumentException

        Removes rows at a certain index in the current row container.

        Parameters:

        index - the index of the first row to be removed

        numberOfRows - the number of rows to remove, starting from the index

        Throws:

        IndexOutOfBoundsException - if any integer number in the range [index..(index+numberOfRows)] is not an existing row index

        IllegalArgumentException - if numberOfRows is less than 1.

      • insertRows

        void insertRows​(int index,
                        int numberOfRows)
                 throws IndexOutOfBoundsException,
                        IllegalArgumentException

        Adds rows at a certain index in this row container.

        The new rows will be inserted between the row at the index, and the row before (an index of 0 means that the rows are inserted at the beginning). Therefore, the rows currently at the index and afterwards will be moved downwards.

        The contents of the inserted rows will subsequently be queried from the escalator updater.

        Note: Only the contents of the inserted rows will be rendered. If inserting new rows affects the contents of existing rows, refreshRows(int, int) needs to be called for those rows separately.

        Parameters:

        index - the index of the row before which new rows are inserted, or getRowCount() to add rows at the end

        numberOfRows - the number of rows to insert after the index

        Throws:

        IndexOutOfBoundsException - if index is not an integer in the range [0..getRowCount()]

        IllegalArgumentException - if numberOfRows is less than 1.

        See Also:

        setEscalatorUpdater(EscalatorUpdater)

      • getRowCount

        int getRowCount()

        Gets the number of rows in the current row container.

        Returns:

        the number of rows in the current row container

      • getDefaultRowHeight

        double getDefaultRowHeight()

        Returns the default height of the rows in this RowContainer.

        This value will be equal to INITIAL_DEFAULT_ROW_HEIGHT if the Escalator has not yet had a chance to autodetect the row height, or no explicit value has yet given via #setDefaultRowHeight(int)

        Returns:

        the default height of the rows in this RowContainer, in pixels

        See Also:

        #setDefaultRowHeight(int)

      • getCell

        Cell getCell​(com.google.gwt.dom.client.Element element)

        Returns the cell object which contains information about the cell the element is in.

        Parameters:

        element - The element to get the cell for. If element is not present in row container then null is returned.

        Returns:

        the cell of the element, or null if element is not present in the RowContainer.

      • getElement

        com.google.gwt.dom.client.TableSectionElement getElement()

        Returns the root element of RowContainer

        Returns:

        RowContainer root element