Skip to content

Commit

Permalink
Merge branch 'branch-A-BetterGui'
Browse files Browse the repository at this point in the history
  • Loading branch information
teoks0199 committed Sep 19, 2023
2 parents 6fe684a + 4cbc27f commit 007cc3c
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
3 changes: 3 additions & 0 deletions data/duke.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ E | N | book fair | 2000-11-11 | 2000-11-11
T | N | test
D | N | da | 2020-01-01
E | N | asdbf | 2020-10-10 | 2020-10-11
T | N | dao
T | N | dsih
T | N | dskjf
1 change: 0 additions & 1 deletion src/main/java/duke/DialogBox.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
*/
public class DialogBox extends HBox {
@FXML
//private Label dialog;
private Text dialog;
@FXML
private ImageView displayPicture;
Expand Down
9 changes: 5 additions & 4 deletions src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.text.Text?>

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/17" xmlns:fx="http://javafx.com/fxml/1">
<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0" style="-fx-background-color: grey; -fx-border-color: black;" type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1">
<children>
<!-- <Label fx:id="dialog" text="Label" wrapText="true" />-->
<Text fx:id="dialog" text="Label" wrappingWidth="300.0" textAlignment="RIGHT"/>
<Text fx:id="dialog" layoutX="-0.0" text="Label" textAlignment="RIGHT" wrappingWidth="300.0">
<HBox.margin>
<Insets left="10.0" right="10.0" />
</HBox.margin></Text>
<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>

26 changes: 13 additions & 13 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="400.0" xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
<children>
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" />
<Button fx:id="sendButton" layoutX="324.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="SEND" />
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="400.0" vvalue="1.0">
<content>
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="388.0" />
</content>
</ScrollPane>
</children>
</AnchorPane>

<!--<fx:root type="javafx.scene.layout.AnchorPane" xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">-->
<!-- <children>-->
<!-- <TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="324.0" AnchorPane.bottomAnchor="1.0" />-->
Expand All @@ -28,4 +16,16 @@
<!-- </content>-->
<!-- </ScrollPane>-->
<!-- </children>-->
<!--</fx:root>-->
<!--</fx:root>-->

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="500.0" xmlns="http://javafx.com/javafx/20.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="duke.MainWindow">
<children>
<TextField fx:id="userInput" layoutY="558.0" onAction="#handleUserInput" prefHeight="41.0" prefWidth="500.0" AnchorPane.bottomAnchor="1.0" />
<Button fx:id="sendButton" layoutX="423.0" layoutY="558.0" mnemonicParsing="false" onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="SEND" />
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" prefHeight="557.0" prefWidth="500.0" vvalue="1.0">
<content>
<VBox fx:id="dialogContainer" prefHeight="552.0" prefWidth="500.0" style="-fx-background-color: white;" />
</content>
</ScrollPane>
</children>
</AnchorPane>

0 comments on commit 007cc3c

Please sign in to comment.