forked from nus-cs2103-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #158 from Pluiexo/branch-RevampUI
Branch revamp UI
- Loading branch information
Showing
19 changed files
with
726 additions
and
290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package staffconnect.ui; | ||
|
||
import javafx.fxml.FXML; | ||
import javafx.scene.control.Label; | ||
import javafx.scene.layout.Region; | ||
import staffconnect.model.person.Person; | ||
|
||
/** | ||
* A UI component that displays the name only of a {@code Person}. | ||
*/ | ||
public class NameCard extends UiPart<Region> { | ||
|
||
private static final String FXML = "NameCard.fxml"; | ||
@javafx.fxml.FXML | ||
private Label id; | ||
@FXML | ||
private Label name; | ||
|
||
@FXML | ||
private Label favourite; | ||
|
||
/** | ||
* Creates a {@code NameCard} with the given {@code Person} and index to display. | ||
*/ | ||
public NameCard(Person person, int index) { | ||
super(FXML); | ||
id.setText(index + ". "); | ||
name.setText(person.getName().fullName); | ||
favourite.setStyle("-fx-text-fill: accent-orange"); | ||
favourite.setText(person.getFavourite().toDisplayString() + " "); | ||
} | ||
|
||
} |
Oops, something went wrong.