Clean Code.
This commit is contained in:
@@ -1,23 +0,0 @@
|
|||||||
package org.to.telegramfinalproject;
|
|
||||||
|
|
||||||
import javafx.application.Application;
|
|
||||||
import javafx.fxml.FXMLLoader;
|
|
||||||
import javafx.scene.Scene;
|
|
||||||
import javafx.stage.Stage;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class HelloApplication extends Application {
|
|
||||||
@Override
|
|
||||||
public void start(Stage stage) throws IOException {
|
|
||||||
FXMLLoader fxmlLoader = new FXMLLoader(HelloApplication.class.getResource("hello-view.fxml"));
|
|
||||||
Scene scene = new Scene(fxmlLoader.load(), 320, 240);
|
|
||||||
stage.setTitle("Hello!");
|
|
||||||
stage.setScene(scene);
|
|
||||||
stage.show();
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) {
|
|
||||||
launch();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
package org.to.telegramfinalproject;
|
|
||||||
|
|
||||||
import javafx.fxml.FXML;
|
|
||||||
import javafx.scene.control.Label;
|
|
||||||
|
|
||||||
public class HelloController {
|
|
||||||
@FXML
|
|
||||||
private Label welcomeText;
|
|
||||||
|
|
||||||
@FXML
|
|
||||||
protected void onHelloButtonClick() {
|
|
||||||
welcomeText.setText("Welcome to JavaFX Application!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,314 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<?import javafx.geometry.Insets?>
|
|
||||||
<?import javafx.scene.control.*?>
|
|
||||||
<?import javafx.scene.layout.*?>
|
|
||||||
|
|
||||||
<BorderPane xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml"
|
|
||||||
styleClass="tf-root">
|
|
||||||
|
|
||||||
<top>
|
|
||||||
<HBox spacing="10" styleClass="tf-toolbar">
|
|
||||||
<children>
|
|
||||||
<Label text="Telegram Features" styleClass="tf-title"/>
|
|
||||||
<Region HBox.hgrow="ALWAYS"/>
|
|
||||||
<Label text="(static showcase)" styleClass="tf-caption"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
</top>
|
|
||||||
|
|
||||||
<center>
|
|
||||||
<ScrollPane fitToWidth="true" hbarPolicy="NEVER" vbarPolicy="AS_NEEDED">
|
|
||||||
<content>
|
|
||||||
<Accordion>
|
|
||||||
<panes>
|
|
||||||
|
|
||||||
<!-- 1) Account & Authentication -->
|
|
||||||
<TitledPane text="1) Account & Authentication">
|
|
||||||
<content>
|
|
||||||
<VBox spacing="8" styleClass="tf-section">
|
|
||||||
<children>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Register, Login & Logout" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Create account, sign in/out, and manage sessions (devices, multi-login prevention)." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="GLOBAL" styleClass="tf-chip"/>
|
|
||||||
<Label text="SECURITY" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Profile & Presence" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Bio, photo, display name, user id, online / last seen." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="GLOBAL" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</TitledPane>
|
|
||||||
|
|
||||||
<!-- 2) Contacts -->
|
|
||||||
<TitledPane text="2) Contacts">
|
|
||||||
<content>
|
|
||||||
<VBox spacing="8" styleClass="tf-section">
|
|
||||||
<children>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Add / Remove Contacts" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Add, remove, and browse contacts with full profile view." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CONTACT" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Block / Unblock" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Manage private chat access and visibility." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CONTACT" styleClass="tf-chip"/>
|
|
||||||
<Label text="SECURITY" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</TitledPane>
|
|
||||||
|
|
||||||
<!-- 3) Chats -->
|
|
||||||
<TitledPane text="3) Chats">
|
|
||||||
<content>
|
|
||||||
<VBox spacing="8" styleClass="tf-section">
|
|
||||||
<children>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Private Chats" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Create or open private chats (get_or_create_private_chat)." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CHAT" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Groups" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Create groups, add members, roles & permissions, ownership transfer." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CHAT" styleClass="tf-chip"/>
|
|
||||||
<Label text="ADMIN" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Channels" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Create channels, manage subscribers, admins, and ownership." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CHAT" styleClass="tf-chip"/>
|
|
||||||
<Label text="ADMIN" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Saved Messages" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Personal cloud chat to keep your own notes and files." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="GLOBAL" styleClass="tf-chip"/>
|
|
||||||
<Label text="MESSAGE" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Archive Chats" styleClass="tf-item-title"/>
|
|
||||||
<Label text="In Progress" styleClass="tf-status tf-status-progress"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Move chats in/out of Archive for better organization." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children>
|
|
||||||
<Label text="CHAT" styleClass="tf-chip"/>
|
|
||||||
</children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</TitledPane>
|
|
||||||
|
|
||||||
<!-- 4) Messaging -->
|
|
||||||
<TitledPane text="4) Messaging">
|
|
||||||
<content>
|
|
||||||
<VBox spacing="8" styleClass="tf-section">
|
|
||||||
<children>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Reply" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Quote and reply to a specific message." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children><Label text="MESSAGE" styleClass="tf-chip"/></children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<HBox spacing="10" styleClass="tf-item">
|
|
||||||
<children>
|
|
||||||
<VBox spacing="4" HBox.hgrow="ALWAYS">
|
|
||||||
<children>
|
|
||||||
<HBox spacing="8" alignment="CENTER_LEFT">
|
|
||||||
<children>
|
|
||||||
<Label text="Forward" styleClass="tf-item-title"/>
|
|
||||||
<Label text="Available" styleClass="tf-status tf-status-available"/>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
<Label text="Send a message to another chat with source attribution." styleClass="tf-item-desc" wrapText="true"/>
|
|
||||||
<FlowPane hgap="6" vgap="6">
|
|
||||||
<children><Label text="MESSAGE" styleClass="tf-chip"/></children>
|
|
||||||
</FlowPane>
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</children>
|
|
||||||
</HBox>
|
|
||||||
|
|
||||||
<!-- Add more items similarly: Edit, Delete, Reactions, Attachments, Read Receipts -->
|
|
||||||
|
|
||||||
</children>
|
|
||||||
</VBox>
|
|
||||||
</content>
|
|
||||||
</TitledPane>
|
|
||||||
|
|
||||||
<!-- You can add more TitledPane sections similarly (Search, UI/UX, Real-Time Events, Security). -->
|
|
||||||
|
|
||||||
</panes>
|
|
||||||
</Accordion>
|
|
||||||
</content>
|
|
||||||
</ScrollPane>
|
|
||||||
</center>
|
|
||||||
|
|
||||||
<padding>
|
|
||||||
<Insets top="8" right="8" bottom="8" left="8"/>
|
|
||||||
</padding>
|
|
||||||
</BorderPane>
|
|
||||||
@@ -1,16 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
|
|
||||||
<?import javafx.geometry.Insets?>
|
|
||||||
<?import javafx.scene.control.Label?>
|
|
||||||
<?import javafx.scene.layout.VBox?>
|
|
||||||
|
|
||||||
<?import javafx.scene.control.Button?>
|
|
||||||
<VBox alignment="CENTER" spacing="20.0" xmlns:fx="http://javafx.com/fxml"
|
|
||||||
fx:controller="org.to.telegramfinalproject.HelloController">
|
|
||||||
<padding>
|
|
||||||
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0"/>
|
|
||||||
</padding>
|
|
||||||
|
|
||||||
<Label fx:id="welcomeText"/>
|
|
||||||
<Button text="Hello!" onAction="#onHelloButtonClick"/>
|
|
||||||
</VBox>
|
|
||||||
Reference in New Issue
Block a user