From 22a9fb7822fe5e49042da3fe232086e83ceafa6b Mon Sep 17 00:00:00 2001 From: delvh Date: Fri, 22 Nov 2019 22:40:00 +0100 Subject: [PATCH] improved Javadoc in some files, especially UIColors --- src/main/java/envoy/client/Client.java | 4 +- src/main/java/envoy/client/LocalDB.java | 2 +- src/main/java/envoy/client/ui/UIColors.java | 66 +++++---------------- 3 files changed, 20 insertions(+), 52 deletions(-) diff --git a/src/main/java/envoy/client/Client.java b/src/main/java/envoy/client/Client.java index 522d44f..6533d47 100644 --- a/src/main/java/envoy/client/Client.java +++ b/src/main/java/envoy/client/Client.java @@ -129,7 +129,9 @@ public class Client { * Updating UserStatus of all users in LocalDB. (Server sends all users with * their updated UserStatus to the client.)
* - * @param userId + * @param userId the client who sends the sync + * @param sync the sync object (yet to be converted from java class to sync.xml) + * @return a returnSync.xml file * @since Envoy v0.1-alpha */ public Sync sendSync(long userId, Sync sync) { diff --git a/src/main/java/envoy/client/LocalDB.java b/src/main/java/envoy/client/LocalDB.java index 5b702e8..38f74e4 100644 --- a/src/main/java/envoy/client/LocalDB.java +++ b/src/main/java/envoy/client/LocalDB.java @@ -270,7 +270,7 @@ public class LocalDB { /** * Adds a user to the {@code sync} {@link Sync} object. * - * @param user + * @param user the user who should be added to the {@link Sync} object * @since Envoy v0.1-alpha */ public void addUserToSync(User user) { sync.getUsers().add(user); } diff --git a/src/main/java/envoy/client/ui/UIColors.java b/src/main/java/envoy/client/ui/UIColors.java index 2959fa5..e810250 100644 --- a/src/main/java/envoy/client/ui/UIColors.java +++ b/src/main/java/envoy/client/ui/UIColors.java @@ -17,44 +17,10 @@ public class UIColors { private UIColors() {} - /** - * This color is used for the general background where no other elements - * overlap. - * - * @since Envoy v0.2-alpha - */ private Color backgroundColor; - - /** - * This color is used as background for all areas where a user can interact with - * Envoy. - * (i.e. a JTextArea or JList) - * - * @since Envoy v0.2-alpha - */ - private Color userInteractionColor; - - /** - * This color is used for any areas that need special attention. - * (i.e. highlighting a selected list column or a button background) - * - * @since Envoy v0.2-alpha - */ private Color specialUseColor; - - /** - * This color is the color in which text will be displayed. - * - * @since Envoy v0.2-alpha - */ private Color textColor; - - /** - * This object ensures that only one {@link UIColors} object exists. - * - * @since Envoy v0.2-alpha - */ private static UIColors uIColors; /** @@ -94,25 +60,29 @@ public class UIColors { } /** - * @return the {@link UIColors#backgroundColor} + * @return the general background color where no other element overlaps * @since Envoy v0.2-alpha */ public Color getBackgroundColor() { return backgroundColor; } /** - * @param backgroundColor the new {@link UIColors#backgroundColor} + * @param backgroundColor the general background where no other element overlaps * @since Envoy v0.2-alpha */ public void setBackgroundColor(Color backgroundColor) { this.backgroundColor = backgroundColor; } /** - * @return the {@link UIColors#userInteractionColor} + * @return the userInteractionColor:
+ * This color is used as background for all areas where a user can + * interact with Envoy (i.e. a JTextArea or JList) * @since Envoy v0.2-alpha */ public Color getUserInteractionColor() { return userInteractionColor; } /** - * @param userInteractionColor the new {@link UIColors#userInteractionColor} + * @param userInteractionColor This color is used as background for all areas
+ * where a user can interact with Envoy + * (i.e. a JTextArea or JList) * @since Envoy v0.2-alpha */ public void setUserInteractionColor(Color userInteractionColor) { @@ -120,39 +90,35 @@ public class UIColors { } /** - * @return the {@link UIColors#specialUseColor} + * @return specialUseColor: This color is used for any areas that need special attention.
+ * (i.e. highlighting a selected list column or a button background) * @since Envoy v0.2-alpha */ public Color getSpecialUseColor() { return specialUseColor; } /** - * @param specialUseColor the new {@link UIColors#specialUseColor} + * @param specialUseColor This color is used for any areas that need special attention.
+ * (i.e. highlighting a selected list column or a button background) * @since Envoy v0.2-alpha */ public void setSpecialUseColor(Color specialUseColor) { this.specialUseColor = specialUseColor; } /** - * @return the {@link UIColors#textColor} + * @return textColor: The color in which text will be displayed * @since Envoy v0.2-alpha */ public Color getTextColor() { return textColor; } /** - * @param textColor the new {@link UIColors#textColor} + * @param textColor The color in which text will be displayed * @since Envoy v0.2-alpha */ public void setTextColor(Color textColor) { this.textColor = textColor; } + @Deprecated /** - * @return the {@link UIColors#uIColors} + * @return the uiColors object * @since Envoy v0.2-alpha */ public static UIColors getEnvoyColors() { return uIColors; } - - @Deprecated - /** - * @param envoyColors the new {@link EnvoyColors#envoyColors} - * @since Envoy v0.2-alpha - */ - public static void setEnvoyColors(UIColors uIColors) { UIColors.uIColors = uIColors; } } \ No newline at end of file