Interface SourceFeatureClickNotifier
- All Known Implementing Classes:
VectorSource
public interface SourceFeatureClickNotifier
Interface to be implemented by sources that support clicks on features.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classstatic classAn event that is fired when feature is clicked.static classAn event is fired when user makes double click on a feature.static classAn event is fired after 250 ms to ensure that it is not a double click. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddSourceFeatureClickListener(Consumer<SourceFeatureClickNotifier.SourceFeatureClickEvent> listener) Adds feature click listener.com.vaadin.flow.shared.RegistrationaddSourceFeatureDoubleClickListener(Consumer<SourceFeatureClickNotifier.SourceFeatureDoubleClickEvent> listener) Adds feature double click listener.com.vaadin.flow.shared.RegistrationaddSourceFeatureSingleClickListener(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.SourceFeatureClickEventwill 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
-