Skip to content

Commit

Permalink
Fix GUI to allow re-sizing of screen
Browse files Browse the repository at this point in the history
  • Loading branch information
bigjunnn committed Sep 22, 2019
1 parent 188662a commit c853e30
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
1 change: 0 additions & 1 deletion data/tasks.txt
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
T | 0 | CS2103T
2 changes: 1 addition & 1 deletion src/main/resources/view/DialogBox.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<?import javafx.scene.text.Font?>

<fx:root alignment="TOP_RIGHT" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefWidth="400.0"
type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1">
type="javafx.scene.layout.HBox" xmlns="http://javafx.com/javafx/11.0" xmlns:fx="http://javafx.com/fxml/1">
<children>
<Label fx:id="dialog" text="Input from box" wrapText="true">
<opaqueInsets>
Expand Down
23 changes: 11 additions & 12 deletions src/main/resources/view/MainWindow.fxml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.VBox?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="737.0"
prefWidth="450.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1"
prefWidth="450.0" xmlns="http://javafx.com/javafx/11.0" xmlns:fx="http://javafx.com/fxml/1"
fx:controller="MainWindow">
<children>
<TextField fx:id="userInput" layoutY="694.0" onAction="#handleUserInput" prefHeight="42.0" prefWidth="374.0"
promptText="Please type something.." AnchorPane.bottomAnchor="0.6000000000000227"/>
<TextField fx:id="userInput" layoutY="694.0" maxHeight="-Infinity" maxWidth="1.7976931348623157E308"
onAction="#handleUserInput" prefHeight="42.0" prefWidth="374.0" promptText="Please type something.."
AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="78.0"/>
<Button fx:id="sendButton" alignment="CENTER" layoutX="374.0" layoutY="694.0" mnemonicParsing="false"
onAction="#handleUserInput" prefHeight="41.0" prefWidth="76.0" text="Send" textAlignment="CENTER"/>
<ScrollPane fx:id="scrollPane" hbarPolicy="NEVER" hvalue="1.0" layoutY="10.0" prefHeight="684.0"
prefWidth="450.0" vvalue="1.0">
onAction="#handleUserInput" prefHeight="42.0" prefWidth="80.0" text="Send" textAlignment="CENTER"
AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0"/>
<ScrollPane fx:id="scrollPane" fitToWidth="true" hbarPolicy="NEVER" hvalue="1.0" layoutY="10.0"
maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" prefHeight="684.0"
prefWidth="450.0" vvalue="1.0" AnchorPane.bottomAnchor="43.0" AnchorPane.leftAnchor="0.0"
AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<content>
<VBox fx:id="dialogContainer" prefHeight="684.0" prefWidth="435.0" style="-fx-background-color: AZURE;">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0"/>
</padding>
</VBox>
<VBox fx:id="dialogContainer" prefHeight="700.0" prefWidth="435.0"/>
</content>
</ScrollPane>
</children>
Expand Down

0 comments on commit c853e30

Please sign in to comment.