Over the years I developed a bunch of programs for people who requested software from me. However, during the development of these projects a series of interesting components and libraries evolved as part of these projects. In order to modularize and reuse parts of these projects I split them into a collection of packages that I distribute via Maven Central.
CheckedElements ⎘
Motivation
JavaFX is a great way for creating GUIs with Java. However there's no built in way of checking the validity of controls (e.g. text fields in forms) as well as visually showing the validity status and eventually the causes why the inserted data is invalid.
Features
- Semantic validation constraints
- Extendable mechanism for more validation constraints
- Toggle mechanism for validation checks (Enable/disable validation)
- Classification of validation violations (warning, error, etc.)
- User friendly popup bubbles that show messages clarifying the causes for invalid input
- Predefined component (dialog) for listing all validation violations of any currently shown control
- Style control via CSS and pseudo classes
- Compatibility with FXML
Generic Wizard ⎘
Motivation
JavaFX is a great way for creating GUIs with Java. Nevertheless, it still lacks predefined ways for creating a wizard like user interaction. Furthermore all the user examples and tutorials I found on forums and other websites describe solutions which are bound to their specific application and how the content of the wizard is connected in their special case. I could not find any solution that is flexible and yet powerful enough to provide an easy to use infrastructure for creating wizards.
Features
- Abstraction from the actual content of the wizard
- History of visited wizard pages
- Branching sequences of wizard pages
- Constraints on the validity of the input of wizard pages
- Dynamic creation of additional wizard pages based on the currently entered user input
- Static type safety over the results of any wizard page
- Embeddable into other surfaces of the application
- Standalone mechanism for any wizard page
- CSS styling support
Explanation required for usage
A wizard is a collection of wizard pages with the following properties.
- Unique name
- Wizard pages reference each other by their unique name.
- Finish flag
- Marks whether a page is a final page that potentially enables the
finish
button. - nextFunction
-
Calculates the name of page to show when clicking on the
next
button.INFO! During the calculation of the name the function may dynamically create a new wizard page, attach it to the wizard and return its name. - resultFunction
- Generates any desired Java object that stores whatever data the page represents. This might be user input, a selection in a list, checkboxes, any kind of user interface you designed.
- validProperty
-
Determines whether the current page should enable the
next
button and in case it is a final page thefinish
button as well. The result may depend on the current input, the state of a certain checkbox , etc.
ScreenSwitcher ⎘
Motivation
JavaFX is a great way for creating GUIs with Java.
The creation of multiple surfaces that are connected and navigable is a standard task required by most applications.
However, there is no generalized and easy framework for switching between surfaces which are called screens
in this library.
Features
- Predefined internal architecture for organizing screens
- Linear navigable history of screens
- Easy integration of custom FXML and resource bundles
- Screens can optionally have
results
e.g. achoose-file-screen
- Dynamic creation of screens
- Enabling/Disabling message overlay over all screens for blocking input
- CSS styling support
.screen {
-fx-background-color: white;
}
Explanation required for usage
Only two classes are of main interest:
- ScreenManager
- Each application requires one instance that organizes switching between screens
- Screen
- Each screen has to implement this abstract base class to be used by a
ScreenManager