kirill-grouchnikov / substance

A modern and high-performant Swing look-and-feel library
163 stars 110 forks source link

SubstanceIcon needs a UIResource variant #62

Closed kirill-grouchnikov closed 6 years ago

kirill-grouchnikov commented 6 years ago

SubstanceIcon should not implement UIResource marker interface. Instead, it should follow the core Swing approach from javax.swing.plaf.XYZUIResource - classes that accept a "core" object and delegate all relevant method calls to it, while exposing it as a UIResource.

This will allow using icons generated by Ibis in two ways:

  1. As internal / transient icons added by Substance and removed when it is unset.
  2. As application-specific icons in the apps that "survive" calls to SwingUtilities.updateComponentTreeUI methods and others that update UI delegates.