Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0e61f39

Browse files
Added Login_Signup user interface & Controller classes with related packages.
1 parent dc48272 commit 0e61f39

File tree

2 files changed

+231
-0
lines changed

2 files changed

+231
-0
lines changed
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/**
2+
* @author : Ishara Maduarnga
3+
* Project Name: Multi_Client_Chat_Application
4+
* Date : 8/9/2022
5+
* Time : 10:10 AM
6+
* Year : 2022
7+
*/
8+
9+
package Controller;
10+
11+
import javafx.event.ActionEvent;
12+
import javafx.scene.control.*;
13+
import javafx.scene.image.ImageView;
14+
import javafx.scene.input.MouseEvent;
15+
import javafx.scene.layout.Pane;
16+
17+
public class Login_Signup {
18+
public Pane pnSignUp;
19+
public ImageView btnBack;
20+
public PasswordField regPass;
21+
public TextField regFirstName;
22+
public TextField regEmail;
23+
public Button getStarted;
24+
public Label controlRegLabel;
25+
public Label success;
26+
public Label goBack;
27+
public TextField regName;
28+
public RadioButton male;
29+
public ToggleGroup Gender;
30+
public RadioButton female;
31+
public Label nameExists;
32+
public Label checkEmail;
33+
public TextField regPhoneNo;
34+
public Pane pnSignIn;
35+
public TextField userName;
36+
public PasswordField passWord;
37+
public Button btnSignUp;
38+
public Label loginNotifier;
39+
40+
41+
public void registration(ActionEvent event) {
42+
}
43+
44+
45+
public void login(ActionEvent event) {
46+
}
47+
48+
49+
public void handleButtonAction(ActionEvent event) {
50+
}
51+
52+
public void handleMouseEvent(MouseEvent mouseEvent) {
53+
}
54+
55+
56+
57+
58+
}

