JFoenix Documentation

repository·master·Indexed 27 days ago

https://github.com/sshahine/jfoenix

An open-source Java library that implements Google Material Design using JavaFX components. It provides a variety of Material Design components such as JFXButton, JFXCheckBox, JFXDialog, JFXColorPicker, and JFXSnackbar. The library includes specialized functionality for form validation via ValidationControl and advanced color selection tools through JFXColorPalette and JFXColorPickerUI. Supports Java 8 (version 8.0.10) and Java 9+ (version 9.0.10).

Tokens
1.4K
Snippets
8
Records
16
Agent score
86%

What's inside JFoenix

  1. Install JFoenix in a Gradle project

    master

    To use JFoenix in a Gradle project, add mavenCentral() to your repositories block. Then, add the appropriate dependency based on your Java version:

    • For Java 9+, use version 9.0.10.
    • For Java 8, use version 8.0.10.
    repositories {
        mavenCentral()
    }
    
    // For Java 9+
    dependencies {
        compile 'com.jfoenix:jfoenix:9.0.10'
    }
    
    // For Java 8
    dependencies {
        compile 'com.jfoenix:jfoenix:8.0.10'
    }
  2. Build JFoenix from source

    master

    To build the JFoenix library from the source repository, use the Gradle wrapper.

    Requirements:

    • You must set the JAVA_HOME environment variable to point to a Java 1.8 directory.
    • JFoenix requires Java 1.8u60 or higher.

    Building the project will generate a JAR file (e.g., jfoenix-0.0.0-SNAPSHOT.jar) in the jfoenix/build/libs folder.

    gradlew build
  3. Install JFoenix in a Maven project

    master

    To use JFoenix in a Maven project, add the following dependency to your pom.xml. Choose the version corresponding to your Java runtime:

    • For Java 9+, use version 9.0.10.
    • For Java 8, use version 8.0.10.
    <!-- For Java 9+ -->
    <dependency>
        <groupId>com.jfoenix</groupId>
        <artifactId>jfoenix</artifactId>
        <version>9.0.10</version>
    </dependency>
    
    <!-- For Java 8 -->
    <dependency>
        <groupId>com.jfoenix</groupId>
        <artifactId>jfoenix</artifactId>
        <version>8.0.10</version>
    </dependency>
  4. List of JFoenix Material Design components

    master

    JFoenix provides a variety of JavaFX components that implement Google Material Design. Available components include:

    • JFXButton
    • JFXCheckBox
    • JFXToggleButton
    • JFXDialog
    • JFXListView
    • JFXHighlighter
    • JFXChipView
    • JFXNodesList
    • JFXMasonryPane
    • JFXSlider
    • JFXSpinner
    • JFXSnackbar
    • JFXColorPicker
    • JFXDatePicker
    • JFXTimePicker
    • JFXTreeTableView
    • Grouping components
  5. Validate a control using ValidationControl

    master
    The ValidationControl class acts as a wrapper for JavaFX Control objects to implement form validation. You can associate a list of ValidatorBase instances with a control and then trigger validation. When validate() is called, it iterates through the provided validators. If a validator finds errors, it becomes the activeValidator and validate() returns false. If all validators pass, it returns true and the activeValidator is cleared.