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 1b3bc57

Browse files
Added Client_Room user Interface and Controller Class with View and Controller package.
1 parent 013b4fa commit 1b3bc57

File tree

2 files changed

+304
-0
lines changed

2 files changed

+304
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
/**
2+
* @author : Ishara Maduarnga
3+
* Project Name: Multi_Client_Chat_Application
4+
* Date : 8/9/2022
5+
* Time : 11:50 AM
6+
* Year : 2022
7+
*/
8+
9+
package Controller;
10+
11+
import javafx.event.ActionEvent;
12+
import javafx.scene.control.Button;
13+
import javafx.scene.control.Label;
14+
import javafx.scene.control.TextArea;
15+
import javafx.scene.control.TextField;
16+
import javafx.scene.image.ImageView;
17+
import javafx.scene.input.KeyEvent;
18+
import javafx.scene.input.MouseEvent;
19+
import javafx.scene.layout.Pane;
20+
import javafx.scene.shape.Circle;
21+
import javafx.scene.shape.Rectangle;
22+
23+
public class Client_Room {
24+
public Label clientName;
25+
public Button profileBtn;
26+
public Circle showProPic;
27+
public Pane profile;
28+
public Label fullName;
29+
public Label email;
30+
public Label phoneNo;
31+
public Label gender;
32+
public ImageView proImage;
33+
public TextField fileChoosePath;
34+
public TextArea msgRoom;
35+
public TextField msgField;
36+
public Pane chat;
37+
public Button a;
38+
public Button b;
39+
public Button c;
40+
public Button d;
41+
public Button e;
42+
public Button f;
43+
public Button g;
44+
public Button h;
45+
public Button i;
46+
public Button j;
47+
public Button k;
48+
public Button l;
49+
public Rectangle emojiBox;
50+
51+
public void handleProfileBtn(ActionEvent event) {
52+
}
53+
54+
public void chooseImageButton(ActionEvent event) {
55+
}
56+
57+
public void saveImage(ActionEvent event) {
58+
}
59+
60+
public void mouseClickedAnotherArea(MouseEvent mouseEvent) {
61+
}
62+
63+
public void handleSendEvent(MouseEvent mouseEvent) {
64+
}
65+
66+
public void sendMessageByKey(KeyEvent event) {
67+
}
68+
69+
public void cameraIconMouseClicked(MouseEvent mouseEvent) {
70+
}
71+
72+
public void clickEmoji1(MouseEvent mouseEvent) {
73+
}
74+
75+
public void clickEmoji2(MouseEvent mouseEvent) {
76+
}
77+
78+
public void clickEmoji3(MouseEvent mouseEvent) {
79+
}
80+
81+
public void clickEmoji4(MouseEvent mouseEvent) {
82+
}
83+
84+
public void clickEmoji5(MouseEvent mouseEvent) {
85+
}
86+
87+
public void clickEmoji6(MouseEvent mouseEvent) {
88+
}
89+
90+
public void clickEmoji7(MouseEvent mouseEvent) {
91+
}
92+
93+
public void clickEmoji8(MouseEvent mouseEvent) {
94+
}
95+
96+
public void clickEmoji9(MouseEvent mouseEvent) {
97+
}
98+
99+
public void clickEmoji10(MouseEvent mouseEvent) {
100+
}
101+
102+
public void clickEmoji11(MouseEvent mouseEvent) {
103+
}
104+
105+
public void clickEmoji12(MouseEvent mouseEvent) {
106+
107+
}
108+
}

