Package com.vaadin.event
Class CollapseEvent<T>
- java.lang.Object
-
- java.util.EventObject
-
- com.vaadin.event.ConnectorEvent
-
- com.vaadin.ui.Component.Event
-
- com.vaadin.event.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
CollapseEvent.CollapseListener<T>
Item collapse event listener.
-
Field Summary
-
Fields inherited from class java.util.EventObject
source
-
-
Constructor Summary
Constructors Constructor Description CollapseEvent(Component source, T collapsedItem, boolean userOriginated)
Construct a collapse event.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getCollapsedItem()
Get the collapsed item that triggered this event.boolean
isUserOriginated()
Returns whether this event was triggered by user interaction, on the client side, or programmatically, on the server side.-
Methods inherited from class com.vaadin.ui.Component.Event
getComponent
-
Methods inherited from class com.vaadin.event.ConnectorEvent
getConnector
-
Methods inherited from class java.util.EventObject
getSource, toString
-
-
-
-
Constructor Detail
-
CollapseEvent
public CollapseEvent(Component source, T collapsedItem, boolean userOriginated)
Construct a collapse event.- Parameters:
source
- the hierarchical component this event originated fromcollapsedItem
- the item that was collapseduserOriginated
- 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 interfaceHasUserOriginated
- Returns:
true
if this event originates from the client,false
otherwise.
-
-