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_SIZEFixed menu icon size in pixels. |
static int |
SIZE_LARGELarge toolbar icon size in pixels. |
static int |
SIZE_NORMALDefault toolbar icon size in pixels. |
static int |
SIZE_SMALLSmall toolbar icon size in pixels. |
| Constructor and description |
|---|
Icons() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static Icons.DynamicSVGIcon |
amber(String name)Returns an amber app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
blue(String name)Returns a blue app-themed icon at the fixed menu size. |
|
static int |
getCurrentSize()Returns the current toolbar icon size in pixels. |
|
static Icons.DynamicSVGIcon |
green(String name)Returns a green app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
javaBlue(String name)Returns a Java-brand blue app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
load(String name)Returns a neutral app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
menu(String name)Returns a neutral menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuAmber(String name)Returns an amber menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuBlue(String name)Returns a blue menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuGreen(String name)Returns a green menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuJavaBlue(String name)Returns a Java-brand blue menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuRed(String name)Returns a red menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuSubtleBlue(String name)Returns a muted blue menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuTeal(String name)Returns a teal menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
menuViolet(String name)Returns a violet menu-bar icon tinted for the current menu background. |
|
static Icons.DynamicSVGIcon |
red(String name)Returns a red app-themed icon at the fixed menu size. |
|
static void |
refreshAll()Re-run the colour filter so every icon adopts the new LaF foreground. |
|
static void |
setSize(int size)Resize toolbar icons only — menu icons remain at MENU_SIZE. |
|
static Icons.DynamicSVGIcon |
subtleBlue(String name)Returns a muted blue app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
teal(String name)Returns a teal app-themed icon at the fixed menu size. |
|
static Icons.DynamicSVGIcon |
toolbar(String name)Returns a neutral resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarAmber(String name)Returns an amber resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarBlue(String name)Returns a blue resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarGreen(String name)Returns a green resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarJavaBlue(String name)Returns a Java-brand blue resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarRed(String name)Returns a red resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarSubtleBlue(String name)Returns a muted blue resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarTeal(String name)Returns a teal resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
toolbarViolet(String name)Returns a violet resizable toolbar icon. |
|
static Icons.DynamicSVGIcon |
violet(String name)Returns a violet app-themed icon at the fixed menu size. |
Fixed menu icon size in pixels.
Large toolbar icon size in pixels.
Default toolbar icon size in pixels.
Small toolbar icon size in pixels.
Returns an amber app-themed icon at the fixed menu size.
Returns a blue app-themed icon at the fixed menu size.
Returns the current toolbar icon size in pixels.
Returns a green app-themed icon at the fixed menu size.
Returns a Java-brand blue app-themed icon at the fixed menu size.
Returns a neutral app-themed icon at the fixed menu size.
Returns a neutral menu-bar icon tinted for the current menu background.
Returns an amber menu-bar icon tinted for the current menu background.
Returns a blue menu-bar icon tinted for the current menu background.
Returns a green menu-bar icon tinted for the current menu background.
Returns a Java-brand blue menu-bar icon tinted for the current menu background.
Returns a red menu-bar icon tinted for the current menu background.
Returns a muted blue menu-bar icon tinted for the current menu background.
Returns a teal menu-bar icon tinted for the current menu background.
Returns a violet menu-bar icon tinted for the current menu background.
Returns a red app-themed icon at the fixed menu size.
Re-run the colour filter so every icon adopts the new LaF foreground.
Resize toolbar icons only — menu icons remain at MENU_SIZE.
Returns a muted blue app-themed icon at the fixed menu size.
Returns a teal app-themed icon at the fixed menu size.
Returns a neutral resizable toolbar icon.
Returns an amber resizable toolbar icon.
Returns a blue resizable toolbar icon.
Returns a green resizable toolbar icon.
Returns a Java-brand blue resizable toolbar icon.
Returns a red resizable toolbar icon.
Returns a muted blue resizable toolbar icon.
Returns a teal resizable toolbar icon.
Returns a violet resizable toolbar icon.
Returns a violet app-themed icon at the fixed menu size.
Copyright © 2003-2026 The Apache Software Foundation. All rights reserved.