Merge pull request #5 from PartowRoshani/Real-Time-update

Real-Time-update
This commit is contained in:
Mohammad Sajjad Zanganeh
2025-07-04 17:32:43 +03:30
committed by GitHub
29 changed files with 5070 additions and 237 deletions
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<HBox xmlns="http://javafx.com/javafx"
xmlns:fx="http://javafx.com/fxml"
fx:controller="org.to.telegramfinalproject.ContactCell"
spacing="10.0" alignment="CENTER_LEFT"
prefHeight="60.0" style="-fx-padding: 10;">
<ImageView fx:id="profileImage" fitHeight="40.0" fitWidth="40.0" preserveRatio="true">
<image>
<Image url="@/Icons/default_user.png" />
</image>
</ImageView>
<VBox spacing="4.0">
<Label fx:id="nameLabel" text="profile_name"
style="-fx-font-size: 14px; -fx-font-weight: bold;" />
<Label fx:id="statusLabel" text="● Online"
style="-fx-font-size: 12px; -fx-text-fill: green;" />
</VBox>
</HBox>
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.image.*?>
<?import javafx.scene.text.*?>
<?import java.lang.*?>
<?import java.util.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<ScrollPane prefHeight="983.0" prefWidth="859.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="org.to.telegramfinalproject.MainPage">
<content>
<AnchorPane prefHeight="977.0" prefWidth="845.0">
<children>
<AnchorPane layoutX="7.0" layoutY="-8.0" prefHeight="977.0" prefWidth="845.0">
<children>
<Label layoutX="-7.0" layoutY="-6.0" prefHeight="78.0" prefWidth="859.0" style="-fx-background-color: #1882da;" text=" Telegram" textFill="WHITE">
<font>
<Font name="Arial Bold" size="36.0" />
</font>
</Label>
<Button contentDisplay="GRAPHIC_ONLY" layoutX="6.0" layoutY="10.0" mnemonicParsing="false" style="-fx-background-color: #1882da;">
<graphic>
<ImageView fitHeight="39.0" fitWidth="63.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../Icons/menu.png" />
</image>
</ImageView>
</graphic>
</Button>
<Button contentDisplay="GRAPHIC_ONLY" layoutX="703.0" layoutY="9.0" mnemonicParsing="false" prefHeight="54.0" prefWidth="135.0" style="-fx-background-color: #1882da;" text="" textFill="#d6d6d6">
<graphic>
<ImageView fitHeight="47.0" fitWidth="54.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../Icons/search.png" />
</image>
</ImageView>
</graphic>
</Button>
<Button contentDisplay="GRAPHIC_ONLY" layoutX="547.0" mnemonicParsing="false" prefHeight="66.0" prefWidth="114.0" style="-fx-background-color: #1882da;" text="" />
<ImageView fitHeight="50.0" fitWidth="110.0" layoutX="586.0" layoutY="14.0" pickOnBounds="true" preserveRatio="true">
<image>
<Image url="@../../../Icons/time.png" />
</image>
</ImageView>
<ListView fx:id="contactListView" layoutX="1.0" layoutY="73.0" prefHeight="907.0" prefWidth="851.0" />
</children>
</AnchorPane>
</children>
</AnchorPane>
</content>
</ScrollPane>
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.Font?>
<AnchorPane prefHeight="800.0" prefWidth="802.0"
xmlns="http://javafx.com/javafx/8"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="org.to.telegramfinalproject.SearchingView">
<children>
<StackPane alignment="CENTER_LEFT" layoutX="0" layoutY="0" prefHeight="90.0" prefWidth="802.0">
<children>
<Label prefHeight="90.0" prefWidth="802.0"
style="-fx-background-color: #1882da;"
text=" Search" textFill="#c9c9c9">
<font>
<Font name="System Bold" size="24.0" />
</font>
</Label>
<HBox spacing="5.0" alignment="CENTER_LEFT">
<StackPane.margin>
<Insets left="100.0" />
</StackPane.margin>
<TextField fx:id="searchField"
promptText="Search..."
prefHeight="40.0" prefWidth="250.0"
style="-fx-background-color: #ffffff; -fx-background-radius: 20; -fx-border-radius: 20; -fx-border-color: transparent; -fx-font-size: 14;" />
<Button fx:id="searchButton"
contentDisplay="GRAPHIC_ONLY"
prefWidth="32.0" prefHeight="32.0"
style="-fx-background-color: #ffffff; -fx-background-radius: 50; -fx-border-color: transparent;">
<graphic>
<ImageView fitHeight="16.0" fitWidth="16.0" preserveRatio="true">
<image>
<Image url="@/Icons/search.png" />
</image>
</ImageView>
</graphic>
</Button>
<Button fx:id="exitButton"
contentDisplay="GRAPHIC_ONLY"
prefWidth="32.0" prefHeight="32.0"
style="-fx-background-color: #ffffff; -fx-background-radius: 50; -fx-border-color: transparent;">
<graphic>
<ImageView fitHeight="16.0" fitWidth="16.0" preserveRatio="true">
<image>
<Image url="@/Icons/remove.png" />
</image>
</ImageView>
</graphic>
</Button>
</HBox>
</children>
</StackPane>
</children>
</AnchorPane>