Package com.esprit.utils.ui
Class UIUtils
java.lang.Object
com.esprit.utils.ui.UIUtils
Utility class for modern UI styling and animations. Provides consistent
styling across the application.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Animation types enumerationstatic enum
Notification types enumeration -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final javafx.scene.paint.Color
static final javafx.scene.paint.Color
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final javafx.scene.paint.Color
static final String
static final javafx.scene.paint.Color
static final javafx.scene.paint.Color
static final javafx.scene.paint.Color
static final javafx.scene.paint.Color
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addClickAnimation
(javafx.scene.Node node) Add click animation to a nodestatic void
addHoverEffect
(javafx.scene.Node node) Add hover effect to a nodestatic void
animateIn
(javafx.scene.Node node, UIUtils.AnimationType type) Animate node entrancestatic void
animateOut
(javafx.scene.Node node, UIUtils.AnimationType type, Runnable onFinished) Animate node exitstatic void
applyDarkTheme
(javafx.scene.Scene scene) Apply modern dark themestatic void
applyLightTheme
(javafx.scene.Scene scene) Apply modern light themestatic javafx.scene.control.Button
createButton
(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon, String styleClass) Create a modern styled button with iconstatic javafx.scene.layout.VBox
Create a modern card containerstatic javafx.scene.image.ImageView
createCircularImageView
(String imagePath, double radius) Create a circular image viewstatic javafx.scene.control.Button
createDangerButton
(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a danger buttonstatic javafx.scene.layout.VBox
Create an elevated card containerstatic javafx.scene.layout.VBox
createFloatingTextField
(String labelText) Create a modern text field with floating label effectstatic javafx.scene.control.ProgressIndicator
Create a loading indicatorstatic javafx.scene.control.Alert
createModernAlert
(javafx.scene.control.Alert.AlertType type, String title, String message) Create a modern alert dialogstatic javafx.scene.image.Image
createPlaceholderImage
(double size) Create a placeholder image for avatarsstatic javafx.scene.control.Button
createPrimaryButton
(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a primary buttonstatic javafx.scene.layout.GridPane
createResponsiveGrid
(int columns) Create a responsive grid panestatic javafx.scene.control.Button
createSecondaryButton
(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a secondary buttonstatic javafx.scene.control.Button
createSuccessButton
(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a success buttonstatic boolean
showConfirmationDialog
(String title, String message) Create a modern confirmation dialogstatic void
showErrorNotification
(String message) Show an error notificationstatic void
showInfoNotification
(String message) Show an info notificationprivate static void
showNotification
(String message, UIUtils.NotificationType type) Generic notification methodstatic void
showSuccessNotification
(String message) Show a success notificationstatic void
showWarningNotification
(String message) Show a warning notification
-
Field Details
-
PRIMARY_COLOR
public static final javafx.scene.paint.Color PRIMARY_COLOR -
SECONDARY_COLOR
public static final javafx.scene.paint.Color SECONDARY_COLOR -
ACCENT_COLOR
public static final javafx.scene.paint.Color ACCENT_COLOR -
BACKGROUND_COLOR
public static final javafx.scene.paint.Color BACKGROUND_COLOR -
CARD_COLOR
public static final javafx.scene.paint.Color CARD_COLOR -
TEXT_COLOR
public static final javafx.scene.paint.Color TEXT_COLOR -
MUTED_COLOR
public static final javafx.scene.paint.Color MUTED_COLOR -
BUTTON_PRIMARY
- See Also:
-
BUTTON_SECONDARY
- See Also:
-
BUTTON_SUCCESS
- See Also:
-
BUTTON_DANGER
- See Also:
-
BUTTON_WARNING
- See Also:
-
BUTTON_INFO
- See Also:
-
CARD
- See Also:
-
CARD_ELEVATED
- See Also:
-
-
Constructor Details
-
UIUtils
public UIUtils()
-
-
Method Details
-
createButton
public static javafx.scene.control.Button createButton(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon, String styleClass) Create a modern styled button with icon -
createPrimaryButton
public static javafx.scene.control.Button createPrimaryButton(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a primary button -
createSecondaryButton
public static javafx.scene.control.Button createSecondaryButton(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a secondary button -
createSuccessButton
public static javafx.scene.control.Button createSuccessButton(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a success button -
createDangerButton
public static javafx.scene.control.Button createDangerButton(String text, org.kordamp.ikonli.fontawesome5.FontAwesomeSolid icon) Create a danger button -
createCard
public static javafx.scene.layout.VBox createCard()Create a modern card container -
createElevatedCard
public static javafx.scene.layout.VBox createElevatedCard()Create an elevated card container -
createFloatingTextField
Create a modern text field with floating label effect -
createCircularImageView
Create a circular image view -
createPlaceholderImage
public static javafx.scene.image.Image createPlaceholderImage(double size) Create a placeholder image for avatars -
addHoverEffect
public static void addHoverEffect(javafx.scene.Node node) Add hover effect to a node -
addClickAnimation
public static void addClickAnimation(javafx.scene.Node node) Add click animation to a node -
animateIn
Animate node entrance -
animateOut
public static void animateOut(javafx.scene.Node node, UIUtils.AnimationType type, Runnable onFinished) Animate node exit -
createLoadingIndicator
public static javafx.scene.control.ProgressIndicator createLoadingIndicator()Create a loading indicator -
createModernAlert
public static javafx.scene.control.Alert createModernAlert(javafx.scene.control.Alert.AlertType type, String title, String message) Create a modern alert dialog -
showConfirmationDialog
Create a modern confirmation dialog -
showSuccessNotification
Show a success notification -
showErrorNotification
Show an error notification -
showInfoNotification
Show an info notification -
showWarningNotification
Show a warning notification -
showNotification
Generic notification method -
applyDarkTheme
public static void applyDarkTheme(javafx.scene.Scene scene) Apply modern dark theme -
applyLightTheme
public static void applyLightTheme(javafx.scene.Scene scene) Apply modern light theme -
createResponsiveGrid
public static javafx.scene.layout.GridPane createResponsiveGrid(int columns) Create a responsive grid pane
-