Interface FeatureClickNotifier<F extends Feature>
- Type Parameters:
F
- type of feature
- All Known Implementing Classes:
LineStringFeature
,MarkerFeature
,MultiLineStringFeature
,MultiMarkerFeature
,MultiPointFeature
,MultiPolygonFeature
,PointFeature
,PolygonFeature
public interface FeatureClickNotifier<F extends Feature>
Interface for features that support adding click listeners.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic class
static class
An event that is fired when feature is clicked.static class
An event is fired when user makes double click on a feature.static class
An event is fired after 250 ms to ensure that it is not a double click. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.Registration
Adds feature click listener.com.vaadin.flow.shared.Registration
Adds feature double click listener.com.vaadin.flow.shared.Registration
Adds feature single click listener.
-
Method Details
-
addClickListener
com.vaadin.flow.shared.Registration addClickListener(Consumer<FeatureClickNotifier.FeatureClickEvent<F>> listener) Adds feature click listener. Note, if the user makes double click on a feature, theFeatureClickNotifier.FeatureClickEvent
will be fired twice.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-
addSingleClickListener
com.vaadin.flow.shared.Registration addSingleClickListener(Consumer<FeatureClickNotifier.FeatureSingleClickEvent<F>> listener) Adds feature single click listener. Single click means that an event won't be fired if the user makes double click.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-
addDoubleClickListener
com.vaadin.flow.shared.Registration addDoubleClickListener(Consumer<FeatureClickNotifier.FeatureDoubleClickEvent<F>> listener) Adds feature double click listener.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-