From 781a4cde1f0a283ddb5ae12809550b92d1e5e649 Mon Sep 17 00:00:00 2001 From: Juhan Oskar Hennoste Date: Fri, 8 Dec 2023 18:48:03 +0200 Subject: [PATCH] Add TODO note about reordering parameters --- src/main/java/ee/ut/dendroloj/GraphCanvas.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/ee/ut/dendroloj/GraphCanvas.java b/src/main/java/ee/ut/dendroloj/GraphCanvas.java index 407ec6c..087d5a7 100644 --- a/src/main/java/ee/ut/dendroloj/GraphCanvas.java +++ b/src/main/java/ee/ut/dendroloj/GraphCanvas.java @@ -18,9 +18,8 @@ public final class GraphCanvas { final List> vertices = new ArrayList<>(); final List> edges = new ArrayList<>(); - // TODO: Add overload that allows drawing a vertex with the vertex itself as a default label. - // Note that this will make the order of parameters for drawFixedVertex a little awkward. - // Also note that the default label being the vertex itself converted to a string + // TODO: Add overload that allows drawing a vertex with the vertex itself as a default label? + // Note that the default label being the vertex itself converted to a string // might be non-obvious for reference types (especially ones that don't override toString). // public void drawVertex(V vertex) { @@ -44,6 +43,8 @@ public void drawVertex(V vertex, String label, Color color) { addVertex(new Vertex<>(vertex, label, color)); } + // TODO: Reorder arguments so x and y are before label? This would group all visual parameters that users are likely to tweak (label and color) at the end. + // public void drawFixedVertex(V vertex, double x, double y) { // if (vertex == null) throw new NullPointerException("Vertex must not be null"); // drawVertex(vertex, vertex.toString(), null);