Skip to content

Commit

Permalink
Add TODO note about reordering parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
FeldrinH committed Dec 8, 2023
1 parent 8385f36 commit 781a4cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/ee/ut/dendroloj/GraphCanvas.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,8 @@ public final class GraphCanvas<V> {
final List<Vertex<V>> vertices = new ArrayList<>();
final List<Edge<V>> 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) {
Expand All @@ -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);
Expand Down

0 comments on commit 781a4cd

Please sign in to comment.