ADD::added stylesheet for login window
added style to the buttons, the same as in the register window changed the font of the title changed the font and color of the 'forgot password' link ADD::added display of name on dashboard added initialize method to set the 'welcome back' text to include the username of the user
This commit is contained in:
@@ -43,6 +43,8 @@ public class Application extends javafx.application.Application {
|
|||||||
Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/sample.fxml"));
|
Parent rootNode = load(this.getClass().getClassLoader().getResource("fxml/sample.fxml"));
|
||||||
primaryStage.setTitle("Greenify");
|
primaryStage.setTitle("Greenify");
|
||||||
Scene scene = new Scene(rootNode);
|
Scene scene = new Scene(rootNode);
|
||||||
|
scene.getStylesheets()
|
||||||
|
.add(getClass().getClassLoader().getResource("stylesheets/LoginWindowStyle.css").toExternalForm());
|
||||||
primaryStage.setScene(scene);
|
primaryStage.setScene(scene);
|
||||||
primaryStage.show();
|
primaryStage.show();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,14 @@ public class DashBoardController {
|
|||||||
@FXML
|
@FXML
|
||||||
private Label totalVeganMealCounter;
|
private Label totalVeganMealCounter;
|
||||||
|
|
||||||
|
@FXML
|
||||||
|
private Label welcomebacktext;
|
||||||
|
|
||||||
|
public void initialize() {
|
||||||
|
welcomebacktext.setText("Welcome back " + userService.currentUser.getName() + "!");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* displays the dashboard pane.
|
* displays the dashboard pane.
|
||||||
* @param event the event (clicking the button)
|
* @param event the event (clicking the button)
|
||||||
@@ -39,6 +47,7 @@ public class DashBoardController {
|
|||||||
dashboardPane.setVisible(true);
|
dashboardPane.setVisible(true);
|
||||||
userPane.setVisible(false);
|
userPane.setVisible(false);
|
||||||
activitiesPane.setVisible(false);
|
activitiesPane.setVisible(false);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.control.*?>
|
||||||
|
<?import javafx.scene.image.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
|
<?import javafx.scene.shape.*?>
|
||||||
|
<?import javafx.scene.text.*?>
|
||||||
<?import javafx.scene.control.Button?>
|
<?import javafx.scene.control.Button?>
|
||||||
<?import javafx.scene.control.Label?>
|
<?import javafx.scene.control.Label?>
|
||||||
<?import javafx.scene.image.Image?>
|
<?import javafx.scene.image.Image?>
|
||||||
@@ -12,7 +18,7 @@
|
|||||||
<?import javafx.scene.text.Font?>
|
<?import javafx.scene.text.Font?>
|
||||||
<?import javafx.scene.text.Text?>
|
<?import javafx.scene.text.Text?>
|
||||||
|
|
||||||
<AnchorPane prefHeight="602.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="greenify.client.controller.DashBoardController">
|
<AnchorPane prefHeight="602.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="greenify.client.controller.DashBoardController">
|
||||||
<children>
|
<children>
|
||||||
<AnchorPane fx:id="menuBar" prefHeight="603.0" prefWidth="216.0" style="-fx-background-color: #5a635c;">
|
<AnchorPane fx:id="menuBar" prefHeight="603.0" prefWidth="216.0" style="-fx-background-color: #5a635c;">
|
||||||
<children>
|
<children>
|
||||||
@@ -82,7 +88,7 @@
|
|||||||
</Pane>
|
</Pane>
|
||||||
<Pane layoutX="310.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
|
<Pane layoutX="310.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
|
||||||
<children>
|
<children>
|
||||||
<Text layoutX="48.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Count" textAlignment="CENTER">
|
<Text layoutX="21.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Done today" textAlignment="CENTER">
|
||||||
<font>
|
<font>
|
||||||
<Font size="21.0" />
|
<Font size="21.0" />
|
||||||
</font>
|
</font>
|
||||||
@@ -121,7 +127,7 @@
|
|||||||
</Pane>
|
</Pane>
|
||||||
<Pane layoutX="470.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
|
<Pane layoutX="470.0" layoutY="93.0" prefHeight="471.0" prefWidth="150.0" style="-fx-background-color: #f4fff4;">
|
||||||
<children>
|
<children>
|
||||||
<Text layoutX="7.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Activities done">
|
<Text layoutX="15.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Done in total">
|
||||||
<font>
|
<font>
|
||||||
<Font size="21.0" />
|
<Font size="21.0" />
|
||||||
</font>
|
</font>
|
||||||
|
|||||||
@@ -1,10 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
|
||||||
|
<?import java.lang.*?>
|
||||||
|
<?import javafx.scene.image.*?>
|
||||||
|
<?import javafx.scene.layout.*?>
|
||||||
<?import javafx.scene.control.*?>
|
<?import javafx.scene.control.*?>
|
||||||
<?import javafx.scene.image.Image?>
|
<?import javafx.scene.image.Image?>
|
||||||
<?import javafx.scene.image.ImageView?>
|
<?import javafx.scene.image.ImageView?>
|
||||||
<?import javafx.scene.layout.AnchorPane?>
|
<?import javafx.scene.layout.AnchorPane?>
|
||||||
<?import javafx.scene.text.*?>
|
<?import javafx.scene.text.*?>
|
||||||
|
|
||||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="602.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="greenify.client.controller.UserController">
|
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="602.0" prefWidth="934.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="greenify.client.controller.UserController">
|
||||||
<children>
|
<children>
|
||||||
<ImageView fitHeight="600.0" fitWidth="943.0" layoutX="-1.0" pickOnBounds="true">
|
<ImageView fitHeight="600.0" fitWidth="943.0" layoutX="-1.0" pickOnBounds="true">
|
||||||
@@ -13,15 +17,15 @@
|
|||||||
</image></ImageView>
|
</image></ImageView>
|
||||||
<Text fill="#23773d" layoutX="283.0" layoutY="100.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Go Green" textAlignment="CENTER" wrappingWidth="374.936767578125">
|
<Text fill="#23773d" layoutX="283.0" layoutY="100.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Go Green" textAlignment="CENTER" wrappingWidth="374.936767578125">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Californian FB" size="72.0" />
|
<Font name="Corbel" size="72.0" />
|
||||||
</font>
|
</font>
|
||||||
</Text>
|
</Text>
|
||||||
<Button fx:id="loginButton" layoutX="419.0" layoutY="274.0" mnemonicParsing="false" onAction="#handleLoginButtonAction" prefHeight="26.0" prefWidth="96.0" text="Login" textAlignment="CENTER" />
|
<Button fx:id="loginButton" layoutX="419.0" layoutY="274.0" mnemonicParsing="false" onAction="#handleLoginButtonAction" prefHeight="26.0" prefWidth="96.0" text="Login" textAlignment="CENTER" />
|
||||||
<Button fx:id="signupButton" layoutX="42.0" layoutY="52.0" mnemonicParsing="false" onAction="#handleRegisterButtonAction" prefHeight="10.0" prefWidth="96.0" text="Sign up!" />
|
<Button fx:id="signupButton" layoutX="42.0" layoutY="52.0" mnemonicParsing="false" onAction="#handleRegisterButtonAction" prefHeight="10.0" prefWidth="96.0" text="Sign up!" />
|
||||||
<PasswordField fx:id="passwordField" layoutX="318.0" layoutY="210.0" prefHeight="42.0" prefWidth="303.0" promptText="Password" />
|
<PasswordField fx:id="passwordField" layoutX="318.0" layoutY="210.0" prefHeight="42.0" prefWidth="303.0" promptText="Password" />
|
||||||
<Hyperlink layoutX="392.0" layoutY="308.0" prefHeight="42.0" prefWidth="173.0" text="Forgot Password?" textAlignment="CENTER" textFill="WHITE" textOverrun="LEADING_WORD_ELLIPSIS">
|
<Hyperlink alignment="CENTER" layoutX="384.0" layoutY="301.0" prefHeight="42.0" prefWidth="173.0" text="Forgot Password?" textAlignment="CENTER" textFill="#3db25a" textOverrun="LEADING_WORD_ELLIPSIS">
|
||||||
<font>
|
<font>
|
||||||
<Font name="Bodoni MT Bold" size="18.0" />
|
<Font name="Corbel Bold" size="18.0" />
|
||||||
</font>
|
</font>
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
<Text fill="#23773d" layoutX="20.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Not Member?" textAlignment="CENTER" wrappingWidth="146.13673400878906">
|
<Text fill="#23773d" layoutX="20.0" layoutY="40.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Not Member?" textAlignment="CENTER" wrappingWidth="146.13673400878906">
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
.button {
|
||||||
|
-fx-background-color: #005e07;
|
||||||
|
-fx-text-fill: #c4eec9;
|
||||||
|
-fx-font-weight: bold;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user