Skip to content

Commit

Permalink
Merge pull request #104 from hmanhduc2k/master
Browse files Browse the repository at this point in the history
Minor fixes with JavaFX components
  • Loading branch information
hmanhduc2k authored Oct 21, 2021
2 parents 8791040 + b07731f commit c68267d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public HelpCommand() {
* @param helpMessage of the command needed to be clarified by the users
*/
public HelpCommand(String commandWord, String helpMessage) {
requireAllNonNull(helpMessage);
requireAllNonNull(helpMessage, commandWord);
this.commandWord = commandWord;
this.helpMessage = helpMessage;
this.isGeneralHelp = false;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/seedu/academydirectory/ui/HelpWindow.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ public void focus() {
*/
@FXML
private void copyUrl() {
logger.info("Link copied");
final Clipboard clipboard = Clipboard.getSystemClipboard();
final ClipboardContent url = new ClipboardContent();
url.putString(USERGUIDE_URL);
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<?import javafx.scene.layout.HBox?>
<fx:root type="javafx.stage.Stage" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1"
title="Academy Directory" minWidth="450" minHeight="600" onCloseRequest="#handleExit">
title="Academy Directory" minWidth="800" minHeight="600" onCloseRequest="#handleExit">
<icons>
<Image url="@/images/academy_directory_32.png" />
</icons>
Expand All @@ -35,12 +35,12 @@
</Menu>
</MenuBar>

<HBox fx:id="container" styleClass="pane-with-border" minWidth="340" prefWidth="340">
<HBox fx:id="container" styleClass="pane-with-border" minWidth="800" prefWidth="340" VBox.vgrow="ALWAYS">
<padding>
<Insets top="10" right="10" bottom="10" left="10" />
</padding>
<StackPane fx:id="studentListPanelPlaceholder" VBox.vgrow="ALWAYS" minWidth="360"/>
<StackPane VBox.vgrow="NEVER" fx:id="resultDisplayPlaceholder" styleClass="pane-with-border">
<StackPane fx:id="studentListPanelPlaceholder" HBox.hgrow="ALWAYS" minWidth="360"/>
<StackPane HBox.hgrow="ALWAYS" fx:id="resultDisplayPlaceholder" styleClass="pane-with-border">
<padding>
<Insets top="5" right="10" bottom="5" left="10" />
</padding>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,10 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static seedu.academydirectory.logic.commands.CommandTestUtil.assertCommandSuccess;

import org.junit.jupiter.api.Test;

import seedu.academydirectory.logic.commands.exceptions.CommandException;
import seedu.academydirectory.model.Model;
import seedu.academydirectory.model.ModelManager;

Expand Down Expand Up @@ -44,8 +42,5 @@ public void execute_valid_help() {
CommandResult commandResult3 = new CommandResult(String.format(HelpCommand.MESSAGE_HELP_SUCCESS_SPECIFIC,
"exit"), ExitCommand.HELP_MESSAGE);
assertCommandSuccess(helpCommand3, model, commandResult3, model);

HelpCommand helpCommand4 = new HelpCommand(null, DeleteCommand.HELP_MESSAGE);
assertThrows(CommandException.class, () -> helpCommand4.execute(model));
}
}

0 comments on commit c68267d

Please sign in to comment.