class Icons
extends Object
Loads Material Symbols SVG icons and maps their fill color to the
active Look-and-Feel foreground. Selected usages go through green
or red to retain a colour cue from the earlier icon set.
Two families of factory methods:
- load/green/red — fixed-size icons
used in menus (and anywhere else that shouldn't scale).
- toolbar/toolbarGreen/toolbarRed
— resizable icons
wired to the toolbar; setSize(int) resizes only these.
Both families return DynamicSVGIcon proxies so the outer
reference held by Actions/components stays stable; refreshAll()
forces every icon (toolbar and menu) to re-render — use after a LaF switch.
| Modifiers | Name | Description |
|---|---|---|
static class |
Icons.DynamicSVGIcon |
Icon proxy whose inner FlatSVGIcon can be rebuilt at a new size without changing the outer reference held by Swing components. |
| Type | Name and description |
|---|---|
static int |
MENU_SIZE |
static int |
SIZE_LARGE |
static int |
SIZE_NORMAL |
static int |
SIZE_SMALL |
| Constructor and description |
|---|
Icons() |
Re-run the colour filter so every icon adopts the new LaF foreground.
Resize toolbar icons only — menu icons remain at MENU_SIZE.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.