Skip to content

Commit

Permalink
Updated changes
Browse files Browse the repository at this point in the history
  • Loading branch information
chenyixin0 committed Feb 26, 2024
1 parent d87e04e commit e6718f0
Show file tree
Hide file tree
Showing 20 changed files with 6 additions and 9 deletions.
Binary file modified Ui.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions src/main/java/duke/main/DialogBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class DialogBox extends HBox {
@FXML
private ImageView displayPicture;

//public DialogBox() {}
private DialogBox(String text, Image img) {
try {
FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource("/view/DialogBox.fxml"));
Expand All @@ -43,7 +44,6 @@ private DialogBox(String text, Image img) {
this.setBackground(new Background(new BackgroundFill(Color.rgb(255, 252, 234), new CornerRadii(10), new Insets(5))));
dialog.setText(text);
displayPicture.setImage(img);

}

/**
Expand All @@ -65,4 +65,4 @@ public static DialogBox getDukeDialog(String text, Image img) {
db.flip();
return db;
}
}
}
5 changes: 1 addition & 4 deletions src/main/java/duke/main/MainConnector.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.layout.AnchorPane;
import javafx.scene.layout.Background;
import javafx.scene.layout.BackgroundFill;
import javafx.scene.paint.Color;
import javafx.stage.Stage;

/**
Expand All @@ -21,7 +18,7 @@ public class MainConnector extends Application {
@Override
public void start(Stage stage) {
try {
FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource("/view/DialogBox.fxml"));
FXMLLoader fxmlLoader = new FXMLLoader(MainWindow.class.getResource("/view/MainWindow.fxml"));
AnchorPane ap = fxmlLoader.load();
Scene scene = new Scene(ap);
stage.setScene(scene);
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/Parser$1.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/Parser.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/Storage.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/TalkingBox.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/TaskList.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/main/UI.class
Binary file not shown.
Empty file.
Binary file removed src/main/production/ip/duke/task/Deadline.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/task/Event.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/task/Task.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/task/TaskType.class
Binary file not shown.
Binary file removed src/main/production/ip/duke/task/ToDo.class
Binary file not shown.
4 changes: 2 additions & 2 deletions src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.main.DialogBox">
<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" >
<children>
<Label fx:id="dialog" wrapText="true" />
<ImageView fx:id="displayPicture" fitHeight="99.0" fitWidth="99.0" pickOnBounds="true" preserveRatio="true" />
</children>
<padding>
<Insets bottom="15.0" left="5.0" right="5.0" top="15.0" />
</padding>
</fx:root>
</fx:root>
2 changes: 1 addition & 1 deletion src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/21" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.main.MainWindow">
<children>
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" AnchorPane.rightAnchor="76.0" />
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="76.0" />
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send" AnchorPane.bottomAnchor="0.6666666666666643" AnchorPane.rightAnchor="1.0" />
<ScrollPane fx:id="scrollPane" fitToHeight="true" fitToWidth="true" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0" AnchorPane.bottomAnchor="42.66666666666663" AnchorPane.leftAnchor="1.0" AnchorPane.rightAnchor="1.0" AnchorPane.topAnchor="1.0">
<content>
Expand Down

0 comments on commit e6718f0

Please sign in to comment.