Skip to content

Commit

Permalink
Merge pull request #213 from tejas-1405/update-javadocs
Browse files Browse the repository at this point in the history
Add java docs and delete unused class
  • Loading branch information
pjanthony2001 authored Apr 15, 2024
2 parents eefdba4 + 5eed3d5 commit a8b56bf
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 172 deletions.
72 changes: 0 additions & 72 deletions src/main/java/seedu/address/ui/DescriptionBox.java

This file was deleted.

4 changes: 3 additions & 1 deletion src/main/java/seedu/address/ui/DisplayCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ public class DisplayCard extends UiPart<Region> {


/**
* Creates a {@code PersonCode} with the given {@code Person} and index to display.
* Constructs a DisplayCard for displaying details of a specified field from a person's record.
* This card extracts the field name and description from {@code fieldDescription} and assigns them
* to the labels in the UI.
*/
public DisplayCard(DisplayListPanel.FieldDescription fieldDescription) {
super(FXML);
Expand Down
13 changes: 10 additions & 3 deletions src/main/java/seedu/address/ui/DisplayListPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


/**
* Panel containing the list of persons.
* Represents the panel that displays the list of persons within the application.
*/
public class DisplayListPanel extends UiPart<Region> {
private static final String FXML = "DisplayListPanel.fxml";
Expand Down Expand Up @@ -59,6 +59,12 @@ public DisplayListPanel(Person person, CommandBox.CommandExecutor commandExecuto
});
}

/**
* Handles key press events in the description text area,
* specifically looking for the ENTER key to execute update commands.
*
* @param keyCode the key code associated with the key event.
*/
@FXML
private void handleDescriptionEntered(KeyCode keyCode) {

Expand All @@ -79,6 +85,9 @@ private void handleDescriptionEntered(KeyCode keyCode) {
}
}

/**
* Resets the style of the description text area to the default style.
*/
private void setStyleToDefault() {
descriptionTextArea.getStyleClass().remove(CommandBox.ERROR_STYLE_CLASS);
}
Expand All @@ -98,8 +107,6 @@ private void setStyleToIndicateCommandFailure() {


private class DisplayPerson {
// Change method to utilise optionals instead of directly assuming the fields exist in the Person
// person.getField().map(person -> String).orElse(DEFAULT)

private static final String NAME_FIELD = "Name";
private static final String PHONE_FIELD = "Phone";
Expand Down
96 changes: 0 additions & 96 deletions src/main/java/seedu/address/ui/DisplayTable.java

This file was deleted.

0 comments on commit a8b56bf

Please sign in to comment.