Interface TourEngine
- All Known Implementing Classes:
DriverEngine,ShepherdEngine
public interface TourEngine
Interface representing the core functionality of a tour engine. A tour engine facilitates guided
tours in a web application, allowing developers to define steps, manage behaviors, and handle
user interactions during the tour.
Implementing classes must provide the unique identifier of the engine via the getId
method and may extend behavior by overriding default methods.
Core functionality includes: - Starting a tour for a given component with defined steps and options. - Canceling an active tour. - Wiring events to handle tour completion or cancellation. Static Fields: -GSON: A pre-configured Gson instance for serializing and deserializing data related to tour steps and options. Methods: -String getId(): Returns the unique identifier for the engine. Default Methods: -void start(Component host, List<TourStep> steps, Map<Object, Object> options): Starts a guided tour on the given host component, initializing it with the provided steps and options. -void cancel(Component host): Cancels the currently active tour. -void wireEvents(Component host): Wires event listeners to handle tour completion and cancellation and sends notifications to the component's server-side counterpart. Notes: - The host component must be attached to a UI for the interactions with the underlying JavaScript API to work. - Exceptions during execution are caught and rethrown asRuntimeException.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
GSON
static final com.google.gson.Gson GSON
-
-
Method Details
-
getId
String getId() -
start
-
cancel
default void cancel(com.vaadin.flow.component.Component host) -
wireEvents
default void wireEvents(com.vaadin.flow.component.Component host)
-