Package Roots

Class SignUpRoot


  • final class SignUpRoot
    extends SceneRoot
    Class for the SignUpRoot
    • 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
    • Constructor Detail

      • SignUpRoot

        SignUpRoot()
        Creates an object of the class SignUpRoot
    • 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
        Overrides:
        setLayout in class SceneRoot
      • 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