这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@leewyatt
Copy link
Collaborator

Summary

This PR introduces a new demo application, SessionManagerApp, which provides a more comprehensive showcase of how to use SessionManager with various JavaFX controls and data types.

Background

While SessionManager is already used in ScreensViewApp, its usage is currently limited to a simple binding with a single CheckBox. We also have some basic tests in SessionManagerTest, but these do not demonstrate practical usage scenarios or diverse data types.

We add this dedicated demo to:

  • Provide a real UI example that developers can run and experiment with
  • Show how to persist and restore state for multiple property types

Features Demonstrated

  • StringProperty: User name input via editable ComboBox
  • DoubleProperty: Score slider
  • BooleanProperty: Dark mode toggle with live background switching
  • LocalDate ↔ StringProperty: Birth date selection using CalendarPicker, stored and restored as a string

Purpose

This demo serves as a reference implementation for developers looking to integrate SessionManager with a JavaFX application. It highlights how to:

image

This demo application demonstrates the use of SessionManager to persist and restore user preferences, such as name, score, birth date, and dark mode settings. It includes a simple JavaFX UI with various interactive controls, ensuring the state is maintained across sessions.
Revised the session key prefixes by removing the redundant "5" to align with a consistent naming convention. This improves code readability and ensures a cleaner structure for session key management.
@leewyatt leewyatt requested a review from dlemmermann April 23, 2025 07:53
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@dlemmermann dlemmermann merged commit eeb3392 into master Apr 28, 2025
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants