{"id":13777855,"url":"https://github.com/dlsc-software-consulting-gmbh/PreferencesFX","last_synced_at":"2025-05-11T11:34:24.654Z","repository":{"id":44375724,"uuid":"128030682","full_name":"dlsc-software-consulting-gmbh/PreferencesFX","owner":"dlsc-software-consulting-gmbh","description":"A framework for easily creating a UI for application settings / preferences.","archived":false,"fork":false,"pushed_at":"2024-01-08T10:17:06.000Z","size":4719,"stargazers_count":586,"open_issues_count":36,"forks_count":68,"subscribers_count":23,"default_branch":"master-11","last_synced_at":"2024-10-30T01:38:15.672Z","etag":null,"topics":["component","framework","javafx","preferences","ui"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlsc-software-consulting-gmbh.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-04-04T08:19:16.000Z","updated_at":"2024-10-24T07:55:11.000Z","dependencies_parsed_at":"2024-01-13T07:33:31.276Z","dependency_job_id":null,"html_url":"https://github.com/dlsc-software-consulting-gmbh/PreferencesFX","commit_stats":null,"previous_names":["dlemmermann/preferencesfx"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsc-software-consulting-gmbh%2FPreferencesFX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsc-software-consulting-gmbh%2FPreferencesFX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsc-software-consulting-gmbh%2FPreferencesFX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlsc-software-consulting-gmbh%2FPreferencesFX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlsc-software-consulting-gmbh","download_url":"https://codeload.github.com/dlsc-software-consulting-gmbh/PreferencesFX/tar.gz/refs/heads/master-11","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224341523,"owners_count":17295266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["component","framework","javafx","preferences","ui"],"created_at":"2024-08-03T18:00:49.316Z","updated_at":"2024-11-17T13:31:12.371Z","avatar_url":"https://github.com/dlsc-software-consulting-gmbh.png","language":"Java","funding_links":[],"categories":["Libraries, Tools and Projects"],"sub_categories":[],"readme":"[![JFXCentral](https://img.shields.io/badge/Find_me_on-JFXCentral-blue?logo=googlechrome\u0026logoColor=white)](https://www.jfx-central.com/libraries/preferencesfx)\n\n# PreferencesFX\n**Preference dialogs for business applications made easy. Creating preference dialogs in Java has never been this easy!**\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.dlsc.preferencesfx/preferencesfx-core.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.dlsc.preferencesfx%22%20AND%20a:%22preferencesfx-core%22)\n[![Build Status](https://travis-ci.com/dlsc-software-consulting-gmbh/PreferencesFX.svg?branch=master)](https://travis-ci.com/dlsc-software-consulting-gmbh/PreferencesFX)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX?ref=badge_shield)\n\n![screenshot of created preferences dialog](docs/images/preferencesFX_in_use.png) \n\n## Table of Contents\n- [Maven](#maven)\n- [Gradle](#gradle)\n- [What is PreferencesFX](#what-is-preferencesfx)\n- [Advantages](#advantages)\n- [Main Features](#main-features)\n- [Documentation](#documentation)\n- [Structure](#structure)\n- [Demos](#demos)\n- [Defining a preferences dialog](#defining-a-preferences-dialog)\n   - [Required arguments](#required-arguments)\n   - [Optional arguments](#optional-arguments)\n   - [Setting types](#setting-types)\n- [Localisation](#localisation)\n- [Validation](#validation)\n- [Visibility](#visibility)\n- [Team](#team)\n\n## Maven\n\nTo use this framework as part of your Maven build simply add the following dependency to your pom.xml file:\n\n### Java 8\n```XML\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.dlsc.preferencesfx\u003c/groupId\u003e\n  \u003cartifactId\u003epreferencesfx-core\u003c/artifactId\u003e\n  \u003cversion\u003e8.6.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Java 11\n```XML\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.dlsc.preferencesfx\u003c/groupId\u003e\n  \u003cartifactId\u003epreferencesfx-core\u003c/artifactId\u003e\n  \u003cversion\u003e11.8.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n## Gradle\n\nTo use this framework as part of your gradle build simply add the following to your build.gradle file and use the following dependency definition:\n\n### Java 8\n```groovy\ndependencies {\n    compile group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: '8.6.0'\n}\n```\n\n### Java 11\n```groovy\ndependencies {\n    compile group: 'com.dlsc.preferencesfx', name: 'preferencesfx-core', version: '11.8.0'\n}\n```\n\n## What is PreferencesFX?\nCreating preference dialogs in JavaFX is a tedious and very error-prone task. PreferencesFX is a framework which solves this problem. It enables the developer to create preference dialogs with ease and creates well-designed and user-friendly preference dialogs by default.\n\n## Advantages\n- Less error-prone\n- Less code needed\n- Easy to learn\n- Easy to understand\n- Easy to use, for developers and users alike\n\n## Main Features\n- Simple and understandable API\n- The most important features are noted in the picture and the corresponding table below:\n\n![screenshot of created preferences dialog with features](docs/images/preferencesFX_in_use_border.png)\n\nNr. | Feature | Description\n--- | ------- | -----------\n1 | `Search / Filter` | Filters all categories for a given String. Enables searching for a Setting, Group or Category by name.\n2 | `TreeView` | Shows all categories in a hierarchical structure\n3 | `Breadcrumb Bar` | Shows the user the previous categories in the hierarchy to the currently displayed category and allows the user to navigate back.\n4 | `Undo / Redo Buttons` | Allows the user a stepwise undo and redo possibility of his last changes.\n5 | `Various pre-defined setting types` | e.g. Integer, Double, Boolean, String, Lists, Objects\n6 | `close/cancel buttons` | The close button just closes the window and leaves the preferences as they are. The cancel button discards all changes which are made during the time the dialog was last opened.\n- | `Instant persistance` | Any changes to the application are saved instantly.\n\n## Documentation\nThis project uses the `asciidoctor` plugin to generate the necessary documentation. Run the following *maven* task:\n```Maven\nprocess-resources\n```\nAfterwards, you will find the documentation in the `target/generated-docs/` subdirectory.\n\n## Structure\nA preferences dialog can contain multiple `Categories`.  \nEach `Category` contains one to multiple `Groups`  \nEach `Group` contains one to multiple `Settings`  \n\nFor better illustration, the basic concept of writing a preferences dialog is shown below:\n```Java\nPreferencesFx preferencesFx = \n    PreferencesFx.of(SaveClass.class,\n        Category.of(\"Category Title\",\n            Group.of(\"Group Title\",\n                Setting.of(\"Setting Title\", new Property())\n            )\n        )\n    );\n```\nNotes:\n- It is also possible to omit the `Group` and declare all settings in a `Category` directly. However, in this case all settings will simply be displayed one after another without grouping. If you want more control, use `Group`.\n- A `Group` can also be defined without a title. In this case, the individual groups are displayed with more space in between them, to ensure they can be differentiated.\n- A `Category` can also take a graphic node to be used as an icon as the second argument, e.g. `Category.of(\"Category Title\", new ImageView(new Image(\"file:icon.png\")),`\n\n## Demos\nWe created several demos to visualize the capabilities of PreferencesFX.  \nSimply launch `preferencesfx-demo/src/com/dlsc/preferencesfx/AppStarter.java` and look into the different Tabs.\n\nThe following demos are available:\n\nImport | Description\n------ | -----------\n`Standard` | The standard demo with a few settings and fully working bindings.\n`Internationalized` | Shows how to define preference dialogs in multiple languages, using internationalization.\n`OneCategory` | Shows the behavior of the API when only one category is used: The Breadcrumb Bar and TreeView will be omitted from the GUI.\n`Extended` | A demo, populated with lots of categories, groups and settings without any bindings. Designed to show usage in a big project.\n\n## Defining a preferences dialog\nCreating a preferences dialog is as simple as calling `PreferencesFx.of()`.\n\n```Java\nStringProperty stringProperty = new SimpleStringProperty(\"String\");\nBooleanProperty booleanProperty = new SimpleBooleanProperty(true);\nIntegerProperty integerProperty = new SimpleIntegerProperty(12);\nDoubleProperty doubleProperty = new SimpleDoubleProperty(6.5);\n\nPreferencesFx preferencesFx = \n    PreferencesFx.of(AppStarter.class, // Save class (will be used to reference saved values of Settings to)\n        Category.of(\"Category title 1\",\n            Setting.of(\"Setting title 1\", stringProperty), // creates a group automatically\n            Setting.of(\"Setting title 2\", booleanProperty) // which contains both settings\n        ),\n        Category.of(\"Category title 2\")\n            .expand()                                       // Expand the parent category in the tree-view\n            .subCategories( // adds a subcategory to \"Category title 2\"\n                Category.of(\"Category title 3\",\n                    Group.of(\"Group title 1\",\n                        Setting.of(\"Setting title 3\", integerProperty)\n                    ),\n                    Group.of( // group without title\n                        Setting.of(\"Setting title 3\", doubleProperty)\n                    )\n                )\n            )\n    );\n```\n\nThis code snippet results in the following preferences window, containing three categories:\n\n![result](docs/images/example_preferences.png)\n\nTo create a `Setting`, you only need to define a title and a `Property`. `PreferencesFX` does the rest.  \nYou can then integrate this `Property` in your application. Changes of values in the preferences dialog will be persisted instantly, however it's up to you to decide whether you want to persist them instantly in your application as well.\n\n#### Required arguments\nYou have a lot of options to influence the behavior and layout of the preferences dialog.  \nThe following parameters are the absolute minimum, needed for the proper functioning of `PreferencesFX`:\n\nParameter | Description\n------ | -----------\n`AppStarter.class` | In the constructor of `PreferencesFx` a `saveClass` is required. This class is saved as a key for the saved setting values. Further information is available in the javadoc.\n`Category description` | Each `Category` must have a description. This is required to display its description in the `TreeView`.\n`Setting description` | Each `Setting` must have a description. It will be displayed on the left of the control, which is used to manipulate the respective `Setting`.\n\nNote: The value of the each `Setting` is stored using the [Java Preferences API](https://docs.oracle.com/javase/8/docs/api/java/util/prefs/Preferences.html) by default.  \nFor testing purposes, to clear the saved preferences of the demo, run the method in the class:\n```\npreferencesfx-demo/src/test/java/PreferencesStorageReset.java\n```\n\n#### Optional arguments\nThe following parameters are optionally available to further configure the dialog created by `PreferencesFX`:\n\nMethod | Class | Description\n------ | ----- | -----------\n`.subCategories` | `Category` | Subcategories allow a `Category` to have additional subcategories as children. Those are also displayed in the tree.\n`.expand` | `Category` | Allows to specify if the `Category` should be expanded in the Tree-View by default.\n`.description` | `Group` | If you decide not to add the description of a group in the constructor, you can still add it after the creation of the group.\n`.validate` | `Setting` | Allows to add a [Validator](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html) to a setting, to set constraints to the values that can be entered.\n`.persistApplicationState` | `PreferencesFx` | Defines if the Preferences API should save the application states. This includes the state persistence of the dialog window, as well as the values of each Setting.\n`.persistWindowState` | `PreferencesFx` | Defines whether the state of the dialog window (position, size, last selected Category) should be persisted or not. Defaults to false.\n`.saveSettings` | `PreferencesFx` | Defines whether the changed settings in the Preferences window should be saved or not. Defaults to true.\n`.debugHistoryMode` | `PreferencesFx` | Makes it possible to enable or disable the keycombination to open a debug view of the list of all actions in the history (undo / redo). Pressing Ctrl + Shift + H (Windows) or CMD + Shift + H (Mac) opens a dialog with the undo / redo history, shown in a table. Defaults to false.\n`.buttonsVisibility` | `PreferencesFx` | Sets the visibility of the cancel and close buttons in the `PreferencesFxDialog`. Defaults to true.\n`.instantPersistent` | `PreferencesFx` | If set to true, it will instantly apply any changes that are being made in the `PreferencesFxDialog`. If set to false, it will only apply changes when the `Save` / `Apply` / `OK` button is pressed. Due to a limitation in FormsFX, undo / redo cannot be used with instant persistence switched off! Defaults to true.\n`.i18n` | `PreferencesFx` | Sets the translation service of the preferences dialog for internationalization.\n`.dialogTitle` | `PreferencesFx` | Allows to specify a custom dialog title.\n`.dialogIcon` | `PreferencesFx` | Allows to specify a custom dialog icon.\n\n#### Setting types\nThe following table shows how to create `Settings` using the predefined controls and how they look like:\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003cth\u003eSyntax\u003c/th\u003e\n        \u003cth\u003eOutcome\u003c/th\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Integer\nIntegerProperty brightness = new SimpleIntegerProperty(50);\nSetting.of(\"Brightness\", brightness);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/integer_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Integer Range\nIntegerProperty fontSize = new SimpleIntegerProperty(12);\nSetting.of(\"Font Size\", fontSize, 6, 36);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/integerSlider_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Double\nDoubleProperty scaling = new SimpleDoubleProperty(1);\nSetting.of(\"Scaling\", scaling);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/double_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Double Range\nDoubleProperty lineSpacing = new SimpleDoubleProperty(1.5);\nSetting.of(\"Line Spacing\", lineSpacing, 0, 3, 1);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/doubleSlider_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Boolean\nBooleanProperty nightMode = new SimpleBooleanProperty(true);\nSetting.of(\"Night Mode\", nightMode);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/boolean_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// String\nStringProperty welcomeText = new SimpleStringProperty(\"Hello World\");\nSetting.of(\"Welcome Text\", welcomeText);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/string_setting.png\"\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Combobox, Single Selection, with ObservableList\nObservableList\u003cString\u003e resolutionItems = FXCollections.observableArrayList(Arrays.asList(\n  \"1024x768\", \"1280x1024\", \"1440x900\", \"1920x1080\")\n);\nObjectProperty\u003cString\u003e resolutionSelection = new SimpleObjectProperty\u003c\u003e(\"1024x768\");\nSetting.of(\"Resolution\", resolutionItems, resolutionSelection);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/observableList_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Combobox, Single Selection, with ListProperty\nListProperty\u003cString\u003e orientationItems = new SimpleListProperty\u003c\u003e(\n  FXCollections.observableArrayList(Arrays.asList(\"Vertical\", \"Horizontal\"))\n);\nObjectProperty\u003cString\u003e orientationSelection = new SimpleObjectProperty\u003c\u003e(\"Vertical\");\nSetting.of(\"Orientation\", orientationItems, orientationSelection);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/listProperty_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Combobox, Multi Selection\nListProperty\u003cString\u003e favoritesItems = new SimpleListProperty\u003c\u003e(\n  FXCollections.observableArrayList(Arrays.asList(\n      \"eMovie\", \"Eboda Phot-O-Shop\", \"Mikesoft Text\",\n      \"Mikesoft Numbers\", \"Mikesoft Present\", \"IntelliG\"\n      )\n  )\n);\nListProperty\u003cString\u003e favoritesSelection = new SimpleListProperty\u003c\u003e(\n  FXCollections.observableArrayList(Arrays.asList(\n      \"Eboda Phot-O-Shop\", \"Mikesoft Text\"))\n);\nSetting.of(\"Favorites\", favoritesItems, favoritesSelection);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/favourites_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Color\nObjectProperty\u003cColor\u003e colorProperty = new SimpleObjectProperty\u003c\u003e(Color.PAPAYAWHIP);\nSetting.of(\"Font Color\", colorProperty);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/color_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// FileChooser / DirectoryChooser\nObjectProperty\u003cFile\u003e fileProperty = new SimpleObjectProperty\u003c\u003e();\nSetting.of(\"File\", fileProperty, false);     // FileChooser\nSetting.of(\"Directory\", fileProperty, true); // DirectoryChooser\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/chooser_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Custom Control\nIntegerProperty customControlProperty = new SimpleIntegerProperty(42);\nIntegerField customControl = Field.ofIntegerType(customControlProperty).render(\n  new IntegerSliderControl(0, 42));\nSetting.of(\"Favorite Number\", customControl, customControlProperty);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/custom_setting.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n    \u003ctr\u003e\n        \u003ctd\u003e\u003cpre lang=\"java\"\u003e\n// Static node\nNode staticNode = new Label(\"This can be your very own placeholder!\");\nSetting.of(staticNode);\u003c/pre\u003e\n        \u003c/td\u003e\n        \u003ctd\u003e\u003cimg src=\"./docs/images/settings/static_node.png\"/\u003e\u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nNote: By default, PreferencesFX saves the settings under a key which consists of the breadcrumb to the setting, delimited by `#` signs. If you want to define your own key to be used for saving, use the method `setting.customKey(\"key\")`\n\n## Localisation\nAll displayed strings can be internationalized. You can use [resource bundles](https://docs.oracle.com/javase/8/docs/api/java/util/ResourceBundle.html) to define different locales and use the key instead of the descriptions. Adding i18n support is simply done by calling the method `.i18n()` at the end when creating the preferences:\n\n```java\nprivate ResourceBundle rbDE = ResourceBundle.getBundle(\"demo.demo-locale\", new Locale(\"de\", \"CH\"));\nprivate ResourceBundle rbEN = ResourceBundle.getBundle(\"demo.demo-locale\", new Locale(\"en\", \"UK\"));\n\nprivate ResourceBundleService rbs = new ResourceBundleService(rbEN);\n\nPreferencesFx.of(…)\n             .i18n(rbs);\n```\n\n## Validation\nIt is possible to optionally add a [Validator](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html) to settings. PreferencesFX uses the [implementation of FormsFX for the validation](http://dlsc.com/wp-content/html/formsfx/apidocs/com/dlsc/formsfx/model/validators/Validator.html). FormsFX offers a wide range of pre-defined validators, but also includes support for custom validators using the `CustomValidator.forPredicate()` method. The following table lists the supported validators:\n\n| Validator | Description |\n| --------- | ----------- |\n| `CustomValidator` | Defines a predicate that returns whether the field is valid or not. |\n| `DoubleRangeValidator` | Defines a number range which is considered valid. This range can be limited in either one direction or in both directions. |\n| `IntegerRangeValidator` | Defines a number range which is considered valid. This range can be limited in either one direction or in both directions. |\n| `RegexValidator` | Valiates text against a regular expression. This validator offers pre-defined expressions for common use cases, such as email addresses.\n| `SelectionLengthValidator` | Defines a length interval which is considered valid. This range can be limited in either one direction or in both directions. |\n| `StringLengthValidator` | Defines a length interval which is considered valid. This range can be limited in either one direction or in both directions. |\n\n## Visibility\n\nPreferencesFX supports setting an optional visibility condition for Categories, Groups and Settings\n\n* condition could be defined as a lambda-expression\n* condition will be re-evaluated whenever any Setting changes\n\n```java\nCategory.of(\"General\",\n  Group.of(\"Display\",\n    Setting.of(\"Brightness\", brightness),\n    Setting.of(\"Night mode\", nightMode, VisibilityProperty.of(brightness, (newValue) -\u003e newValue.intValue() \u003e 50)),\n    Setting.of(\"Scale\", scale, VisibilityProperty.of(nightMode),\n    Setting.of(\"Is production category visible\", productionVisibility)\n  )\n),\nCategory.of(\"Production\", VisibilityProperty.of(productionVisibility),\n  Group.of(\"Display\",\n      Setting.of(\"Port\", salary, VisibilityProperty.of(nightMode)\n  )\n),\nCategory.of(\"View\",\n  Group.of(\"Display\",\n    Setting.of(\"Salary\", salary, VisibilityProperty.of(nightMode)\n  ),\n  Group.of(\"Bonuses\", VisibilityProperty.of(salary, (newValue) -\u003e newValue.intValue() \u003e 10),\n    Setting.of(\"Bonus\", bonus)\n  )\n)\n```\n\n## Team\n- Marco Sanfratello\n  - marco.sanfratello@students.fhnw.ch\n  - Skype: sanfratello.m@gmail.com \n  - GitHub: Genron\n\n- François Martin\n  - francois.martin@students.fhnw.ch \n  - Skype: francoisamimartin\n  - GitHub: martinfrancois\n  \n- Dirk Lemmermann\n  - dlemmermann@gmail.com\n  - Skype: dlemmermann\n  - GitHub: dlemmermann\n  \n- Dieter Holz\n  - dieter.holz@fhnw.ch\n  - Skype: dieter.holz.canoo.com\n  - GitHub: DieterHolz\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlsc-software-consulting-gmbh%2FPreferencesFX/lists"}