Class OpenedRouteDistanceAndTimeUpdater

java.lang.Object
slash.navigation.converter.gui.helpers.OpenedRouteDistanceAndTimeUpdater

public class OpenedRouteDistanceAndTimeUpdater extends Object
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 Details

  • Method Details

    • routeOpened

      public void routeOpened(String url, String path)
      Captures the route that has just been opened from the browse panel.
      Parameters:
      url - the URL of the route, used as the cache key
      path - the path under which the Convert panel reports the URL once it is loaded