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

Update Icon Variable Names based on Semantic Usage #126

Merged
merged 2 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions src/main/java/seedu/address/ui/PersonCard.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ public PersonCard(Person person, int displayedIndex) {
}
private void createFields() {
name.setText(person.getName().fullName);
phone.setFields("fas-phone-alt", person.getPhone().value);
address.setFields("fas-building", person.getAddress().value);
email.setFields("fas-envelope", person.getEmail().value);
job.setFields("fas-briefcase", person.getJob().value);
income.setFields("fas-dollar-sign", person.getIncome().toString());
phone.setFields(PersonCardField.ICON_LITERAL_PHONE, person.getPhone().value);
address.setFields(PersonCardField.ICON_LITERAL_ADDRESS, person.getAddress().value);
email.setFields(PersonCardField.ICON_LITERAL_EMAIL, person.getEmail().value);
job.setFields(PersonCardField.ICON_LITERAL_JOB, person.getJob().value);
income.setFields(PersonCardField.ICON_LITERAL_INCOME, person.getIncome().toString());
remark.setText(person.getRemark().value);
cardFields.getChildren().addAll(phone, address, email, job, income);
}
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/seedu/address/ui/PersonCardField.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
* Represents a labelled field in the PersonCard
*/
public class PersonCardField extends HBox {
public static final String ICON_LITERAL_PHONE = "fas-phone-alt";
public static final String ICON_LITERAL_ADDRESS = "fas-building";
public static final String ICON_LITERAL_EMAIL = "fas-envelope";
public static final String ICON_LITERAL_JOB = "fas-briefcase";
public static final String ICON_LITERAL_INCOME = "fas-dollar-sign";

private FontIcon icon;
private Label value;

Expand Down