java.lang.Object
org.tentackle.fx.AbstractFxController
org.tentackle.fx.rdc.login.Login
- All Implemented Interfaces:
FxController,org.tentackle.validate.ScopeConfigurator
Login controller.
- Author:
- harald
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidLogs in automatically.voidprotected booleandetermineLoginPaneVisibility(double progress) Determines whether the login pane should be visible according to the progress.protected booleandetermineProgressBarVisibility(double progress) Determines whether the progress bar should be visible according to the progress.intGets the inactivity timeout.org.tentackle.session.SessionInfoGets the session info.voidpresetUserAndPassword(org.tentackle.session.BackendConfiguration backendConfiguration) Presets the user- and password field from the backend configuration.voidSets the initial focus.voidsetInactivityTimeout(int inactivityTimeout) Sets the inactivity timeout.
If there is no keyboard input the application will terminate.voidsetMessage(String message) Sets the message field.voidsetPassword(char[] password) Sets the password in the password field.voidsetProgress(double progress) Sets the progress.voidsetSessionInfo(org.tentackle.session.SessionInfo sessionInfo) Sets the session info.voidsetUsername(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
-
Constructor Details
-
Login
public Login()
-
-
Method Details
-
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
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:
configurein interfaceFxController- Overrides:
configurein classAbstractFxController
-
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
-
autoLogin
public void autoLogin()Logs in automatically. -
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
Sets the message field.- Parameters:
message- the message
-