Class UIManager
- All Implemented Interfaces:
Serializable
UIManager. Path 2 (external) of the
icon-rendering plan: a
hand-picked lookup table maps the OptionPane.* icon keys
to VaadinIcon glyphs via
VaadinIconAdapter, so dialog-heavy migrated code that pulls
icons by key (e.g.
JOptionPane.showMessageDialog(parent, msg, "title", PLAIN_MESSAGE,
UIManager.getIcon("OptionPane.errorIcon"))) reaches the same Vaadin
glyph the JOptionPane static-factory path picks internally.
L&F machinery is permanently out of scope per R_match_swing_errors sub-bucket (b);
UIDefaults, LookAndFeel install/lookup, and the
addPropertyChangeListener surface aren't ported. The other
typed-getter family (getColor(Object), getFont(Object), ...) compiles
for import-swap but stubs through EHelper.onUnimplemented(String, String, Object...)
so call sites surface in migration logs rather than fail to compile.
Unknown icon keys log via EHelper.onUnimplemented(String, String, Object...) and
return null, matching the JDK contract that
UIManager.getIcon may return null for un-installed keys.
The supported key set today is the four OptionPane.*
messageType icons. Adding more keys is purely additive — wire a new
entry in ICON_KEYS when a future component needs
the L&F-key shape (e.g. FileChooser.directoryIcon,
Tree.openIcon). Doing so preemptively violates R_infra_not_surface.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Objectstatic Objectstatic booleangetBoolean(Object key) static booleangetBoolean(Object key, Locale locale) static Borderstatic Borderstatic ColorAnswers fromLookAndFeelDefaults' Metal table for the colour keys it covers, and keeps the WARN for the rest.static Colorstatic Stringstatic DimensiongetDimension(Object key) static DimensiongetDimension(Object key, Locale locale) static Fontstatic Fontstatic Iconstatic Iconstatic Insetsstatic Insetsstatic intstatic intstatic Stringstatic Stringstatic Stringstatic Stringstatic Objectstatic voidsetLookAndFeel(String className)
-
Constructor Details
-
UIManager
public UIManager()Public no-arg ctor, mirroring JDK shape. UIManager is used statically; no instance state.
-
-
Method Details
-
getIcon
-
getIcon
-
get
-
get
-
getString
-
getString
-
getInt
-
getInt
-
getBoolean
-
getBoolean
-
getColor
Answers fromLookAndFeelDefaults' Metal table for the colour keys it covers, and keeps the WARN for the rest.The returned instance is a
ColorUIResource, which is load-bearing rather than incidental: passing it straight back intosetBackgroundis how a migrated app says "reset me to the default", and the marker is what makes that render as the theme's colour instead of as a pinned literal (D_theme_is_lookandfeel). -
getColor
-
getFont
-
getFont
-
getInsets
-
getInsets
-
getDimension
-
getDimension
-
getBorder
-
getBorder
-
put
-
getLookAndFeel
-
setLookAndFeel
-
getSystemLookAndFeelClassName
-
getCrossPlatformLookAndFeelClassName
-