Interface LookAndFeelProvider


public interface LookAndFeelProvider
Provides a LookAndFeel implementation.
  • Method Details

    • lookAndFeelInfo

      UIManager.LookAndFeelInfo lookAndFeelInfo()
      Returns:
      the look and feel info
    • enable

      void enable()
      Configures and enables this LookAndFeel.
    • lookAndFeel

      LookAndFeel lookAndFeel() throws Exception
      Returns:
      the LookAndFeel instance represented by this provider
      Throws:
      Exception - in case an instance could not be created
    • lookAndFeelProvider

      static LookAndFeelProvider lookAndFeelProvider(UIManager.LookAndFeelInfo lookAndFeelInfo)
      Instantiates a new LookAndFeelProvider, using UIManager.setLookAndFeel(String) to enable.
      Parameters:
      lookAndFeelInfo - the look and feel info
      Returns:
      a look and feel provider
    • lookAndFeelProvider

      static LookAndFeelProvider lookAndFeelProvider(UIManager.LookAndFeelInfo lookAndFeelInfo, Consumer<UIManager.LookAndFeelInfo> enabler)
      Instantiates a new LookAndFeelProvider.
      Parameters:
      lookAndFeelInfo - the look and feel info
      enabler - configures and enables this look and feel
      Returns:
      a look and feel provider
    • addLookAndFeelProvider

      static void addLookAndFeelProvider(UIManager.LookAndFeelInfo lookAndFeelInfo)
      Adds a new LookAndFeelProvider look and feel provider.
      Parameters:
      lookAndFeelInfo - the look and feel info
    • addLookAndFeelProvider

      static void addLookAndFeelProvider(UIManager.LookAndFeelInfo lookAndFeelInfo, Consumer<UIManager.LookAndFeelInfo> enabler)
      Adds a new LookAndFeelProvider look and feel provider.
      Parameters:
      lookAndFeelInfo - the look and feel info
      enabler - configures and enables this look and feel
    • addLookAndFeelProvider

      static void addLookAndFeelProvider(LookAndFeelProvider lookAndFeelProvider)
      Adds the given look and feel provider. Note that this replaces any existing look and feel provider based on the same classname.
      Parameters:
      lookAndFeelProvider - the look and feel provider to add
    • lookAndFeelProviders

      static Map<String,LookAndFeelProvider> lookAndFeelProviders()
      Returns:
      the available LookAndFeelProviders
      See Also:
    • findLookAndFeelProvider

      static Optional<LookAndFeelProvider> findLookAndFeelProvider(String className)
      Returns a look and feel provider with the given classname, if available
      Parameters:
      className - the look and feel classname
      Returns:
      a look and feel provider, an empty Optional if not found
    • defaultLookAndFeelName

      static String defaultLookAndFeelName(String userPreferencePropertyName)
      Returns the look and feel specified by the given user preference or the system look and feel if no preference value is found.
      Parameters:
      userPreferencePropertyName - the name of the user preference look and feel property
      Returns:
      the look and feel specified by user preference or the default system look and feel
    • enableLookAndFeel

      static void enableLookAndFeel(LookAndFeelProvider lookAndFeelProvider)
      Enables the given look and feel and updates all window component trees.
      Parameters:
      lookAndFeelProvider - the look and feel provider to enable