From 1e1b078a3759d8a59606ea14c7c1cfb9ca864d40 Mon Sep 17 00:00:00 2001 From: delvh Date: Fri, 20 Dec 2019 12:53:40 +0100 Subject: [PATCH] Updated malformed Javadoc --- src/main/java/envoy/client/Client.java | 2 +- src/main/java/envoy/client/LocalDB.java | 3 +- src/main/java/envoy/client/Settings.java | 14 +- src/main/java/envoy/client/event/Event.java | 35 ++--- .../envoy/client/ui/PrimaryScrollPane.java | 2 +- .../java/envoy/client/ui/PrimaryTextArea.java | 134 +++++++++--------- .../envoy/client/ui/UserListRenderer.java | 1 - 7 files changed, 96 insertions(+), 95 deletions(-) diff --git a/src/main/java/envoy/client/Client.java b/src/main/java/envoy/client/Client.java index b7cc83c..be0dd89 100644 --- a/src/main/java/envoy/client/Client.java +++ b/src/main/java/envoy/client/Client.java @@ -35,7 +35,7 @@ public class Client { /** * Initializes the client. At this state, the client user has yet to be - * initialized, which can be done by calling {@link Client#onlineInit(String). + * initialized, which can be done by calling {@link Client#onlineInit(String)}. * * @param config The {@link Config} instance to use in this client * @since Envoy v0.2-alpha diff --git a/src/main/java/envoy/client/LocalDB.java b/src/main/java/envoy/client/LocalDB.java index 60de119..5fe62a3 100644 --- a/src/main/java/envoy/client/LocalDB.java +++ b/src/main/java/envoy/client/LocalDB.java @@ -52,9 +52,10 @@ public class LocalDB { /** * Constructs an empty local database. To serialize any chats to the file - * system, call {@link LocalDB#initializeDBFile(File)}. + * system, call {@link LocalDB#initializeDBFile()}. * * @param localDBDir the directory in which to store users and chats + * @throws IOException if the LocalDB could not be initialised * @since Envoy v0.1-alpha */ public LocalDB(File localDBDir) throws IOException { diff --git a/src/main/java/envoy/client/Settings.java b/src/main/java/envoy/client/Settings.java index 6ac095e..f172816 100644 --- a/src/main/java/envoy/client/Settings.java +++ b/src/main/java/envoy/client/Settings.java @@ -88,7 +88,7 @@ public class Settings { /** * Updates the preferences when the save button is clicked. * - * @throws IOException + * @throws IOException if something went wrong while saving * @since Envoy v0.2-alpha */ public void save() throws IOException { @@ -105,7 +105,7 @@ public class Settings { /** * adds new theme to the theme map and sets current theme to the new theme. * - * @param theme + * @param theme the theme to add * @since Envoy v0.2-alpha */ public void addNewThemeToMap(Theme theme) { @@ -114,7 +114,7 @@ public class Settings { } /** - * @return {@link currentTheme} + * @return the name of the current Theme * @since Envoy v0.2-alpha */ public String getCurrentTheme() { return currentTheme; } @@ -122,7 +122,7 @@ public class Settings { /** * Sets the currentTheme * - * @param themeName + * @param themeName the name of the current theme * @since Envoy v0.2-alpha */ public void setCurrentTheme(String themeName) { currentTheme = themeName; } @@ -144,15 +144,15 @@ public class Settings { public void setEnterToSend(boolean enterToSend) { this.enterToSend = enterToSend; } /** - * @return {@link themes} map + * @return the map of all themes * @since Envoy v0.2-alpha */ public Map getThemes() { return themes; } /** - * Sets {@link themes} + * Sets the map of all themes * - * @param themes + * @param themes a map(String, Theme) of all themes * @since Envoy v0.2-alpha */ public void setThemes(Map themes) { this.themes = themes; } diff --git a/src/main/java/envoy/client/event/Event.java b/src/main/java/envoy/client/event/Event.java index 4a3264d..32009b9 100644 --- a/src/main/java/envoy/client/event/Event.java +++ b/src/main/java/envoy/client/event/Event.java @@ -1,17 +1,18 @@ -package envoy.client.event; - -/** - * Project: envoy-client
- * File: Event.java
- * Created: 04.12.2019
- * - * @author Kai S. K. Engelbart - * @since Envoy v0.2-alpha - */ -public interface Event { - - /** - * @return the data associated with this event - */ - T get(); -} +package envoy.client.event; + +/** + * Project: envoy-client
+ * File: Event.java
+ * Created: 04.12.2019
+ * + * @author Kai S. K. Engelbart + * @param the type of the Event + * @since Envoy v0.2-alpha + */ +public interface Event { + + /** + * @return the data associated with this event + */ + T get(); +} diff --git a/src/main/java/envoy/client/ui/PrimaryScrollPane.java b/src/main/java/envoy/client/ui/PrimaryScrollPane.java index 8b78a99..f8e4dbc 100644 --- a/src/main/java/envoy/client/ui/PrimaryScrollPane.java +++ b/src/main/java/envoy/client/ui/PrimaryScrollPane.java @@ -27,7 +27,7 @@ public class PrimaryScrollPane extends JScrollPane { /** * Styles the vertical and horizontal scroll bars. * - * @param theme + * @param theme the color set used to color the component * @since Envoy v0.2-alpha */ public void applyTheme(Theme theme) { diff --git a/src/main/java/envoy/client/ui/PrimaryTextArea.java b/src/main/java/envoy/client/ui/PrimaryTextArea.java index 1fd5584..29ed2f9 100644 --- a/src/main/java/envoy/client/ui/PrimaryTextArea.java +++ b/src/main/java/envoy/client/ui/PrimaryTextArea.java @@ -1,67 +1,67 @@ -package envoy.client.ui; - -import java.awt.Font; -import java.awt.Graphics; - -import javax.swing.JTextArea; -import javax.swing.border.EmptyBorder; - -/** - * Project: envoy-client
- * File: PrimaryTextArea.javaEvent.java
- * Created: 07.12.2019
- * - * @author Maximilian Käfer - * @since Envoy v0.2-alpha - */ -public class PrimaryTextArea extends JTextArea { - - private static final long serialVersionUID = -5829028696155434913L; - private int arcSize; - - /** - * Creates the text area - * - * @param borderSpace - * @since Envoy 0.2-alpha - */ - public PrimaryTextArea(int borderSpace) { this(6, borderSpace); } - - /** - * Creates the text area - * - * @param arcSize is the diameter of the arc at the four corners. - * @param borderSpace is the insets of the border on all four sides. - * @since Envoy 0.2-alpha - */ - public PrimaryTextArea(int arcSize, int borderSpace) { - super(); - setWrapStyleWord(true); - setLineWrap(true); - setBorder(null); - setFont(new Font("Arial", Font.PLAIN, 17)); - setBorder(new EmptyBorder(borderSpace, borderSpace, borderSpace, borderSpace)); - setOpaque(false); - - this.arcSize = arcSize; - } - - @Override - protected void paintComponent(Graphics g) { - g.setColor(getBackground()); - g.fillRoundRect(0, 0, getWidth(), getHeight(), arcSize, arcSize); - super.paintComponent(g); - } - - /** - * @return the arcSize - the diameter of the arc at the four corners. - * @since Envoy 0.2-alpha - */ - public int getArcSize() { return arcSize; } - - /** - * @param arcSize the arcSize to set - * @since Envoy 0.2-alpha - */ - public void setArcSize(int arcSize) { this.arcSize = arcSize; } -} +package envoy.client.ui; + +import java.awt.Font; +import java.awt.Graphics; + +import javax.swing.JTextArea; +import javax.swing.border.EmptyBorder; + +/** + * Project: envoy-client
+ * File: PrimaryTextArea.javaEvent.java
+ * Created: 07.12.2019
+ * + * @author Maximilian Käfer + * @since Envoy v0.2-alpha + */ +public class PrimaryTextArea extends JTextArea { + + private static final long serialVersionUID = -5829028696155434913L; + private int arcSize; + + /** + * Creates the text area + * + * @param borderSpace the space between components + * @since Envoy 0.2-alpha + */ + public PrimaryTextArea(int borderSpace) { this(6, borderSpace); } + + /** + * Creates the text area + * + * @param arcSize is the diameter of the arc at the four corners. + * @param borderSpace is the insets of the border on all four sides. + * @since Envoy 0.2-alpha + */ + public PrimaryTextArea(int arcSize, int borderSpace) { + super(); + setWrapStyleWord(true); + setLineWrap(true); + setBorder(null); + setFont(new Font("Arial", Font.PLAIN, 17)); + setBorder(new EmptyBorder(borderSpace, borderSpace, borderSpace, borderSpace)); + setOpaque(false); + + this.arcSize = arcSize; + } + + @Override + protected void paintComponent(Graphics g) { + g.setColor(getBackground()); + g.fillRoundRect(0, 0, getWidth(), getHeight(), arcSize, arcSize); + super.paintComponent(g); + } + + /** + * @return the arcSize - the diameter of the arc at the four corners. + * @since Envoy 0.2-alpha + */ + public int getArcSize() { return arcSize; } + + /** + * @param arcSize the arcSize to set + * @since Envoy 0.2-alpha + */ + public void setArcSize(int arcSize) { this.arcSize = arcSize; } +} diff --git a/src/main/java/envoy/client/ui/UserListRenderer.java b/src/main/java/envoy/client/ui/UserListRenderer.java index b145f28..c3c7ef2 100644 --- a/src/main/java/envoy/client/ui/UserListRenderer.java +++ b/src/main/java/envoy/client/ui/UserListRenderer.java @@ -26,7 +26,6 @@ public class UserListRenderer extends JLabel implements ListCellRenderer { private static final long serialVersionUID = 5164417379767181198L; - @SuppressWarnings("incomplete-switch") @Override public Component getListCellRendererComponent(JList list, User value, int index, boolean isSelected, boolean cellHasFocus) { if (isSelected) {