Clean code.
This commit is contained in:
@@ -14,31 +14,34 @@ public interface Drawing {
|
||||
/**
|
||||
* Add a listener to click to this drawing.
|
||||
*
|
||||
* @param listener
|
||||
* @param listener DrawingClickListener to add to this Drawing.
|
||||
*/
|
||||
public void addDrawingClickListener(DrawingClickListener listener);
|
||||
|
||||
/**
|
||||
* Remove the given listener from the drawing.
|
||||
*
|
||||
* @param listener
|
||||
* @param listener DrawingClickListener to remove from this Drawing.
|
||||
*/
|
||||
public void removeDrawingClickListener(DrawingClickListener listener);
|
||||
|
||||
/**
|
||||
* Clear the drawing.
|
||||
* Clear the drawing (overlays and underlying graph/map).
|
||||
*/
|
||||
public void clear();
|
||||
|
||||
/**
|
||||
* Remove overlays from the drawing.
|
||||
* Remove overlays from the drawing (do not remove the underlying graph/map).
|
||||
*/
|
||||
public void clearOverlays();
|
||||
|
||||
/**
|
||||
* Draw the given point with the given color.
|
||||
* Draw a marker at the given position with the given color.
|
||||
*
|
||||
* @param point
|
||||
* @param point Position of the marker to draw.
|
||||
* @param color Color of the marker to draw.
|
||||
*
|
||||
* @return A MarkerOverlay instance representing the newly drawn marker.
|
||||
*/
|
||||
public MarkerOverlay drawMarker(Point point, Color color);
|
||||
|
||||
@@ -48,65 +51,86 @@ public interface Drawing {
|
||||
*
|
||||
* PointSetOverlay are heavy memory resources, do not use one for each point!
|
||||
*
|
||||
* @return A new PointSetOverlay for this drawing.
|
||||
*/
|
||||
public PointSetOverlay createPointSetOverlay();
|
||||
|
||||
/**
|
||||
* Create a new PointSetOverlay with the original width and color that can be
|
||||
* used to add overlay points to this drawing.
|
||||
* 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!
|
||||
*
|
||||
* @param width Initial width of points in the overlay.
|
||||
* @param color Initial width of points in the overlay.
|
||||
*
|
||||
* @return A new PointSetOverlay for this drawing.
|
||||
*/
|
||||
public PointSetOverlay createPointSetOverlay(int width, Color color);
|
||||
|
||||
/**
|
||||
* Draw the given graph using the given palette.
|
||||
*
|
||||
* @param graph
|
||||
* @param palette
|
||||
* @param graph Graph to draw.
|
||||
* @param palette Palette to use to draw the graph.
|
||||
*
|
||||
* @see BasicGraphPalette
|
||||
* @see BlackAndWhiteGraphPalette
|
||||
*/
|
||||
public void drawGraph(Graph graph, GraphPalette palette);
|
||||
|
||||
/**
|
||||
* Draw the given graph using a default palette specific to the implementation.
|
||||
*
|
||||
* @param graph
|
||||
* @param graph Graph to draw.
|
||||
*/
|
||||
public void drawGraph(Graph graph);
|
||||
|
||||
/**
|
||||
* Draw a path using the given color.
|
||||
*
|
||||
* @param path
|
||||
* @param color
|
||||
* @param markers Show origin and destination markers.
|
||||
* @return
|
||||
* @param path Path to draw.
|
||||
* @param color Color of the path to draw.
|
||||
* @param markers true to show origin and destination markers.
|
||||
*
|
||||
* @return A PathOverlay instance representing the newly drawn path.
|
||||
*/
|
||||
public PathOverlay drawPath(Path path, Color color, boolean markers);
|
||||
|
||||
/**
|
||||
* Draw a path using the given color with markers.
|
||||
* Draw a path with both origin and destination markers using the given color.
|
||||
*
|
||||
* @param path
|
||||
* @param color
|
||||
* @param path Path to draw.
|
||||
* @param color Color of the path to draw.
|
||||
*
|
||||
* @return A PathOverlay instance representing the newly drawn path.
|
||||
*
|
||||
* @see Drawing#drawPath(Path, Color, boolean)
|
||||
*/
|
||||
public PathOverlay drawPath(Path path, Color color);
|
||||
|
||||
/**
|
||||
* Draw a path using a default color specific to the implementation
|
||||
*
|
||||
* @param path Path to draw.
|
||||
* @param markers true to show origin and destination markers.
|
||||
*
|
||||
* @param path
|
||||
* @param markers Show origin and destination markers.
|
||||
* @return A PathOverlay instance representing the newly drawn path.
|
||||
*
|
||||
* @see Drawing#drawPath(Path, Color, boolean)
|
||||
*/
|
||||
public PathOverlay drawPath(Path path, boolean markers);
|
||||
|
||||
/**
|
||||
* Draw a path using a default color specific to the implementation
|
||||
* Draw a path with both origin and destination markers using a default color
|
||||
* specific to the implementation
|
||||
*
|
||||
*
|
||||
* @param path
|
||||
* @param path Path to draw.
|
||||
*
|
||||
* @return A PathOverlay instance representing the newly drawn path.
|
||||
*
|
||||
* @see Drawing#drawPath(Path, Color, boolean)
|
||||
*/
|
||||
public PathOverlay drawPath(Path path);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user