Interface SourceFeatureClickNotifier
- All Known Implementing Classes:
VectorSource
public interface SourceFeatureClickNotifier
Interface to be implemented by sources that support clicks on features.
-
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
addSourceFeatureClickListener
(Consumer<SourceFeatureClickNotifier.SourceFeatureClickEvent> listener) Adds feature click listener.com.vaadin.flow.shared.Registration
addSourceFeatureDoubleClickListener
(Consumer<SourceFeatureClickNotifier.SourceFeatureDoubleClickEvent> listener) Adds feature double click listener.com.vaadin.flow.shared.Registration
addSourceFeatureSingleClickListener
(Consumer<SourceFeatureClickNotifier.SourceFeatureSingleClickEvent> listener) Adds feature single click listener.
-
Method Details
-
addSourceFeatureClickListener
com.vaadin.flow.shared.Registration addSourceFeatureClickListener(Consumer<SourceFeatureClickNotifier.SourceFeatureClickEvent> listener) Adds feature click listener. Note, if the user makes double click on a feature, theSourceFeatureClickNotifier.SourceFeatureClickEvent
will be fired twice.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-
addSourceFeatureSingleClickListener
com.vaadin.flow.shared.Registration addSourceFeatureSingleClickListener(Consumer<SourceFeatureClickNotifier.SourceFeatureSingleClickEvent> 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
-
addSourceFeatureDoubleClickListener
com.vaadin.flow.shared.Registration addSourceFeatureDoubleClickListener(Consumer<SourceFeatureClickNotifier.SourceFeatureDoubleClickEvent> listener) Adds feature double click listener.- Parameters:
listener
- listener to add- Returns:
- a registration object for removing an event listener
-