Package Roots
Class SignUpRoot
- java.lang.Object
-
- Roots.SceneRoot
-
- Roots.SignUpRoot
-
final class SignUpRoot extends SceneRoot
Class for the SignUpRoot
-
-
Field Summary
Fields Modifier and Type Field Description private javafx.scene.control.PasswordField
CONFIRM_PASSWORD_FIELD
private javafx.scene.control.Label
CONFIRM_PASSWORD_LABEL
private javafx.scene.control.ProgressIndicator
LOADING_ANIMATION
private javafx.scene.control.Button
LOG_IN_BUTTON
private javafx.scene.control.PasswordField
PASSWORD_FIELD
private javafx.scene.control.Label
PASSWORD_LABEL
private javafx.scene.control.ProgressBar
PASSWORD_STRENGTH_BAR
private javafx.scene.control.Button
SIGN_UP_BUTTON
private javafx.scene.control.Label
SIGN_UP_FEEDBACK_LABEL
private javafx.scene.control.TextField
USERNAME_FIELD
private javafx.scene.control.Label
USERNAME_LABEL
-
Constructor Summary
Constructors Constructor Description SignUpRoot()
Creates an object of the class SignUpRoot
-
Method Summary
Modifier and Type Method Description private boolean
feedback()
Gives feedback on password and username and different error messages.private void
passwordStrengthBarEventHandling()
A method that controls the password strength bar.(package private) void
setLayout()
Overrides SceneRoot method.private double
setPasswordStrength()
A method that returns a percent for the password strength.private void
signUp()
Registers a new user if all the terms are met Used in setLayout-
Methods inherited from class Roots.SceneRoot
getBorderPane, getGridPane, setGridPane, setPageTitle
-
-
-
-
Field Detail
-
USERNAME_LABEL
private final javafx.scene.control.Label USERNAME_LABEL
-
PASSWORD_LABEL
private final javafx.scene.control.Label PASSWORD_LABEL
-
CONFIRM_PASSWORD_LABEL
private final javafx.scene.control.Label CONFIRM_PASSWORD_LABEL
-
PASSWORD_FIELD
private final javafx.scene.control.PasswordField PASSWORD_FIELD
-
CONFIRM_PASSWORD_FIELD
private final javafx.scene.control.PasswordField CONFIRM_PASSWORD_FIELD
-
USERNAME_FIELD
private final javafx.scene.control.TextField USERNAME_FIELD
-
SIGN_UP_FEEDBACK_LABEL
private final javafx.scene.control.Label SIGN_UP_FEEDBACK_LABEL
-
SIGN_UP_BUTTON
private final javafx.scene.control.Button SIGN_UP_BUTTON
-
LOG_IN_BUTTON
private final javafx.scene.control.Button LOG_IN_BUTTON
-
PASSWORD_STRENGTH_BAR
private final javafx.scene.control.ProgressBar PASSWORD_STRENGTH_BAR
-
LOADING_ANIMATION
private final javafx.scene.control.ProgressIndicator LOADING_ANIMATION
-
-
Method Detail
-
setLayout
void setLayout()
Overrides SceneRoot method. Assigns layout components to RootBuilders GridPane Sets styling to layout components Sets functionality to button nodes Used in the constructor
-
signUp
private void signUp()
Registers a new user if all the terms are met Used in setLayout
-
setPasswordStrength
private double setPasswordStrength()
A method that returns a percent for the password strength. Password strength is defined by length, and if it contains a capital letter and digit. Used in passwordStrengthBarEventHandling- Returns:
- double that contains the percent of how strong the written password is
-
passwordStrengthBarEventHandling
private void passwordStrengthBarEventHandling()
A method that controls the password strength bar. Uses CSS for changing color of the bar. Changes from red to yellow to green, which define the strength. Used in setLayout
-
feedback
private boolean feedback()
Gives feedback on password and username and different error messages. Password requirements: 8 characters or more, only digits and letters Username requirements: Only digits and letters Used in signUp- Returns:
- a boolean value, true for no errors, boolean for error
-
-