Class AbstractViewer

    • Field Detail

      • colorBackground

        protected Color colorBackground
      • colorBorder

        protected Color colorBorder
      • colorTilenumbers

        protected Color colorTilenumbers
      • colorCrosshair

        protected Color colorCrosshair
      • mouseActive

        protected boolean mouseActive
      • drawBorder

        protected boolean drawBorder
      • drawCrosshair

        protected boolean drawCrosshair
      • drawOverlay

        protected boolean drawOverlay
      • drawTileNumbers

        protected boolean drawTileNumbers
      • overlayTileConfig

        protected TileConfig overlayTileConfig
    • Constructor Detail

      • AbstractViewer

        public AbstractViewer()
    • Method Detail

      • getMapWindow

        protected abstract MapWindow getMapWindow()
      • getMouseActive

        public boolean getMouseActive()
        Specified by:
        getMouseActive in interface  MouseUser
        Returns:
        whether to react on mouse events.
      • setMouseActive

        public void setMouseActive(boolean state)
        Specified by:
        setMouseActive in interface  MouseUser
        Parameters:
        state - whether to react on mouse events.
      • getZoomMode

        public ZoomMode getZoomMode()
      • setZoomMode

        public void setZoomMode(ZoomMode zoomMode)
      • isDrawBorder

        public boolean isDrawBorder()
        Returns:
        whether a border is drawn around tiles.
      • isDrawCrosshair

        public boolean isDrawCrosshair()
        Returns:
        whether the crosshair is shown.
      • isDrawOverlay

        public boolean isDrawOverlay()
        Returns:
        whether the overlay will be drawn.
      • isDrawTileNumbers

        public boolean isDrawTileNumbers()
        Returns:
        whether to draw each tile's number.
      • setDrawBorder

        public void setDrawBorder(boolean drawBorder)
        Set whether a border shall be drawn around tiles.
        Parameters:
        drawBorder - whether to draw a border around tiles.
      • setDrawCrosshair

        public void setDrawCrosshair(boolean drawCrosshair)
        Set whether a crosshair shall be drawn in the middle of the viewport.
        Parameters:
        drawCrosshair - whether to draw a crosshair.
      • setDrawOverlay

        public void setDrawOverlay(boolean drawOverlay)
        Set whether the overlay will be drawn.
        Parameters:
        drawOverlay - whether to draw an overlay.
      • setDrawTileNumbers

        public void setDrawTileNumbers(boolean drawTileNumbers)
        Set whether the tile's numbers will be drawn.
        Parameters:
        drawTileNumbers - whether to draw each tile's number.
      • getColorBackground

        public Color getColorBackground()
        Get the color of the background
        Returns:
        a color.
      • setColorBackground

        public void setColorBackground(Color color)
        Set the color of the background
        Parameters:
        color - the color to set
      • getColorBorder

        public Color getColorBorder()
        Get the color of the tile borders
        Returns:
        a color.
      • setColorBorder

        public void setColorBorder(Color color)
        Set the color of the tile borders
        Parameters:
        color - the color to set
      • getColorTilenumbers

        public Color getColorTilenumbers()
        Get the color of the tile number font
        Returns:
        a color.
      • setColorTilenumbers

        public void setColorTilenumbers(Color color)
        Set the color of the tile number font
        Parameters:
        color - the color to set
      • getColorCrosshair

        public Color getColorCrosshair()
        Get the color of the crosshair
        Returns:
        a color.
      • setColorCrosshair

        public void setColorCrosshair(Color color)
        Set the color of the crosshair
        Parameters:
        color - the color to set
      • getTileConfig

        public TileConfig getTileConfig()
        Get the current configuration.
        Returns:
        the current tile configuration.
      • getOverlayTileConfig

        public TileConfig getOverlayTileConfig()
        Get the current overlay configuration.
        Returns:
        the current overlay configuration.
      • dispatchRepaint

        protected void dispatchRepaint()
      • setDragging

        public void setDragging(boolean drag)
        Set whether dragging the mouse starts an drag event.
        Parameters:
        drag - whether to allow dragging.
      • setDragGestureListener

        public void setDragGestureListener(DragGestureListener listener)
        Set the DragGestureListener to use.
        Parameters:
        listener - the listener to use after invoking setDragging();
      • addTileConfigListener

        public void addTileConfigListener(TileConfigListener listener)
        Add this listener to the set of listeners.
        Parameters:
        listener - the listener to add.
      • addOverlayTileConfigListener

        public void addOverlayTileConfigListener(TileConfigListener listener)
        Add this listener to the set of listeners.
        Parameters:
        listener - the listener to add.
      • triggerTileConfigListeners

        protected void triggerTileConfigListeners()
      • triggerOverlayTileConfigListeners

        protected void triggerOverlayTileConfigListeners()
      • addPaintListener

        public void addPaintListener(PaintListener paintListener)
        Add the given PaintListener to the list of paintListeners
        Parameters:
        paintListener - the listener to add.
      • removePaintListener

        public void removePaintListener(PaintListener paintListener)
        Remove the given PaintListener from the list of paintListeners.
        Parameters:
        paintListener - the listener to remove.
      • setMouseListeners

        public void setMouseListeners(Collection<MouseListener> listeners)
        Parameters:
        listeners - the collection of mouse listeners to notify about mouse events.
      • mouseDragged

        public void mouseDragged(MouseEvent e)
      • mouseMoved

        public void mouseMoved(MouseEvent e)
      • mouseClicked

        public void mouseClicked(MouseEvent e)
      • mousePressed

        public void mousePressed(MouseEvent e)
      • mouseReleased

        public void mouseReleased(MouseEvent e)
      • mouseEntered

        public void mouseEntered(MouseEvent e)
      • mouseExited

        public void mouseExited(MouseEvent e)
      • drawCrosshair

        protected void drawCrosshair(Graphics2D g)
      • drawOverlayPoints

        protected void drawOverlayPoints(Graphics2D g)
      • setOverlayPoints

        public void setOverlayPoints(Set<OverlayPoint> points)
        Display the given points as an overlay.
        Parameters:
        points - a set of points to display.
      • gotoOverlayPoints

        public void gotoOverlayPoints()
        Set the viewport to display the overlay points...