Interface Drawing

    • Method Detail

      • addDrawingClickListener

        void addDrawingClickListener​(DrawingClickListener listener)
        Add a listener to click to this drawing.
        Parameters:
        listener - DrawingClickListener to add to this Drawing.
      • removeDrawingClickListener

        void removeDrawingClickListener​(DrawingClickListener listener)
        Remove the given listener from the drawing.
        Parameters:
        listener - DrawingClickListener to remove from this Drawing.
      • clear

        void clear()
        Clear the drawing (overlays and underlying graph/map).
      • clearOverlays

        void clearOverlays()
        Remove overlays from the drawing (do not remove the underlying graph/map).
      • drawMarker

        MarkerOverlay drawMarker​(Point point,
                                 java.awt.Color outer,
                                 java.awt.Color inner,
                                 Drawing.AlphaMode mode)
        Draw a marker at the given position using the given colors and according to the given mode.
        Parameters:
        point - Position of the marker to draw.
        outer - Color for the outer part of the marker to draw.
        inner - Color for the inner part of the marker to draw.
        mode - Mode for filling the inner par of the marker.
        Returns:
        A MarkerOverlay instance representing the newly drawn marker.
      • createPointSetOverlay

        PointSetOverlay createPointSetOverlay()
        Create a new PointSetOverlay that can be used to add overlay points to this drawing. PointSetOverlay are heavy memory resources, do not use one for each point!
        Returns:
        A new PointSetOverlay for this drawing.
      • createPointSetOverlay

        PointSetOverlay createPointSetOverlay​(int width,
                                              java.awt.Color color)
        Create a new PointSetOverlay with the given initial width and color that can be used to add overlay points to this drawing. PointSetOverlay are heavy memory resources, do not use one for each point!
        Parameters:
        width - Initial width of points in the overlay.
        color - Initial width of points in the overlay.
        Returns:
        A new PointSetOverlay for this drawing.
      • drawGraph

        void drawGraph​(Graph graph)
        Draw the given graph using a default palette specific to the implementation.
        Parameters:
        graph - Graph to draw.
      • drawPath

        PathOverlay drawPath​(Path path,
                             java.awt.Color color,
                             boolean markers)
        Draw a path using the given color.
        Parameters:
        path - Path to draw.
        color - Color of the path to draw.
        markers - true to show origin and destination markers.
        Returns:
        A PathOverlay instance representing the newly drawn path.
      • drawPath

        PathOverlay drawPath​(Path path,
                             java.awt.Color color)
        Draw a path with both origin and destination markers using the given color.
        Parameters:
        path - Path to draw.
        color - Color of the path to draw.
        Returns:
        A PathOverlay instance representing the newly drawn path.
        See Also:
        drawPath(Path, Color, boolean)
      • drawPath

        PathOverlay drawPath​(Path path,
                             boolean markers)
        Draw a path using a default color specific to the implementation
        Parameters:
        path - Path to draw.
        markers - true to show origin and destination markers.
        Returns:
        A PathOverlay instance representing the newly drawn path.
        See Also:
        drawPath(Path, Color, boolean)
      • drawPath

        PathOverlay drawPath​(Path path)
        Draw a path with both origin and destination markers using a default color specific to the implementation
        Parameters:
        path - Path to draw.
        Returns:
        A PathOverlay instance representing the newly drawn path.
        See Also:
        drawPath(Path, Color, boolean)