feat: add javafx chat ui and styling
This commit is contained in:
@@ -0,0 +1,52 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?import javafx.scene.layout.*?>
|
||||
<?import javafx.scene.control.*?>
|
||||
|
||||
<BorderPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml"
|
||||
fx:controller="com.university.chat.Client.UI.ChatController">
|
||||
|
||||
<top>
|
||||
<BorderPane fx:id="titleBar" styleClass="title-bar">
|
||||
<center><Label text="UniChat" styleClass="title-text"/></center>
|
||||
<right>
|
||||
<HBox>
|
||||
<Button text="—" styleClass="title-button" onAction="#minimize"/>
|
||||
<Button text="□" styleClass="title-button" onAction="#maximize"/>
|
||||
<Button text="✕" styleClass="title-button, title-button-close" onAction="#closeApp"/>
|
||||
</HBox>
|
||||
</right>
|
||||
</BorderPane>
|
||||
</top>
|
||||
|
||||
<center>
|
||||
|
||||
<HBox styleClass="content-wrapper" spacing="20">
|
||||
<VBox spacing="10" prefWidth="200">
|
||||
<Label text="Online Users"/>
|
||||
<ListView fx:id="usersList" VBox.vgrow="ALWAYS"/>
|
||||
</VBox>
|
||||
|
||||
<VBox spacing="10" HBox.hgrow="ALWAYS">
|
||||
<Label text="Private Chat"/>
|
||||
<AnchorPane fx:id="chatAnchor" style="-fx-background-color: #262638; -fx-background-radius: 8;" VBox.vgrow="ALWAYS"/>
|
||||
</VBox>
|
||||
|
||||
<VBox spacing="10" prefWidth="250">
|
||||
<Label text="Public Chat"/>
|
||||
<TextArea fx:id="publicChatArea" editable="false" VBox.vgrow="ALWAYS"/>
|
||||
|
||||
<VBox fx:id="fileTransferBox" spacing="4" visible="false" managed="false">
|
||||
<Label fx:id="fileTransferLabel" text="Sending file..."/>
|
||||
<ProgressBar fx:id="fileTransferProgress" progress="0.0" prefWidth="260"/>
|
||||
</VBox>
|
||||
|
||||
<HBox spacing="6">
|
||||
<Button text="📎" onAction="#sendFile"/>
|
||||
<TextField fx:id="messageField" HBox.hgrow="ALWAYS" promptText="Message..."/>
|
||||
<Button text="Send" onAction="#sendPublicMessage"/>
|
||||
</HBox>
|
||||
|
||||
</VBox>
|
||||
</HBox>
|
||||
</center>
|
||||
</BorderPane>
|
||||
Reference in New Issue
Block a user