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.PasswordFieldCONFIRM_PASSWORD_FIELDprivate javafx.scene.control.LabelCONFIRM_PASSWORD_LABELprivate javafx.scene.control.ProgressIndicatorLOADING_ANIMATIONprivate javafx.scene.control.ButtonLOG_IN_BUTTONprivate javafx.scene.control.PasswordFieldPASSWORD_FIELDprivate javafx.scene.control.LabelPASSWORD_LABELprivate javafx.scene.control.ProgressBarPASSWORD_STRENGTH_BARprivate javafx.scene.control.ButtonSIGN_UP_BUTTONprivate javafx.scene.control.LabelSIGN_UP_FEEDBACK_LABELprivate javafx.scene.control.TextFieldUSERNAME_FIELDprivate javafx.scene.control.LabelUSERNAME_LABEL
-
Constructor Summary
Constructors Constructor Description SignUpRoot()Creates an object of the class SignUpRoot
-
Method Summary
Modifier and Type Method Description private booleanfeedback()Gives feedback on password and username and different error messages.private voidpasswordStrengthBarEventHandling()A method that controls the password strength bar.(package private) voidsetLayout()Overrides SceneRoot method.private doublesetPasswordStrength()A method that returns a percent for the password strength.private voidsignUp()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
-
-