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);