Skip to content

Commit e6e7180

Browse files
authored
Merge pull request AY2425S1-CS2103T-W10-4#268 from isaactodo/code-reuse
Add code reuse and fix UG
2 parents 3b9c0d5 + 35f4b52 commit e6e7180

File tree

6 files changed

+29
-6
lines changed

6 files changed

+29
-6
lines changed

docs/DeveloperGuide.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ title: Developer Guide
1212

1313
## **Acknowledgements**
1414

15-
* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
15+
* Our team member isaactodo's iP chatbot code. https://github.com/isaactodo/ip
16+
* Solution for max sized context menu for Autocomplete feature adapted from https://stackoverflow.com/questions/51272738/javafx-contextmenu-max-size-has-no-effect.
17+
* Code for sidebar of UG and DG inspired by ChatGPT.
1618

1719
--------------------------------------------------------------------------------------------------------------------
1820

docs/UserGuide.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Tired of using paper or Microsoft Excel to track your student details? No worrie
99

1010
StoreClass (SC) is a desktop app designed exclusively for teachers from private organizations e.g. tuition centers to manage their students. As teachers, you can interact with the app by keying in your commands to StoreClass's chat bot, and your student details will be updated and saved automatically.
1111

12-
Paired also with a revolutionary AutoComplete feature, StoreClass helps you manage your student details more effectively, efficiently and most importantly, reliably.
12+
Paired also with a revolutionary Autocomplete feature, StoreClass helps you manage your student details more effectively, efficiently and most importantly, reliably.
1313
## Table of Contents
1414
* Table of Contents
1515
{:toc}
@@ -74,7 +74,7 @@ Paired also with a revolutionary AutoComplete feature, StoreClass helps you mana
7474
e.g. `[t/TAG]…​` can be used as ` ` (i.e. 0 times), `t/paid_tuition`, `t/paid_tuition t/smart` etc.
7575

7676
* Parameters can be in any order unless specified.<br>
77-
e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
77+
e.g. if the command specifies `n/NAME p/PHONE`, `p/PHONE n/NAME` is also acceptable.
7878

7979
* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.<br>
8080
e.g. if the command specifies `help 123`, it will be interpreted as `help`.
@@ -341,7 +341,7 @@ You can hover over each individual module for a while to view the grades for tha
341341
- `grade 1 m/Math m/Chinese s/100 s/90` will grade the first person's Math to 100 and his Chinese to 90.
342342

343343

344-
### Archiving data files `archive`
344+
### Archiving data files: `archive`
345345

346346
You can archive the current address book to a specific file name.
347347

@@ -361,7 +361,7 @@ When you execute the archive command, all entries in the current StoreClass will
361361
If you choose an existing archive file as the file name when archiving, the old archive file will be overwritten.
362362
</div>
363363

364-
### Load data files `load`
364+
### Load data files: `load`
365365

366366
You can load data from an archived file into StoreClass.
367367

src/main/java/seedu/address/ui/DialogBox.java

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ public class DialogBox extends HBox {
2525
@FXML
2626
private ImageView displayPicture;
2727

28+
//@@author isaactodo-reused
29+
// Reused from https://github.com/isaactodo/ip/blob/master/src/main/java/sentinel/DialogBox.java
30+
// with minor modifications
2831
private DialogBox(String text, Image img) {
2932
try {
3033
FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource("/view/DialogBox.fxml"));
@@ -88,4 +91,5 @@ public static DialogBox getChatBotDialog(String text, Image img) {
8891

8992
return db;
9093
}
94+
//@@author
9195
}

src/main/java/seedu/address/ui/MaxSizedContextMenu.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public class MaxSizedContextMenu extends ContextMenu {
1818
* Constructor for max sized context menu
1919
*/
2020
public MaxSizedContextMenu() {
21+
// Solution below adapted from
22+
// https://stackoverflow.com/questions/51272738/javafx-contextmenu-max-size-has-no-effect
2123
addEventHandler(Menu.ON_SHOWING, e -> {
2224
Node content = getSkin().getNode();
2325
if (content instanceof Region regionContent) {

src/main/resources/view/DialogBox.css

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/*
2+
//@@author isaactodo-reused
3+
// Reused from https://github.com/isaactodo/ip/blob/master/src/main/resources/css/dialog-box.css
4+
// with minor modifications
5+
*/
16
.label {
27
-fx-background-color: #1E293B;
38
-fx-border-color: #0F172A;
@@ -39,3 +44,6 @@
3944
-fx-border-radius: 100%;
4045
-fx-background-radius: 50px;
4146
}
47+
/*
48+
//@@author
49+
*/

src/main/resources/view/DialogBox.fxml

+8-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
<?import javafx.scene.control.Label?>
66
<?import javafx.scene.image.ImageView?>
77
<?import javafx.scene.layout.HBox?>
8-
8+
<!--
9+
//@@author isaactodo-reused
10+
// Reused from https://github.com/isaactodo/ip/blob/master/src/main/resources/view/DialogBox.fxml
11+
// with minor modifications
12+
-->
913
<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/22" xmlns:fx="http://javafx.com/fxml/1">
1014
<stylesheets>
1115
<URL value="@DialogBox.css" />
@@ -25,3 +29,6 @@
2529
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
2630
</padding>
2731
</fx:root>
32+
<!--
33+
//@@author
34+
-->

0 commit comments

Comments
 (0)