Skip to content

Commit f0d9aa3

Browse files
final update with default profile pic
1 parent 74b68db commit f0d9aa3

12 files changed

+99
-14
lines changed

.idea/artifacts/StickyNotes2.xml

+20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

account.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
nishtha1997 nishtha
1+
ashishhattimare viewsonic

jarfiles/gson-2.3.1.jar

206 KB
Binary file not shown.

jarfiles/json-simple-1.1.jar

15.7 KB
Binary file not shown.

src/images/backBlack.png

226 Bytes
Loading

src/images/myself.jpg

-10.2 KB
Loading

src/sample/Firebase/FirebaseConfig.java

+5-3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public static void addUserDetails(UserDetail object)
4242
public static boolean userExistLogin(String username, String password)
4343
{
4444
String path = Constants.FIREBASE_LINK + "/UserDetail/.json";
45+
46+
System.out.println("user exists login validation");
4547
try {
4648
URL url = new URL(path);
4749
BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
@@ -134,9 +136,9 @@ public void onCancelled(FirebaseError firebaseError) { }
134136
return;
135137
}
136138

137-
public static void AddUser() {
138-
if(firebase != null)
139-
addUserToFirebase(Constants.userDetail);
139+
public static void AddUser()
140+
{
141+
if(firebase != null) addUserToFirebase(Constants.userDetail);
140142
else
141143
System.out.println("Not Connected");
142144
}

src/sample/LogInController.java

+25-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55
import javafx.fxml.FXML;
66
import javafx.fxml.Initializable;
77
import javafx.scene.control.Label;
8+
import javafx.scene.image.ImageView;
89
import javafx.scene.layout.AnchorPane;
10+
import javafx.scene.layout.BorderPane;
911
import javafx.stage.Stage;
1012
import sample.Firebase.FirebaseConfig;
1113

@@ -18,30 +20,44 @@ public class LogInController implements Initializable {
1820
@FXML private JFXTextField login_username, login_password;
1921
@FXML private JFXTextField signup_email, signup_confirm;
2022
@FXML private AnchorPane loginPage, signupPage;
23+
@FXML private ImageView closeButton;
2124
@FXML private Label signup;
25+
@FXML BorderPane backButton;
2226

2327
@Override
2428
public void initialize(URL location, ResourceBundle resources) {
2529

2630
signup.setOnMouseEntered(event -> signup.setStyle("-fx-text-fill: #000"));
2731
signup.setOnMouseExited(event -> signup.setStyle("-fx-text-fill: #08f"));
2832
signup.setOnMouseClicked(event -> {
29-
30-
loginPage.setDisable(true); loginPage.setOpacity(0);
31-
signupPage.setDisable(false); signupPage.setOpacity(1);
32-
3333
signup.setStyle("-fx-text-fill: #08f");
34+
resetFields(false, 0);
35+
});
36+
37+
closeButton.setOnMouseClicked(event -> {
38+
Stage stage = (Stage) loginPage.getScene().getWindow();
39+
stage.close();
40+
});
3441

35-
signup_username.setStyle("-fx-border-color: #ddd"); signup_password.setStyle("-fx-border-color: #ddd");
36-
login_username.setStyle("-fx-border-color: #ddd"); login_password.setStyle("-fx-border-color: #ddd");
37-
signup_confirm.setStyle("-fx-border-color: #ddd"); signup_email.setStyle("-fx-border-color: #ddd");
42+
backButton.setOnMouseClicked(event -> {
43+
resetFields(true, 1);
3844
});
3945
}
4046

47+
private void resetFields(boolean disable, int opacity)
48+
{
49+
signup_username.setStyle("-fx-border-color: #ddd"); signup_password.setStyle("-fx-border-color: #ddd");
50+
login_username.setStyle("-fx-border-color: #ddd"); login_password.setStyle("-fx-border-color: #ddd");
51+
signup_confirm.setStyle("-fx-border-color: #ddd"); signup_email.setStyle("-fx-border-color: #ddd");
52+
53+
signupPage.setDisable(disable); signupPage.setOpacity(opacity^1);
54+
backButton.setDisable(disable); backButton.setOpacity(opacity^1);
55+
loginPage.setDisable(!disable); loginPage.setOpacity(opacity);
56+
}
57+
4158
@FXML void loginAction(ActionEvent event) {
4259

43-
String user = login_username.getText();
44-
String pass = login_password.getText();
60+
String user = login_username.getText(), pass = login_password.getText();
4561

4662
if(user.isEmpty()) login_username.setStyle("-fx-border-color: #f00");
4763
if(pass.isEmpty()) login_password.setStyle("-fx-border-color: #f00");

src/sample/Main.java

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import javafx.stage.Screen;
1010
import javafx.stage.Stage;
1111
import javafx.stage.StageStyle;
12+
1213
import sample.Firebase.FirebaseConfig;
1314

1415
public class Main extends Application {

src/sample/views/login.fxml

+15
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<?import javafx.scene.image.Image?>
88
<?import javafx.scene.image.ImageView?>
99
<?import javafx.scene.layout.AnchorPane?>
10+
<?import javafx.scene.layout.BorderPane?>
1011
<?import javafx.scene.text.Font?>
1112

1213
<AnchorPane prefHeight="410.0" prefWidth="263.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LogInController">
@@ -18,6 +19,20 @@
1819
<Image url="@../../images/logo.png" />
1920
</image>
2021
</ImageView>
22+
<ImageView fx:id="closeButton" fitHeight="30.0" fitWidth="30.0" layoutX="234.0" layoutY="-1.0" pickOnBounds="true" preserveRatio="true">
23+
<image>
24+
<Image url="@../../images/closeBlack.png" />
25+
</image>
26+
</ImageView>
27+
<BorderPane fx:id="backButton" disable="true" layoutX="-1.0" layoutY="-1.0" opacity="0.0" prefHeight="30.0" prefWidth="30.0">
28+
<center>
29+
<ImageView fitHeight="25.0" fitWidth="25.0" pickOnBounds="true" preserveRatio="true" BorderPane.alignment="CENTER">
30+
<image>
31+
<Image url="@../../images/backBlack.png" />
32+
</image>
33+
</ImageView>
34+
</center>
35+
</BorderPane>
2136
</children>
2237
</AnchorPane>
2338
<AnchorPane fx:id="loginPage" layoutY="128.0" prefHeight="282.0" prefWidth="263.0" style="-fx-background-color: #fff;">

src/sample/views/note.fxml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<?import javafx.scene.layout.VBox?>
1313
<?import javafx.scene.text.Font?>
1414

15-
<BorderPane fx:id="notePane" prefWidth="455.0" xmlns="http://javafx.com/javafx/11.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.NoteController">
15+
<BorderPane fx:id="notePane" prefWidth="455.0" xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" fx:controller="sample.NoteController">
1616
<center>
1717
<BorderPane prefWidth="400.0" BorderPane.alignment="CENTER">
1818
<center>

src/sample/views/notex.fxml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<?import java.lang.*?>
4+
<?import java.util.*?>
5+
<?import javafx.scene.*?>
6+
<?import javafx.scene.control.*?>
7+
<?import javafx.scene.layout.*?>
8+
9+
<?import javafx.geometry.Insets?>
10+
<?import javafx.scene.text.Font?>
11+
<?import com.jfoenix.controls.JFXTextArea?>
12+
<?import com.jfoenix.controls.JFXListView?>
13+
<BorderPane xmlns="http://javafx.com/javafx" xmlns:fx="http://javafx.com/fxml" prefHeight="400.0" prefWidth="600.0">
14+
<center>
15+
<BorderPane prefWidth="400.0" BorderPane.alignment="CENTER">
16+
<center>
17+
<!-- <JFXTextArea fx:id="noteArea" focusColor="#405aa800" promptText="Take a Note" style="-fx-background-color: #595959; -fx-background-radius: 0; -fx-text-fill: #fff;" unFocusColor="#4d4d4d00" wrapText="true" BorderPane.alignment="TOP_LEFT">-->
18+
<!-- -->
19+
<!-- </JFXTextArea>-->
20+
</center>
21+
<!-- <bottom>-->
22+
<!-- <VBox fx:id="scrollBox" alignment="BOTTOM_CENTER" prefHeight="0.0" prefWidth="455.0" style="-fx-background-color: #595959;" BorderPane.alignment="BOTTOM_CENTER">-->
23+
<!-- <children>-->
24+
<!-- <Pane prefHeight="0.0" prefWidth="0.0" style="-fx-background-color: #ff3300;" />-->
25+
<!-- <JFXListView fx:id="imageView" orientation="HORIZONTAL" prefHeight="0.0" prefWidth="455.0" VBox.vgrow="NEVER" />-->
26+
<!-- </children>-->
27+
<!-- </VBox>-->
28+
<!-- </bottom>-->
29+
</BorderPane>
30+
</center>
31+
</BorderPane>

0 commit comments

Comments
 (0)