From 56c212156cd79cb247083ff4ab2a0967d25b560b Mon Sep 17 00:00:00 2001 From: norangebit Date: Tue, 12 Nov 2019 11:09:43 +0100 Subject: [PATCH] rename LabelColor to Color - add Color.WHITE --- .../wekan/wrapper/entity/{LabelColor.java => Color.java} | 4 +++- wrapper/src/main/java/wekan/wrapper/entity/Label.java | 6 +++--- .../src/main/java/wekan/wrapper/entity/LabelPrototype.java | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) rename wrapper/src/main/java/wekan/wrapper/entity/{LabelColor.java => Color.java} (94%) diff --git a/wrapper/src/main/java/wekan/wrapper/entity/LabelColor.java b/wrapper/src/main/java/wekan/wrapper/entity/Color.java similarity index 94% rename from wrapper/src/main/java/wekan/wrapper/entity/LabelColor.java rename to wrapper/src/main/java/wekan/wrapper/entity/Color.java index a44be64..7841f36 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/LabelColor.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/Color.java @@ -2,7 +2,9 @@ package wekan.wrapper.entity; import com.google.gson.annotations.SerializedName; -public enum LabelColor { +public enum Color { + @SerializedName("white") + WHITE, @SerializedName("green") GREEN, @SerializedName("yellow") diff --git a/wrapper/src/main/java/wekan/wrapper/entity/Label.java b/wrapper/src/main/java/wekan/wrapper/entity/Label.java index 57a1d52..000fb6b 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/Label.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/Label.java @@ -6,9 +6,9 @@ public class Label { @SerializedName("_id") private String id; private String name; - private LabelColor color; + private Color color; - public Label(String id, String name, LabelColor color) { + public Label(String id, String name, Color color) { this.id = id; this.name = name; this.color = color; @@ -22,7 +22,7 @@ public class Label { return name; } - public LabelColor getColor() { + public Color getColor() { return color; } diff --git a/wrapper/src/main/java/wekan/wrapper/entity/LabelPrototype.java b/wrapper/src/main/java/wekan/wrapper/entity/LabelPrototype.java index 5f8beb5..221d342 100644 --- a/wrapper/src/main/java/wekan/wrapper/entity/LabelPrototype.java +++ b/wrapper/src/main/java/wekan/wrapper/entity/LabelPrototype.java @@ -10,7 +10,7 @@ public class LabelPrototype { * @param name The name of the new label * @param color The color of the new label */ - public LabelPrototype(String name, LabelColor color) { + public LabelPrototype(String name, Color color) { label = new Label(null, name, color); } } -- 2.45.2