Skip to content

Commit

Permalink
Update JavaDoc comments
Browse files Browse the repository at this point in the history
  • Loading branch information
siangernlow committed Sep 2, 2020
1 parent 546cb2c commit 7bbbd80
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/java/taskbot/ui/DialogBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,22 @@ private void flip() {
setAlignment(Pos.TOP_LEFT);
}

/**
* Creates a DialogBox representing the user.
* @param text The text the user has input.
* @param image The image representing the user.
* @return a DialogBox with the given text and image.
*/
public static DialogBox getUserDialog(String text, Image image) {
return new DialogBox(text, image);
}

/**
* Creates a DialogBox representing TaskBot's response.
* @param text The response given by TaskBot.
* @param image The image representing TaskBot.
* @return a DialogBox to be displayed as TaskBot's answer to the user.
*/
public static DialogBox getTaskbotDialog(String text, Image image) {
DialogBox dialogBox = new DialogBox(text, image);
dialogBox.flip();
Expand Down

0 comments on commit 7bbbd80

Please sign in to comment.