Class Viewer

    • Constructor Detail

      • Viewer

        public Viewer(TileConfig tileConfig,
                      TileConfig tileConfigOverlay)
        default constructor
        Parameters:
        tileConfig - the configuration to use.
        tileConfigOverlay - the configuration for overlay to use.
      • Viewer

        public Viewer(TileConfig tileConfig,
                      TileConfig tileConfigOverlay,
                      int zoom,
                      double lon,
                      double lat)
        constructor with startup position
        Parameters:
        tileConfig - the configuration to use.
        tileConfigOverlay - the configuration for overlay to use.
        zoom - startup zoom
        lon - startup longitude
        lat - startup latitude
    • Method Detail

      • setNetworkState

        public void setNetworkState(boolean state)
        Set whether this Viewer shall load tiles from network.
        Parameters:
        state - whether to use network.
      • getNetworkState

        public boolean getNetworkState()
        Get whether this Viewer is using a network connection.
        Returns:
        whether this Viewer is using a network connection.
      • paintComponent

        public void paintComponent(Graphics graphics)
      • mouseClicked

        public void mouseClicked(MouseEvent e)
      • loadFailed

        public void loadFailed(Tile thing)
      • getMouseGeoPosition

        public Coordinate getMouseGeoPosition()
        Get the position of the mouse in geographical coordinate space. May return null, iff Component.getMousePosition() returns null.
        Returns:
        the mouse's position.
      • setTileConfig

        public void setTileConfig(TileConfig tileConfig)
        Use the given configuration for tiles now.
        Parameters:
        tileConfig - the configuration to use
      • setOverlayTileConfig

        public void setOverlayTileConfig(TileConfig config)
        Parameters:
        config - the config to use.
      • getZoomLevel

        public int getZoomLevel()
        Get the current zoom level.
        Returns:
        the current zoom level.
      • getMinZoomLevel

        public int getMinZoomLevel()
        Get the minimum zoom available.
        Returns:
        the minimum zoom.
      • getMaxZoomLevel

        public int getMaxZoomLevel()
        Get the maximum zoom available.
        Returns:
        the maximum zoom.
      • getImageManagerBase

        public ImageManager<Tile,BufferedImage> getImageManagerBase()
        Returns:
        the imageManager that is currently serving base images.
      • getImageManagerOverlay

        public ImageManager<Tile,BufferedImage> getImageManagerOverlay()
        Returns:
        the imageManager that is currently serving overlay images.
      • changed

        public void changed()
      • setTileSize

        public void setTileSize(int tileSize)
      • tileSizeChanged

        protected void tileSizeChanged(int tileSize)