Class OpenedRouteDistanceAndTimeUpdater
java.lang.Object
slash.navigation.converter.gui.helpers.OpenedRouteDistanceAndTimeUpdater
Fills the
RouteDistanceAndTimeCache with the total DistanceAndTime
of the DistanceAndTimeAggregator once a route opened from the browse panel
settles - event-driven, never synchronous at selection time.
Guards against a second open racing the first: the aggregator total is written to
the cache only while the path captured at open time is still the currently loaded
path, i.e. late events from a previously opened route are dropped.- Author:
- Christian Pesch
-
Constructor Summary
ConstructorsConstructorDescriptionOpenedRouteDistanceAndTimeUpdater(DistanceAndTimeAggregator aggregator, RouteDistanceAndTimeCache cache, Supplier<String> currentPathSupplier, Consumer<String> urlUpdated) -
Method Summary
Modifier and TypeMethodDescriptionvoidrouteOpened(String url, String path) Captures the route that has just been opened from the browse panel.
-
Constructor Details
-
Method Details
-
routeOpened
Captures the route that has just been opened from the browse panel.- Parameters:
url- the URL of the route, used as the cache keypath- the path under which the Convert panel reports the URL once it is loaded
-