‎Client_Side/src/View/Login_Signup.fxml

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import javafx.scene.control.Button?>
4+
<?import javafx.scene.control.Label?>
5+
<?import javafx.scene.control.PasswordField?>
6+
<?import javafx.scene.control.RadioButton?>
7+
<?import javafx.scene.control.TextField?>
8+
<?import javafx.scene.control.ToggleGroup?>
9+
<?import javafx.scene.image.Image?>
10+
<?import javafx.scene.image.ImageView?>
11+
<?import javafx.scene.layout.AnchorPane?>
12+
<?import javafx.scene.layout.Pane?>
13+
<?import javafx.scene.layout.StackPane?>
14+
<?import javafx.scene.text.Font?>
15+
16+
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="560.0" prefWidth="330.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.Login_Signup">
17+
<children>
18+
<StackPane prefHeight="560.0" prefWidth="330.0" style="-fx-background-color: red;">
19+
<children>
20+
<Pane fx:id="pnSignUp" prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #263238#263238;" stylesheets="@Css/style.css">
21+
<children>
22+
<ImageView fx:id="btnBack" fitHeight="38.0" fitWidth="44.0" layoutX="9.0" layoutY="12.0" onMousePressed="#handleMouseEvent" opacity="0.48" pickOnBounds="true" preserveRatio="true" styleClass="btnBack">
23+
<image>
24+
<Image url="@icons/go_back.png" />
25+
</image>
26+
</ImageView>
27+
<PasswordField fx:id="regPass" layoutX="49.0" layoutY="178.0" prefHeight="35.0" prefWidth="233.0" promptText="Password" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
28+
<font>
29+
<Font name="Arial" size="17.0" />
30+
</font>
31+
</PasswordField>
32+
<TextField fx:id="regFirstName" layoutX="49.0" layoutY="83.0" prefHeight="35.0" prefWidth="233.0" promptText="Full Name" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
33+
<font>
34+
<Font name="Arial" size="17.0" />
35+
</font>
36+
</TextField>
37+
<TextField fx:id="regEmail" layoutX="49.0" layoutY="226.0" prefHeight="34.0" prefWidth="233.0" promptText="Email" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
38+
<font>
39+
<Font name="Arial" size="17.0" />
40+
</font>
41+
</TextField>
42+
<Label layoutX="118.0" layoutY="33.0" text="Sign Up" textFill="#c9c7c7">
43+
<font>
44+
<Font size="28.0" />
45+
</font>
46+
</Label>
47+
<Button layoutX="59.0" layoutY="377.0" mnemonicParsing="false" onAction="#registration" prefHeight="35.0" prefWidth="208.0" style="-fx-background-radius: 90; -fx-background-color: #718792;" styleClass="btnLogin" stylesheets="@Css/style.css" text="Create Account" textFill="#004c40">
48+
<font>
49+
<Font name="Beirut Regular" size="18.0" />
50+
</font>
51+
</Button>
52+
<Label layoutX="68.0" layoutY="489.0" text="Already Have an Account?" textFill="#dad7d7">
53+
<font>
54+
<Font size="19.0" />
55+
</font>
56+
</Label>
57+
<Button fx:id="getStarted" layoutX="108.0" layoutY="517.0" mnemonicParsing="false" onAction="#handleButtonAction" prefHeight="27.0" prefWidth="126.0" style="-fx-background-color: #718792; -fx-background-radius: 90;" styleClass="btnLogin" stylesheets="@Css/style.css" text="Log In Here" textFill="#004c40">
58+
<font>
59+
<Font size="14.0" />
60+
</font>
61+
</Button>
62+
<Label fx:id="controlRegLabel" layoutX="44.0" layoutY="349.0" opacity="0.0" text="Please, Enter all the necessary Info" textFill="#f44336">
63+
<font>
64+
<Font name="Arial" size="16.0" />
65+
</font>
66+
</Label>
67+
<Label fx:id="success" layoutX="75.0" layoutY="426.0" opacity="0.0" text="Registration Successful" textFill="#6abf69">
68+
<font>
69+
<Font size="18.0" />
70+
</font>
71+
</Label>
72+
<Label fx:id="goBack" layoutX="77.0" layoutY="452.0" opacity="0.0" text="Please, go back and login!" textFill="#6abf69">
73+
<font>
74+
<Font size="16.0" />
75+
</font>
76+
</Label>
77+
<TextField fx:id="regName" layoutX="49.0" layoutY="129.0" prefHeight="35.0" prefWidth="233.0" promptText="Username" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
78+
<font>
79+
<Font name="Arial" size="17.0" />
80+
</font>
81+
</TextField>
82+
<RadioButton fx:id="male" layoutX="128.0" layoutY="320.0" mnemonicParsing="false" selected="true" text="Male" textFill="#ebe8e8">
83+
<font>
84+
<Font name="Arial" size="15.0" />
85+
</font>
86+
<toggleGroup>
87+
<ToggleGroup fx:id="Gender" />
88+
</toggleGroup>
89+
</RadioButton>
90+
<RadioButton fx:id="female" layoutX="204.0" layoutY="320.0" mnemonicParsing="false" text="Female" textFill="#ebe8e8" toggleGroup="$Gender">
91+
<font>
92+
<Font name="Arial" size="15.0" />
93+
</font>
94+
</RadioButton>
95+
<Label layoutX="53.0" layoutY="319.0" text="Gender:" textFill="#ebeaea">
96+
<font>
97+
<Font size="17.0" />
98+
</font>
99+
</Label>
100+
<Label fx:id="nameExists" layoutX="73.0" layoutY="349.0" opacity="0.0" text="Username already exists!" textFill="#f44336">
101+
<font>
102+
<Font name="Arial" size="16.0" />
103+
</font>
104+
</Label>
105+
<Label fx:id="checkEmail" layoutX="67.0" layoutY="349.0" opacity="0.0" text="E-mail is already registered!" textFill="#f44336">
106+
<font>
107+
<Font name="Arial" size="16.0" />
108+
</font>
109+
</Label>
110+
<TextField fx:id="regPhoneNo" layoutX="49.0" layoutY="272.0" prefHeight="35.0" prefWidth="233.0" promptText="Phone Number" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
111+
<font>
112+
<Font name="Arial" size="17.0" />
113+
</font>
114+
</TextField>
115+
</children>
116+
</Pane>
117+
<Pane fx:id="pnSignIn" prefHeight="200.0" prefWidth="200.0" style="-fx-background-color: #263238;">
118+
<children>
119+
<TextField fx:id="userName" layoutX="69.0" layoutY="218.0" prefHeight="34.0" prefWidth="208.0" promptText="Username" style="-fx-background-color: #455a64; -fx-focus-traversable: green;" styleClass="txtFont" stylesheets="@Css/style.css">
120+
<font>
121+
<Font name="Arial" size="17.0" />
122+
</font>
123+
</TextField>
124+
<PasswordField fx:id="passWord" layoutX="68.0" layoutY="268.0" prefHeight="35.0" prefWidth="208.0" promptText="Password" style="-fx-background-color: #455a64;" styleClass="txtFont" stylesheets="@Css/style.css">
125+
<font>
126+
<Font name="Arial" size="17.0" />
127+
</font>
128+
</PasswordField>
129+
<Button layoutX="69.0" layoutY="341.0" mnemonicParsing="false" onAction="#login" prefHeight="38.0" prefWidth="208.0" style="-fx-background-radius: 90; -fx-background-color: #718792;" styleClass="btnLogin" stylesheets="@Css/style.css" text="Log In" textFill="#004c40">
130+
<font>
131+
<Font name="Beirut Regular" size="18.0" />
132+
</font>
133+
</Button>
134+
<Label layoutX="78.0" layoutY="455.0" text="Don't Have an Account?" textFill="#d7d7d7">
135+
<font>
136+
<Font size="19.0" />
137+
</font>
138+
</Label>
139+
<Button fx:id="btnSignUp" layoutX="113.0" layoutY="490.0" mnemonicParsing="false" onAction="#handleButtonAction" prefHeight="28.0" prefWidth="112.0" style="-fx-background-color: #718792; -fx-background-radius: 90;" styleClass="btnLogin" stylesheets="@Css/style.css" text="Sign Up Here" textFill="#004c40">
140+
<font>
141+
<Font size="14.0" />
142+
</font>
143+
</Button>
144+
<ImageView fitHeight="98.0" fitWidth="112.0" layoutX="106.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true">
145+
<image>
146+
<Image url="@icons/icons8-chat.png" />
147+
</image>
148+
</ImageView>
149+
<ImageView fitHeight="38.0" fitWidth="38.0" layoutX="22.0" layoutY="216.0" pickOnBounds="true" preserveRatio="true">
150+
<image>
151+
<Image url="@icons/user.png" />
152+
</image>
153+
</ImageView>
154+
<ImageView fitHeight="35.0" fitWidth="38.0" layoutX="24.0" layoutY="267.0" pickOnBounds="true" preserveRatio="true">
155+
<image>
156+
<Image url="@icons/secure.png" />
157+
</image></ImageView>
158+
<Label layoutX="127.0" layoutY="152.0" text="Log In" textFill="#d7d7d7">
159+
<font>
160+
<Font size="28.0" />
161+
</font>
162+
</Label>
163+
<Label fx:id="loginNotifier" layoutX="70.0" layoutY="314.0" opacity="0.0" text="Username or password is incorrect" textFill="#ff5353">
164+
<font>
165+
<Font name="Arial" size="13.0" />
166+
</font>
167+
</Label>
168+
</children>
169+
</Pane>
170+
</children>
171+
</StackPane>
172+
</children>
173+
</AnchorPane>

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /