Skip to content

Repository files navigation

version

MaterialDesignFont for JavaFx

This is the updated version of Jensd's library.

The icons are made by Pictogrammers (mdi icons collection). This project is basically a port of the web version for JavaFx with Jensd's codebase.

It's made for Java 17+.

Download

Like my other libraries MaterialDesignFontFX is available on Maven Central.

Maven

<dependency>
    <groupId>fr.flowarg</groupId>
    <artifactId>materialdesignfontfx</artifactId>
    <version>VERSION</version>
</dependency>

Gradle

dependencies {
    implementation 'fr.flowarg:materialdesignfontfx:VERSION'
}

Usage

import fr.flowarg.materialdesignfontfx.MaterialDesignIcon;
import fr.flowarg.materialdesignfontfx.MaterialDesignIconView;

public class Main extends Application
{
    @Override
    public void start(Stage primaryStage)
    {
        // scene logic
        var accountIcon = new MaterialDesignIconView<>(MaterialDesignIcon.A.ACCOUNT);
        var yinYangIcon = new MaterialDesignIconView<>(MaterialDesignIcon.Y.YIN_YANG);
        // add the icons to your UI
    }
}

Note : I had to split each letter in a sub-enum because it exceeds the maximum amount of fields a Java class/enum can hold.

Generator

The Generator subproject aims to generate the MaterialDesignIcon class with the provided _variables.scss file.

About

Jensd' Material Design Font library updated

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages