Skip to content

Commit

Permalink
Merge pull request #137 from DingBao-sys/FinalCLIDesignBranch
Browse files Browse the repository at this point in the history
checkstyle
  • Loading branch information
DingBao-sys authored Apr 1, 2024
2 parents e9f0bc5 + 75118e6 commit 7ba5251
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/main/java/seedu/address/ui/commandsection/CommandSection.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public class CommandSection extends UiPart<Region> {
private static final String ERROR = "failure-text";
private static final Image SUCCESS = new Image("/images/command-success.png");
private static final Image FAILURE = new Image("/images/command-error.png");
private static final Image WELCOME = new Image("./images/welcome.png");
@FXML
private VBox commandSectionContainer;
@FXML
Expand Down Expand Up @@ -158,12 +159,20 @@ private void addWelcomeDialog() {
dialogLabel.setId("command-section_dialog-label-welcome");
dialogLabel.setWrapText(true);
dialogLabel.prefWidthProperty().bind(commandSectionDialogContainer.widthProperty());
ImageView welcomeImage = new ImageView();
welcomeImage.setFitWidth(200);
welcomeImage.setFitHeight(200);
welcomeImage.setPreserveRatio(true);
welcomeImage.setImage(WELCOME);
welcomeImage.setId("welcome-image");
commandSectionDialogContainer.setAlignment(Pos.CENTER);
commandSectionDialogContainer.getChildren().add(dialogLabel);
commandSectionDialogContainer.getChildren().add(welcomeImage);
}
private void removeWelcomeDialog() {
commandSectionDialogContainer.getChildren().remove(
commandSectionDialogContainer.lookup("#command-section_dialog-label-welcome"));
commandSectionDialogContainer.getChildren().removeAll(
commandSectionDialogContainer.lookup("#command-section_dialog-label-welcome"),
commandSectionDialogContainer.lookup("#welcome-image"));
commandSectionDialogContainer.setAlignment(Pos.TOP_LEFT);
}
/**
Expand Down
Binary file added src/main/resources/images/welcome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7ba5251

Please sign in to comment.