com.vaadin.ui.

Class Grid.ItemClick<T>

  • Type Parameters:

    T - the grid bean type

    All Implemented Interfaces:

    Serializable

    Enclosing class:

    Grid<T>

    public static class Grid.ItemClick<T>
    extends ConnectorEvent

    An event fired when an item in the Grid has been clicked.

    See Also:

    Serialized Form

    • Constructor Detail

      • ItemClick

        public ItemClick​(Grid<T> source,
                         Grid.Column<T,​?> column,
                         T item,
                         MouseEventDetails mouseEventDetails,
                         int rowIndex)

        Creates a new ItemClick event containing the given item and Column originating from the given Grid.

        Parameters:

        source - the grid where the event originated from

        column - the column that contains the clicked cell

        item - the item that was clicked

        mouseEventDetails - mouse event details about the click

        rowIndex - the index of the row that contains the clicked cell

    • Method Detail

      • getItem

        public T getItem()

        Returns the clicked item.

        Returns:

        the clicked item

      • getColumn

        public Grid.Column<T,​?> getColumn()

        Returns the clicked column.

        Returns:

        the clicked column

      • getSource

        public Grid<T> getSource()

        Returns the source Grid.

        Overrides:

        getSource in class EventObject

        Returns:

        the grid

      • getMouseEventDetails

        public MouseEventDetails getMouseEventDetails()

        Returns the mouse event details.

        Returns:

        the mouse event details

      • getRowIndex

        public int getRowIndex()

        Returns the clicked rowIndex.

        Returns:

        the clicked rowIndex

        Since:

        8.4