GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - IovAnto/javafx-icon-utils: Set, resize and recolor icons on JavaFX controls with a single call, with caching

This repository was archived by the owner on Nov 12, 2026. It is now read-only.
BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
.idea
.idea
 
 
src
src
 
 
target
target
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
pom.xml
pom.xml
 
 

Repository files navigation

JavaFX IconUtils

Puts icons on JavaFX controls without the usual ceremony. One static call takes a control and an icon name and does the rest: loading the image, resizing it, recoloring it, and keeping the result in a cache so the same icon isn't decoded twice.

IconUtils.setIcon(saveButton, "save");
IconUtils.setIcon(deleteButton, "delete", Color.RED);
IconUtils.setIcon(settingsButton, "settings", 32);

Icons are loaded by name from resources/assets/icons. That path is fixed at the moment.

Install

The library isn't published to Maven Central. Two ways to get it:

Download javafx-iconutils-1.0.1.jar from the releases page and put it on your classpath.

Or build it and install it into your local repository:

mvn clean install                      # Maven
./gradlew publishToMavenLocal          # Gradle

then depend on io.github.IovAnto:javafx-iconutils.

Requires JavaFX 17.

API

Setting an icon, on a Labeled (Button, Label, ...) or on a MenuItem:

setIcon(node, iconName)
setIcon(node, iconName, double size)
setIcon(node, iconName, Color color)
setIcon(node, iconName, double width, double height, Color color)

Changing one that's already there — Labeled only:

changeIconColor(node, color)
changeIconSize(node, width, height)
changeIconColorAndSize(node, width, height, color)
removeColorEffect(node)

Cache:

preloadIcons("save", "delete", "settings")   // returns how many loaded
clearCache()
getCacheSize()

Recoloring works through a JavaFX blend mode, so it suits flat single-color icons and leaves photographs alone.

Building

mvn clean test package     # or: ./gradlew build test

Tests cover the cache, the loader's failure paths, and configuration.

License

MIT

About

Set, resize and recolor icons on JavaFX controls with a single call, with caching

Topics

iconsjavajavafxlibraryui

Resources

Readme
MIT license
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.