Class CollapseEvent<T>

  • Type Parameters:
    T - collapsed item type
    All Implemented Interfaces:
    HasUserOriginated, Serializable

    public class CollapseEvent<T>
    extends Component.Event
    implements HasUserOriginated
    An event that is fired when an item is collapsed in a listing component that displays hierarchical data. Note that expanded subtrees of the collapsed item will not trigger collapse events.
    Since:
    8.1
    Author:
    Vaadin Ltd
    See Also:
    Serialized Form
    • Constructor Detail

      • CollapseEvent

        public CollapseEvent​(Component source,
                             T collapsedItem,
                             boolean userOriginated)
        Construct a collapse event.
        Parameters:
        source - the hierarchical component this event originated from
        collapsedItem - the item that was collapsed
        userOriginated - whether the collapse was triggered by a user interaction or the server
    • Method Detail

      • getCollapsedItem

        public T getCollapsedItem()
        Get the collapsed item that triggered this event.
        Returns:
        the collapsed item
      • isUserOriginated

        public boolean isUserOriginated()
        Description copied from interface: HasUserOriginated
        Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.
        Specified by:
        isUserOriginated in interface HasUserOriginated
        Returns:
        true if this event originates from the client, false otherwise.