‎Client_Side/src/View/Client_Room.fxml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
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.TextArea?>
6+
<?import javafx.scene.control.TextField?>
7+
<?import javafx.scene.image.Image?>
8+
<?import javafx.scene.image.ImageView?>
9+
<?import javafx.scene.layout.AnchorPane?>
10+
<?import javafx.scene.layout.Pane?>
11+
<?import javafx.scene.layout.StackPane?>
12+
<?import javafx.scene.shape.Circle?>
13+
<?import javafx.scene.shape.Rectangle?>
14+
<?import javafx.scene.text.Font?>
15+
16+
<AnchorPane prefHeight="560.0" prefWidth="330.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller.Client_Room">
17+
<children>
18+
<AnchorPane prefHeight="74.0" prefWidth="340.0" style="-fx-background-color: #102027;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
19+
<children>
20+
<Label fx:id="clientName" layoutX="80.0" layoutY="13.0" prefHeight="24.0" prefWidth="93.0" text="Username" textFill="#c1ffbf" wrapText="true">
21+
<font>
22+
<Font name="Arial" size="19.0" />
23+
</font>
24+
</Label>
25+
<Button fx:id="profileBtn" layoutX="257.0" layoutY="21.0" mnemonicParsing="false" onAction="#handleProfileBtn" styleClass="allButton" stylesheets="@Css/style.css" text="Profile">
26+
<font>
27+
<Font name="Arial" size="15.0" />
28+
</font>
29+
</Button>
30+
<Circle fx:id="showProPic" fill="DODGERBLUE" layoutX="35.0" layoutY="34.0" radius="30.0" stroke="BLACK" strokeType="INSIDE" />
31+
</children>
32+
</AnchorPane>
33+
<StackPane layoutX="10.0" layoutY="77.0" prefHeight="494.0" prefWidth="330.0">
34+
<children>
35+
<Pane fx:id="profile" prefHeight="448.0" prefWidth="335.0" style="-fx-background-color: #263238;">
36+
<children>
37+
<Label layoutX="9.0" layoutY="93.0" text="Full Name: " textFill="#e1dfdf">
38+
<font>
39+
<Font name="Arial" size="19.0" />
40+
</font>
41+
</Label>
42+
<Label layoutX="9.0" layoutY="133.0" text="E-mail:" textFill="#eee5e5">
43+
<font>
44+
<Font name="Arial" size="19.0" />
45+
</font>
46+
</Label>
47+
<Label layoutX="8.0" layoutY="173.0" text="Phone No:" textFill="#ebe7e7">
48+
<font>
49+
<Font name="Arial" size="19.0" />
50+
</font>
51+
</Label>
52+
<Label layoutX="7.0" layoutY="205.0" prefHeight="34.0" prefWidth="74.0" text="Gender:" textFill="#e4e4e4">
53+
<font>
54+
<Font name="Arial" size="19.0" />
55+
</font>
56+
</Label>
57+
<Label fx:id="fullName" layoutX="129.0" layoutY="93.0" opacity="0.0" textFill="#f2f2f2" wrapText="true">
58+
<font>
59+
<Font size="19.0" />
60+
</font>
61+
</Label>
62+
<Label fx:id="email" layoutX="129.0" layoutY="133.0" opacity="0.0" textFill="#f2f2f2">
63+
<font>
64+
<Font size="15.0" />
65+
</font>
66+
</Label>
67+
<Label fx:id="phoneNo" layoutX="129.0" layoutY="174.0" textFill="#f2f2f2">
68+
<font>
69+
<Font size="15.0" />
70+
</font>
71+
</Label>
72+
<Label fx:id="gender" layoutX="129.0" layoutY="212.0" textFill="#f2f2f2">
73+
<font>
74+
<Font size="15.0" />
75+
</font>
76+
</Label>
77+
<ImageView fx:id="proImage" fitHeight="84.0" fitWidth="83.0" layoutX="227.0" layoutY="9.0" pickOnBounds="true" preserveRatio="true">
78+
<image>
79+
<Image url="@icons/user.png" />
80+
</image>
81+
</ImageView>
82+
<Label layoutX="7.0" layoutY="250.0" text="Change Profile Picture:" textFill="#f8f5f5">
83+
<font>
84+
<Font size="19.0" />
85+
</font>
86+
</Label>
87+
<TextField fx:id="fileChoosePath" editable="false" layoutX="9.0" layoutY="285.0" prefHeight="27.0" prefWidth="210.0" promptText="Choose Image..." style="-fx-background-color: #455a64;" styleClass="textField" stylesheets="@Css/style.css">
88+
<font>
89+
<Font size="15.0" />
90+
</font>
91+
</TextField>
92+
<Button layoutX="232.0" layoutY="285.0" mnemonicParsing="false" onAction="#chooseImageButton" prefHeight="26.0" prefWidth="77.0" styleClass="allButton" stylesheets="@Css/style.css" text="Choose">
93+
<font>
94+
<Font name="Arial" size="14.0" />
95+
</font>
96+
</Button>
97+
<Button layoutX="118.0" layoutY="397.0" mnemonicParsing="false" onAction="#saveImage" prefHeight="38.0" prefWidth="107.0" styleClass="allButton" stylesheets="@Css/style.css" text="Save">
98+
<font>
99+
<Font name="Arial" size="19.0" />
100+
</font>
101+
</Button>
102+
</children>
103+
</Pane>
104+
<Pane fx:id="chat" prefHeight="200.0" prefWidth="330.0" style="-fx-background-color: #263238;">
105+
<children>
106+
<TextArea fx:id="msgRoom" editable="false" layoutX="-12.0" layoutY="-4.0" onMouseClicked="#mouseClickedAnotherArea" prefHeight="461.0" prefWidth="344.0" style="-fx-background-color: #263238;" styleClass="text-area" stylesheets="@Css/style.css" wrapText="true">
107+
<font>
108+
<Font name="Arial" size="16.0" />
109+
</font>
110+
</TextArea>
111+
<AnchorPane layoutX="-11.0" layoutY="434.0" prefHeight="60.0" prefWidth="340.0" style="-fx-background-color: #263238;">
112+
<children>
113+
<ImageView fitHeight="42.0" fitWidth="73.0" layoutX="280.0" layoutY="-5.0" onMouseClicked="#handleSendEvent" pickOnBounds="true" preserveRatio="true">
114+
<image>
115+
<Image url="@icons/icons8-sent.png" />
116+
</image>
117+
</ImageView>
118+
<TextField fx:id="msgField" layoutX="15.0" layoutY="-2.0" onKeyPressed="#sendMessageByKey" prefHeight="38.0" prefWidth="261.0" promptText="Write messages here...." styleClass="msgBox" stylesheets="@Css/style.css">
119+
<font>
120+
<Font name="Arial" size="19.0" />
121+
</font>
122+
</TextField>
123+
<ImageView fitHeight="34.0" fitWidth="34.0" layoutX="223.0" layoutY="2.0" onMouseClicked="#cameraIconMouseClicked" pickOnBounds="true" preserveRatio="true">
124+
<image>
125+
<Image url="@icons/icons8-camera-60.png" />
126+
</image>
127+
</ImageView>
128+
</children>
129+
</AnchorPane>
130+
<Rectangle id="Css\style.css" fx:id="emojiBox" arcHeight="5.0" arcWidth="5.0" fill="WHITE" height="143.0" layoutX="50.0" layoutY="287.0" stroke="BLACK" strokeType="INSIDE" styleClass="Css\style.css" visible="false" width="210.0" />
131+
<Button fx:id="a" layoutX="58.0" layoutY="293.0" mnemonicParsing="false" onMouseClicked="#clickEmoji1" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👋" visible="false">
132+
<font>
133+
<Font size="18.0" />
134+
</font>
135+
</Button>
136+
<Button fx:id="b" layoutX="109.0" layoutY="293.0" mnemonicParsing="false" onMouseClicked="#clickEmoji2" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👊" visible="false">
137+
<font>
138+
<Font size="18.0" />
139+
</font>
140+
</Button>
141+
<Button fx:id="c" layoutX="162.0" layoutY="293.0" mnemonicParsing="false" onMouseClicked="#clickEmoji3" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="🙏" visible="false">
142+
<font>
143+
<Font size="18.0" />
144+
</font>
145+
</Button>
146+
<Button fx:id="d" layoutX="211.0" layoutY="293.0" mnemonicParsing="false" onMouseClicked="#clickEmoji4" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="😁" visible="false">
147+
<font>
148+
<Font size="18.0" />
149+
</font>
150+
</Button>
151+
<Button fx:id="e" layoutX="57.0" layoutY="339.0" mnemonicParsing="false" onMouseClicked="#clickEmoji5" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="😍" visible="false">
152+
<font>
153+
<Font size="18.0" />
154+
</font>
155+
</Button>
156+
<Button fx:id="f" layoutX="108.0" layoutY="339.0" mnemonicParsing="false" onMouseClicked="#clickEmoji6" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="😎" visible="false">
157+
<font>
158+
<Font size="18.0" />
159+
</font>
160+
</Button>
161+
<Button fx:id="g" layoutX="161.0" layoutY="339.0" mnemonicParsing="false" onMouseClicked="#clickEmoji7" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="😝" visible="false">
162+
<font>
163+
<Font size="18.0" />
164+
</font>
165+
</Button>
166+
<Button fx:id="h" layoutX="210.0" layoutY="339.0" mnemonicParsing="false" onMouseClicked="#clickEmoji8" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👌" visible="false">
167+
<font>
168+
<Font size="18.0" />
169+
</font>
170+
</Button>
171+
<Button fx:id="i" layoutX="57.0" layoutY="385.0" mnemonicParsing="false" onMouseClicked="#clickEmoji9" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👀" visible="false">
172+
<font>
173+
<Font size="18.0" />
174+
</font>
175+
</Button>
176+
<Button fx:id="j" layoutX="108.0" layoutY="385.0" mnemonicParsing="false" onMouseClicked="#clickEmoji10" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👹" visible="false">
177+
<font>
178+
<Font size="18.0" />
179+
</font>
180+
</Button>
181+
<Button fx:id="k" layoutX="161.0" layoutY="385.0" mnemonicParsing="false" onMouseClicked="#clickEmoji11" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="👍" visible="false">
182+
<font>
183+
<Font size="18.0" />
184+
</font>
185+
</Button>
186+
<Button fx:id="l" layoutX="210.0" layoutY="385.0" mnemonicParsing="false" onMouseClicked="#clickEmoji12" prefHeight="34.0" prefWidth="42.0" style="-fx-background-color: #fdcb6e;" text="🤝" visible="false">
187+
<font>
188+
<Font size="18.0" />
189+
</font>
190+
</Button>
191+
</children>
192+
</Pane>
193+
</children>
194+
</StackPane>
195+
</children>
196+
</AnchorPane>

0 commit comments

Comments
(0)

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