Skip to content

Commit

Permalink
Minor fixes to styling
Browse files Browse the repository at this point in the history
  • Loading branch information
yooplo committed Oct 2, 2024
1 parent 3711182 commit ed5363e
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 13 deletions.
5 changes: 3 additions & 2 deletions src/main/java/seedu/address/logic/commands/RemarkCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
import static seedu.address.commons.util.CollectionUtil.requireAllNonNull;
import static seedu.address.model.Model.PREDICATE_SHOW_ALL_PERSONS;

import java.util.List;

import seedu.address.commons.core.index.Index;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.logic.Messages;
import seedu.address.logic.commands.exceptions.CommandException;
import seedu.address.model.Model;
import seedu.address.model.person.Person;
import seedu.address.model.person.Remark;

import java.util.List;

/**
* Changes the remark of an existing person in the address book.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;

import java.util.Arrays;

import seedu.address.logic.commands.FindCommand;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.NameContainsKeywordsPredicate;
Expand Down
17 changes: 12 additions & 5 deletions src/main/java/seedu/address/logic/parser/RemarkCommandParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,25 @@

import static java.util.Objects.requireNonNull;
import static seedu.address.logic.Messages.MESSAGE_INVALID_COMMAND_FORMAT;
import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;

import seedu.address.commons.core.index.Index;
import seedu.address.commons.exceptions.IllegalValueException;
import seedu.address.logic.commands.RemarkCommand;
import static seedu.address.logic.parser.CliSyntax.PREFIX_REMARK;
import seedu.address.logic.parser.exceptions.ParseException;
import seedu.address.model.person.Remark;

public class RemarkCommandParser implements Parser<RemarkCommand>{

/**
* Parses user input for the {@code remark} command.
*/
public class RemarkCommandParser implements Parser<RemarkCommand> {
/**
* Parses the given {@code String} of arguments into a {@code RemarkCommand}.
*
* @param args The String of arguments.
* @return the RemarkCommand object.
* @throws ParseException If the user input does not conform to the expected format.
*/
public RemarkCommand parse(String args) throws ParseException {
requireNonNull(args);
ArgumentMultimap argMultimap = ArgumentTokenizer.tokenize(args, PREFIX_REMARK);
Expand All @@ -23,9 +32,7 @@ public RemarkCommand parse(String args) throws ParseException {
throw new ParseException(String.format(MESSAGE_INVALID_COMMAND_FORMAT,
RemarkCommand.MESSAGE_USAGE), ive);
}

Remark remark = new Remark(argMultimap.getValue(PREFIX_REMARK).orElse(""));

return new RemarkCommand(index, remark);
}

Expand Down
8 changes: 2 additions & 6 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,17 @@
*/
public class PersonCard extends UiPart<Region> {

private static final String FXML = "PersonListCard.fxml";
public final Person person;
@FXML
private Label remark;

private static final String FXML = "PersonListCard.fxml";

/**
* Note: Certain keywords such as "location" and "resources" are reserved keywords in JavaFX.
* As a consequence, UI elements' variable names cannot be set to such keywords
* or an exception will be thrown by JavaFX during runtime.
*
* @see <a href="https://github.com/se-edu/addressbook-level4/issues/336">The issue on AddressBook level 4</a>
*/

public final Person person;

@FXML
private HBox cardPane;
@FXML
Expand Down

0 comments on commit ed5363e

Please sign in to comment.