Class Login

  • All Implemented Interfaces:
    org.tentackle.fx.FxController, org.tentackle.validate.ScopeConfigurator

    @FxControllerService(binding=NO)
    public class Login
    extends org.tentackle.fx.AbstractFxController
    Login controller.
    Author:
    harald
    • Constructor Summary

      Constructors 
      Constructor Description
      Login()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void autoLogin()
      Logs in automatically.
      void configure()  
      protected boolean determineLoginPaneVisibility​(double progress)
      Determines whether the login pane should be visible according to the progress.
      protected boolean determineProgressBarVisibility​(double progress)
      Determines whether the progress bar should be visible according to the progress.
      int getInactivityTimeout()
      Gets the inactivity timeout.
      org.tentackle.session.SessionInfo getSessionInfo()
      Gets the session info.
      void presetUserAndPassword​(org.tentackle.session.BackendConfiguration backendConfiguration)
      Presets the user- and password field from the backend configuration.
      void requestInitialFocus()
      Sets the initial focus.
      void setInactivityTimeout​(int inactivityTimeout)
      Sets the inactivity timeout.
      If there is no keyboard input the application will terminate.
      void setMessage​(java.lang.String message)
      Sets the message field.
      void setPassword​(char[] password)
      Sets the password in the password field.
      void setProgress​(double progress)
      Sets the progress.
      void setSessionInfo​(org.tentackle.session.SessionInfo sessionInfo)
      Sets the session info.
      void setUsername​(java.lang.String username)
      Sets the username in the username field.
      • Methods inherited from class org.tentackle.fx.AbstractFxController

        createBinder, getBinder, getContainer, getDefaultScopes, getFXMLFields, getFXMLMethods, getStage, getView, setView, validateInjections
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Login

        public Login()
    • Method Detail

      • presetUserAndPassword

        public void presetUserAndPassword​(org.tentackle.session.BackendConfiguration backendConfiguration)
        Presets the user- and password field from the backend configuration.
        Parameters:
        backendConfiguration - the backend config, null if none
      • setUsername

        public void setUsername​(java.lang.String username)
        Sets the username in the username field.
        Parameters:
        username - the username
      • setPassword

        public void setPassword​(char[] password)
        Sets the password in the password field.
        Parameters:
        password - the password
      • getInactivityTimeout

        public int getInactivityTimeout()
        Gets the inactivity timeout.
        Returns:
        the timeout in seconds, 0 if disabled (default)
      • setInactivityTimeout

        public void setInactivityTimeout​(int inactivityTimeout)
        Sets the inactivity timeout.
        If there is no keyboard input the application will terminate. This feature is only available for simple login dialogs with the backend configuration disabled.
        Parameters:
        inactivityTimeout - the timeout in seconds, 0 to disable
      • configure

        public void configure()
        Specified by:
        configure in interface org.tentackle.fx.FxController
        Overrides:
        configure in class org.tentackle.fx.AbstractFxController
      • requestInitialFocus

        public void requestInitialFocus()
        Sets the initial focus.
      • setSessionInfo

        public void setSessionInfo​(org.tentackle.session.SessionInfo sessionInfo)
        Sets the session info.
        Parameters:
        sessionInfo - the session info
      • getSessionInfo

        public org.tentackle.session.SessionInfo getSessionInfo()
        Gets the session info.
        Returns:
        the session info
      • setProgress

        public void setProgress​(double progress)
        Sets the progress.
        Parameters:
        progress - ≤ 0 login not begun yet, ≥ 1 for completed
      • determineLoginPaneVisibility

        protected boolean determineLoginPaneVisibility​(double progress)
        Determines whether the login pane should be visible according to the progress.
        Parameters:
        progress - ≤ 0 login not begun yet, ≥ 1 for completed
        Returns:
        true if login pane should be visible
      • determineProgressBarVisibility

        protected boolean determineProgressBarVisibility​(double progress)
        Determines whether the progress bar should be visible according to the progress.
        Parameters:
        progress - ≤ 0 login not begun yet, ≥ 1 for completed
        Returns:
        true if progress bar should be visible
      • setMessage

        public void setMessage​(java.lang.String message)
        Sets the message field.
        Parameters:
        message - the message