Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rama Venkatesh] iP #503

Open
wants to merge 58 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
d839859
Add Gradle support
May 24, 2020
a5e37a0
Level-1
ramaven Aug 19, 2021
9f114de
Level-2
ramaven Aug 19, 2021
254a843
Level-3
ramaven Aug 19, 2021
dcbae92
Level-4
ramaven Aug 19, 2021
cba3a3a
Level-5
ramaven Aug 19, 2021
ec3c11f
Level-6
ramaven Aug 19, 2021
913b02f
modified expected output
ramaven Sep 2, 2021
75ec70d
enum & refactoring
ramaven Sep 2, 2021
76f877c
enum; refactoring
ramaven Sep 2, 2021
d6610f1
added save functionality
ramaven Sep 5, 2021
6e00451
added save
ramaven Sep 5, 2021
a4d5124
Added DukeDate parse
ramaven Sep 6, 2021
98be0ed
Merge branch 'master' into branch-Level-8
ramaven Sep 6, 2021
bb01e2e
Merge pull request #1 from ramaven/branch-Level-8
ramaven Sep 6, 2021
f54b7d8
fixed getDate() bug
ramaven Sep 6, 2021
6e50441
refactored packages
ramaven Sep 6, 2021
54125a4
removed debug statements
ramaven Sep 6, 2021
c471774
added Command class; OOP
ramaven Sep 6, 2021
b330b0d
adhered coding standard
ramaven Sep 11, 2021
35c0733
adhered coding standard
ramaven Sep 11, 2021
49b8c33
added javadocs
ramaven Sep 11, 2021
a5955e0
added find functionality
ramaven Sep 11, 2021
0dd98f3
Merge pull request #2 from ramaven/branch-A-CodingStandard
ramaven Sep 11, 2021
deafde9
Merge pull request #3 from ramaven/branch-A-JavaDoc
ramaven Sep 11, 2021
80d6917
Merge pull request #4 from ramaven/branch-Level-9
ramaven Sep 11, 2021
84bc195
Merge pull request #6 from ramaven/add-gradle-support
ramaven Sep 12, 2021
f1722c7
fixed file save bug
ramaven Sep 12, 2021
90738d5
fixed file save bug
ramaven Sep 12, 2021
8c536cb
added gradle support
ramaven Sep 12, 2021
1848605
Merge branch 'master' into branch-A-Gradle
ramaven Sep 12, 2021
6657c54
Merge pull request #7 from ramaven/branch-A-Gradle
ramaven Sep 12, 2021
d183176
checkstyle
ramaven Sep 12, 2021
559aa07
Merge pull request #8 from ramaven/branch-A-Checkstyle
ramaven Sep 12, 2021
6137ed5
modified gradle build file
ramaven Sep 12, 2021
99eeead
Merge branch 'master' into branch-A-Checkstyle
ramaven Sep 12, 2021
0dc6f8e
Merge pull request #9 from ramaven/branch-A-Checkstyle
ramaven Sep 12, 2021
48c8b01
Added GUI
ramaven Sep 13, 2021
6f08fb4
Merge pull request #10 from ramaven/branch-Level-10
ramaven Sep 13, 2021
a6c7cec
Add assert statements
ramaven Sep 14, 2021
431ad92
Merge pull request #11 from ramaven/branch-A-Assertions
ramaven Sep 14, 2021
b919c18
Find command: make matching case insensitive
ramaven Sep 14, 2021
23b81b1
Merge pull request #12 from ramaven/branch-C-BetterSearch
ramaven Sep 14, 2021
6735ff4
Improve code quality
ramaven Sep 15, 2021
85deaac
Merge pull request #13 from ramaven/branch-A-CodeQuality
ramaven Sep 15, 2021
375ee70
Add product screenshot
ramaven Sep 15, 2021
5db5d46
Add user guide
ramaven Sep 15, 2021
790acc6
Set theme jekyll-theme-minimal
ramaven Sep 15, 2021
b5d33a9
Set theme jekyll-theme-leap-day
ramaven Sep 15, 2021
1e5ca13
Edit User Guide
ramaven Sep 15, 2021
0557aa0
Merge branch 'master' of https://github.com/ramaven/ip
ramaven Sep 15, 2021
855c0ad
Update README
ramaven Sep 15, 2021
dc82355
Update README.md
ramaven Sep 15, 2021
27a3096
Update README.md
ramaven Sep 15, 2021
f17b05f
Update README.md
ramaven Sep 15, 2021
a9ce5a5
Add credits
ramaven Sep 15, 2021
979f83f
Improve code quality
ramaven Sep 15, 2021
8e8c1d7
Add test methods
ramaven Sep 17, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add credits
ramaven committed Sep 15, 2021
commit a9ce5a5bcdf6a16eff6d206945fddf713e9e4d8a
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -174,4 +174,4 @@ Here are the matching tasks:

### Acknowledgements:
- Original Duke template forked from Prof Damith CS2103T github
- GUI Design from Javafx tutorials
- GUI Design based on Javafx tutorials
79 changes: 47 additions & 32 deletions src/main/java/duke/utils/Ui.java
Original file line number Diff line number Diff line change
@@ -107,44 +107,57 @@ public void setInitialStage() {
* Formats the window to look as expected.
*/
public void formatStage() {
stage.setResizable(false);
stage.setMinHeight(600.0);
stage.setMinWidth(400.0);
//@@author ramaven-reused
//Reused from JavaFx tutorial 2 (https://se-education.org/guides/tutorials/javaFxPart2.html)
// with minor modifications
{
stage.setResizable(false);
stage.setMinHeight(600.0);
stage.setMinWidth(400.0);

mainLayout.setPrefSize(400.0, 600.0);
mainLayout.setPrefSize(400.0, 600.0);

scrollPane.setPrefSize(385, 535);
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);
scrollPane.setPrefSize(385, 535);
scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);

scrollPane.setVvalue(1.0);
scrollPane.setFitToWidth(true);
scrollPane.setVvalue(1.0);
scrollPane.setFitToWidth(true);

vbox.setPrefHeight(Region.USE_COMPUTED_SIZE);
vbox.setPrefHeight(Region.USE_COMPUTED_SIZE);

textField.setPrefWidth(325.0);
textField.setPrefWidth(325.0);

sendButton.setPrefWidth(55.0);
sendButton.setPrefWidth(55.1);

AnchorPane.setTopAnchor(scrollPane, 1.0);
AnchorPane.setTopAnchor(scrollPane, 1.0);

AnchorPane.setBottomAnchor(sendButton, 1.0);
AnchorPane.setRightAnchor(sendButton, 1.0);
AnchorPane.setBottomAnchor(sendButton, 1.0);
AnchorPane.setRightAnchor(sendButton, 1.0);

AnchorPane.setLeftAnchor(textField, 1.0);
AnchorPane.setBottomAnchor(textField, 1.0);
AnchorPane.setLeftAnchor(textField, 1.0);
AnchorPane.setBottomAnchor(textField, 1.0);
}
//@@author
}

/**
* Adds functionality to handle user input.
*/
public void setUserInteraction() {
sendButton.setOnMouseClicked((event) -> {
handleUserInput();
});

//Scroll down to the end every time dialogContainer's height changes.
vbox.heightProperty().addListener((observable) -> scrollPane.setVvalue(1.0));
//@@author ramaven-reused
//Reused from JavaFx tutorial 3 (https://se-education.org/guides/tutorials/javaFxPart3.html)
// with minor modifications
{
sendButton.setOnMouseClicked((event) -> {
handleUserInput();
});

//Scroll down to the end every time dialogContainer's height changes to
// improve user experience
vbox.heightProperty().addListener((observable) -> scrollPane.setVvalue(1.0));
}
//@@author
}


@@ -153,16 +166,18 @@ public void setUserInteraction() {
* the dialog container. Clears the user input after processing.
*/
private void handleUserInput() {
Label userText = new Label(textField.getText());
vbox.getChildren().addAll(DialogBox.getUserDialog(userText, new ImageView(user)));
Label dukeText = new Label(getResponse(textField.getText()));
vbox.getChildren().addAll(DialogBox.getDukeDialog(dukeText, new ImageView(duke)));
textField.clear();
// Solution below adapted from JavaFx tutorial 3 (https://se-education.org/guides/tutorials/javaFxPart3.html)
{
Label userText = new Label(textField.getText());
vbox.getChildren().addAll(DialogBox.getUserDialog(userText, new ImageView(user)));
Label dukeText = new Label(getResponse(textField.getText()));
vbox.getChildren().addAll(DialogBox.getDukeDialog(dukeText, new ImageView(duke)));
textField.clear();
}
}

/**
* You should have your own function to generate a response to user input.
* Replace this stub with your completed method.
* Generates a response to user input.
*/
private String getResponse(String input) {
String userInput = textField.getText();
@@ -225,8 +240,8 @@ public void showLine() {
* @param e Exception
*/
public void showError(Exception e) {
stringBuilder.append(e.toString());
label.setText(stringBuilder.toString());
vbox.getChildren().addAll(
DialogBox.getDukeDialog(new Label(e.toString()) ));
}