Module is.codion.swing.common.ui
Package is.codion.swing.common.ui.dialog
Interface LoginDialogBuilder
- All Superinterfaces:
DialogBuilder<LoginDialogBuilder>
A login dialog builder.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceValidates a login attempt. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PropertyValue<Integer> Specifies the default input field columns for the username and password fields.static final PropertyValue<Boolean> Specifies whether login dialogs are resizable by default. -
Method Summary
Modifier and TypeMethodDescriptiondefaultUser(@Nullable User defaultUser) inputFieldColumns(int inputFieldColumns) Note that this only affects the minimum field size, the actual field sizes may be larger than the specified columns value dictates due to other login panel size constraints.resizable(boolean resizable) When resizable, the dialog can not be made smaller than its packed size.show()southComponent(@Nullable JComponent southComponent) validator(LoginDialogBuilder.LoginValidator validator) Methods inherited from interface is.codion.swing.common.ui.dialog.DialogBuilder
icon, keyEvent, location, locationRelativeTo, onBuild, owner, owner, title, title
-
Field Details
-
INPUT_FIELD_COLUMNS
Specifies the default input field columns for the username and password fields.
Note that this only affects the minimum field size, the actual field sizes may be larger than the specified columns value dictates due to other login panel size constraints.
- Value type: Integer
- Default value: 8
- See Also:
-
RESIZABLE
Specifies whether login dialogs are resizable by default.
When resizable, the dialog can not be made smaller than its packed size.
- Value type: Boolean
- Default value: true
- See Also:
-
-
Method Details
-
defaultUser
- Parameters:
defaultUser- the default user credentials to display- Returns:
- this builder instance
-
validator
- Parameters:
validator- the login validator to use- Returns:
- this builder instance
-
southComponent
- Parameters:
southComponent- a component to add to the south of the credentials input fields- Returns:
- this builder instance
-
inputFieldColumns
Note that this only affects the minimum field size, the actual field sizes may be larger than the specified columns value dictates due to other login panel size constraints.
- Parameters:
inputFieldColumns- the number of columns to display in the input fields (username/password)- Returns:
- this builder instance
- See Also:
-
resizable
When resizable, the dialog can not be made smaller than its packed size.- Parameters:
resizable- specifies whether the login dialog is resizable- Returns:
- this builder instance
- See Also:
-
show
User show()- Returns:
- the logged-in user
- Throws:
CancelException- in case the login is cancelled
-