Class BaseRouteConverter

Direct Known Subclasses:
RouteConverter

public abstract class BaseRouteConverter extends SingleFrameApplication
The abstract base of the RouteConverter desktop application: a single-frame Swing GUI for route conversion, editing and map display. Concrete editions (RouteConverter and its TimeAlbumPro variant) subclass it and supply the edition-specific behaviour via getEdition() and related hooks.
Author:
Christian Pesch
  • Field Details

    • log

      protected static final Logger log
    • contentPane

      protected JPanel contentPane
  • Constructor Details

    • BaseRouteConverter

      public BaseRouteConverter()
  • Method Details

    • getInstance

      public static BaseRouteConverter getInstance()
    • getBundle

      public static ResourceBundle getBundle()
    • getPreferences

      public static Preferences getPreferences()
    • getTitle

      public static String getTitle()
    • getProduct

      protected String getProduct()
    • getEdition

      public abstract String getEdition()
    • getEditionId

      public abstract String getEditionId()
    • startup

      protected void startup()
      Specified by:
      startup in class Application
    • checkJavaPrequisites

      protected void checkJavaPrequisites()
    • checkForGoogleMapsAPIKey

      protected abstract void checkForGoogleMapsAPIKey()
    • parseInitialArgs

      protected void parseInitialArgs(String[] args)
      Overrides:
      parseInitialArgs in class Application
    • askForCrashReportConsent

      protected void askForCrashReportConsent()
      Asks once whether the user wants to send anonymous crash telemetry (spec 00011 Phase 2). Default is off: the preference is only turned on if the user explicitly answers Yes. The question is shown at most once, guarded by a separate "asked" preference.
    • setMapView

      public void setMapView(MapViewImplementation mapViewImplementation)
    • getMapView

      public MapView getMapView()
    • shutdown

      protected void shutdown()
      Overrides:
      shutdown in class SingleFrameApplication
    • getSelectByDistancePreference

      public double getSelectByDistancePreference()
    • setSelectByDistancePreference

      public void setSelectByDistancePreference(double selectByDistancePreference)
    • getSelectByOrderPreference

      public int getSelectByOrderPreference()
    • setSelectByOrderPreference

      public void setSelectByOrderPreference(int selectByOrderPreference)
    • getInsertStraightLineIntervalPreference

      public int getInsertStraightLineIntervalPreference()
    • setInsertStraightLineIntervalPreference

      public void setInsertStraightLineIntervalPreference(int insertStraightLineIntervalPreference)
    • getSelectBySignificancePreference

      public double getSelectBySignificancePreference()
    • setSelectBySignificancePreference

      public void setSelectBySignificancePreference(double selectBySignificancePreference)
    • getDeletePositionsShiftTimesPreference

      public boolean getDeletePositionsShiftTimesPreference()
    • setDeletePositionsShiftTimesPreference

      public void setDeletePositionsShiftTimesPreference(boolean deletePositionsShiftTimesPreference)
    • getSelectBySpeedPreference

      public double getSelectBySpeedPreference()
    • setSelectBySpeedPreference

      public void setSelectBySpeedPreference(double selectBySpeedPreference)
    • getFindPlacePreference

      public String getFindPlacePreference()
    • setFindPlacePreference

      public void setFindPlacePreference(String searchPositionPreference)
    • getCredentials

      public Credentials getCredentials()
    • getUserNamePreference

      public String getUserNamePreference()
    • setLogin

      public void setLogin(String userNamePreference, String passwordPreference)
    • removeLogin

      public void removeLogin()
    • getUploadRoutePreference

      public File getUploadRoutePreference()
    • setUploadRoutePreference

      public void setUploadRoutePreference(File path)
    • getAddPhotoPreference

      public File getAddPhotoPreference()
    • setAddPhotoPreference

      public void setAddPhotoPreference(File path)
    • getAddAudioPreference

      public File getAddAudioPreference()
    • setAddAudioPreference

      public void setAddAudioPreference(File path)
    • getTagStrategyPreference

      public TagStrategy getTagStrategyPreference()
    • setTagStrategyPreference

      public void setTagStrategyPreference(TagStrategy tagStrategy)
    • getCategoryPreference

      public String getCategoryPreference()
    • setCategoryPreference

      public void setCategoryPreference(String category)
    • getNumberPatternPreference

      public NumberPattern getNumberPatternPreference()
    • setNumberPatternPreference

      public void setNumberPatternPreference(NumberPattern numberPattern)
    • getNumberingStrategyPreference

      public NumberingStrategy getNumberingStrategyPreference()
    • setNumberingStrategyPreference

      public void setNumberingStrategyPreference(NumberingStrategy numberingStrategy)
    • getNavigationFormatRegistry

      public NavigationFormatRegistry getNavigationFormatRegistry()
    • getRouteServiceOperator

      public RouteServiceOperator getRouteServiceOperator()
    • getCharacteristicsModel

      public CharacteristicsModel getCharacteristicsModel()
    • getUnitSystemModel

      public UnitSystemModel getUnitSystemModel()
    • getGoogleMapsServerModel

      public GoogleMapsServerModel getGoogleMapsServerModel()
    • getTileServerMapManager

      public TileServerMapManager getTileServerMapManager()
    • handleBabelError

      public void handleBabelError(BabelException e)
    • handleOpenError

      public void handleOpenError(Throwable throwable, String path)
    • handleOpenError

      public void handleOpenError(Throwable throwable, List<URL> urls)
    • handleUnsupportedFormat

      public void handleUnsupportedFormat(String path)
    • handleFileNotFound

      public void handleFileNotFound(String path)
    • sendErrorReport

      public void sendErrorReport(String log, String description, File file)
    • sendChecksums

      public void sendChecksums(Download download)
    • openPositionList

      public void openPositionList(List<URL> urls, boolean selectConvertPanel)
    • getUrlModel

      public UrlDocument getUrlModel()
    • revertPositions

      public void revertPositions()
    • renamePositionList

      public void renamePositionList(String name)
    • setRouteCharacteristics

      public void setRouteCharacteristics(RouteCharacteristics characteristics)
    • selectPositionsInMap

      public void selectPositionsInMap(int[] selectedPositions)
    • selectPositionsInMap

      public void selectPositionsInMap(List<NavigationPosition> selectedPositions)
    • getElevationServiceFacade

      public ElevationServiceFacade getElevationServiceFacade()
    • getGeocodingServiceFacade

      public GeocodingServiceFacade getGeocodingServiceFacade()
    • getInsertPositionFacade

      public InsertPositionFacade getInsertPositionFacade()
    • getRoutingServiceFacade

      public RoutingServiceFacade getRoutingServiceFacade()
    • getDistanceAndTimeAggregator

      public DistanceAndTimeAggregator getDistanceAndTimeAggregator()
    • getDataSourceManager

      public DataSourceManager getDataSourceManager()
    • getDownloadManager

      public DownloadManager getDownloadManager()
    • getPositionAugmenter

      public PositionAugmenter getPositionAugmenter()
    • getAudioPlayer

      public AudioPlayer getAudioPlayer()
    • getGeoTagger

      public GeoTagger getGeoTagger()
    • getPhotoTimeZone

      public TimeZoneModel getPhotoTimeZone()
    • selectPositionsWithinDistanceToPredecessor

      public int selectPositionsWithinDistanceToPredecessor(double distance)
    • selectPositionsWithSpeedBelowOrEqualTo

      public int selectPositionsWithSpeedBelowOrEqualTo(double kmh)
    • selectAllButEveryNthPosition

      public int[] selectAllButEveryNthPosition(int order)
    • selectInsignificantPositions

      public int selectInsignificantPositions(double threshold) throws InterruptedException
      Throws:
      InterruptedException
    • clearSelection

      public void clearSelection()
    • shiftTimesAfterPauses

      public void shiftTimesAfterPauses(int[] indices)
    • isMapViewAvailable

      public boolean isMapViewAvailable()
    • getMapCenter

      public NavigationPosition getMapCenter()
    • getMapBoundingBox

      public BoundingBox getMapBoundingBox()
    • getShowAllPositionsAfterLoading

      public BooleanModel getShowAllPositionsAfterLoading()
    • getRecenterAfterZooming

      public BooleanModel getRecenterAfterZooming()
    • getMapPreferencesModel

      public MapPreferencesModel getMapPreferencesModel()
    • getTimeZone

      public TimeZoneModel getTimeZone()
    • showMapBorder

      public void showMapBorder(BoundingBox mapBoundingBox)
    • showCoverageOverlay

      public void showCoverageOverlay(BoundingBox mapBoundingBox, String category, Map<BoundingBox,Boolean> coverageTiles)
    • showPositionMagnifier

      public void showPositionMagnifier(List<NavigationPosition> positions)
    • setCenter

      public void setCenter(NavigationPosition position)
    • getAvailableMapViews

      public List<MapViewImplementation> getAvailableMapViews()
    • getMapViewPreference

      public MapViewImplementation getMapViewPreference()
    • getMapViewCallback

      protected abstract MapViewCallback getMapViewCallback()
    • isConvertPanelSelected

      public boolean isConvertPanelSelected()
    • isPointsOfInterestEnabled

      protected boolean isPointsOfInterestEnabled()
    • isWaypointTypeCountsEnabled

      public boolean isWaypointTypeCountsEnabled()
    • isPointsOfInterestPanelSelected

      public boolean isPointsOfInterestPanelSelected()
    • isPhotosEnabled

      protected boolean isPhotosEnabled()
    • isPhotosPanelSelected

      public boolean isPhotosPanelSelected()
    • isBrowsePanelSelected

      public boolean isBrowsePanelSelected()
    • getConvertPanel

      public ConvertPanel getConvertPanel()
    • getPointOfInterestPanel

      public PointOfInterestPanel getPointOfInterestPanel()
    • getPhotoPanel

      public PhotoPanel getPhotoPanel()
    • getBrowsePanel

      public BrowsePanel getBrowsePanel()
    • $$$getRootComponent$$$

      public JComponent $$$getRootComponent$$$()
    • initializeServices

      protected void initializeServices()
    • initializeActions

      protected void initializeActions()
    • createAboutAction

      protected SingletonDialogAction createAboutAction()
    • getApiUrl

      public String getApiUrl()
    • isSendCrashReportsEnabled

      public static boolean isSendCrashReportsEnabled()
    • setSendCrashReportsEnabled

      public static void setSendCrashReportsEnabled(boolean enabled)
    • initializeElevationServices

      protected abstract void initializeElevationServices()
    • updateElevationServices

      protected abstract void updateElevationServices()
    • initializeGeocodingServices

      protected abstract void initializeGeocodingServices()
    • initializeRoutingServices

      protected abstract void initializeRoutingServices()
    • updateRoutingServices

      protected abstract void updateRoutingServices()
    • downloadDependencies

      protected void downloadDependencies()
    • scanLocalMapsAndThemes

      protected abstract void scanLocalMapsAndThemes()
    • installBackgroundMap

      protected abstract void installBackgroundMap()
    • scanRemoteMapsAndThemes

      protected abstract void scanRemoteMapsAndThemes()