Finding the right icon for your JavaFX project can be a hassle. I know the struggle. See, there are more than 62,000 icons spread across 58 different icon packs in Ikonli. That's a lot of icon codes to comb through!
I was inspired by the AltantaFX sampler, which made browsing Material icons a breeze. So, I decided to take it a step further. I created IkonX - the Icon Pack Browser. With this tool, you can easily search, preview, and copy icon codes from all available icon packs. No more digging through endless documents to find that perfect icon.
Here's what you can do with IkonX:
- One-Stop Shop: Access icons from all 58 supported icon packs in one place.
- Quick Search: Find icons by searching for their icon codes.
- Preview Icons: See what each icon looks like before you choose.
- Copy and Paste: Click an icon, and its code is automatically copied to your clipboard.
- User-Friendly: It's simple and easy to use.
IkonX follows a strict Model-View-Update (MVU) architecture, enforcing unidirectional data flow and a single source of truth.
-
Single Source of Truth: The entire application state is stored in a single
ViewStateobject. The UI is a pure function of this state. -
Unidirectional Data Flow: Data flows in one direction:
- Action: User interactions and other events are represented as immutable
Actionobjects. - State: The
Updatefunction takes the currentViewStateand anActionand produces a newViewState. - View: The
IconViewobserves theViewStateand updates the UI accordingly.
- Action: User interactions and other events are represented as immutable
-
No Direct UI Mutation: The UI is never mutated directly. All changes are the result of a new
ViewStatebeing emitted. Therender(ViewState)method inIconViewis the only place where the UI is updated.
flowchart LR
UI[UI] -->|Dispatch Action| Action[Action]
Action -->|Processed by| Update[Update Function]
Update -->|Produces| ViewState[ViewState]
ViewState -->|Observed by| IconView[IconView]
IconView -->|Re-renders UI| UI
- The UI dispatches an
Action. - The
Actionis sent to theUpdatefunction. - The
Updatefunction produces a newViewState. - The
IconViewreceives the newViewStateand re-renders itself.
This strict adherence to MVU results in a predictable, testable, and maintainable codebase.
You’ve got two ways to dive in:
1. Grab an executable
Quickest way. Pick your OS (Linux, Windows, or Mac) and grab the release that fits your system from the releases page. It comes with Java bundled, so no extra installs. Perfect if you just want to jump in and start browsing icons.
2. Build from source
Clone or download this repo, open it in your Java IDE, build, and run. Ideal if you like tinkering, contributing, or want the latest tweaks straight from the code.
- Open the IkonX - Icon Pack Browser.
- Search for icons using their icon codes.
- Preview icons to find the perfect fit.
- Click on an icon to select it; the code is automatically copied to your clipboard.
- Paste the code into your JavaFX application, and you're good to go.
I welcome contributions! If you want to enhance IkonX or add more features, here's what to do:
- Fork the IkonX repository.
- Create a new branch for your changes.
- Make your changes and thoroughly test them.
- Send me a pull request, explaining what you did and why it's awesome.
IkonX is licensed under the MIT License.
- Huge thanks to the creators and contributors of the Ikonli library.
- Shoutout to AltantaFX for inspiring this project.
Got questions or suggestions? Reach out to me at contact.kamau@gmail.com. I'm here to help.
