Package jpicedt.ui

Class LAFManager


  • public class LAFManager
    extends java.lang.Object
    LAF management : maintains a list of installed LAF, and handles LAF loading.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String KEY_LAF
      key used to fetch the LAF name from the Properties (see init)
    • Constructor Summary

      Constructors 
      Constructor Description
      LAFManager()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String getCurrentLafName()  
      static java.lang.String getDefaultLafName()  
      static java.lang.String[] getInstalledLookAndFeelsNames()  
      static void updateLaf()
      Init LAF from the given Properties using key=KEY_LAF and value = LAF name (as returned by LookAndFeelInfo.getName()).
      static void updateLaf​(java.lang.String lafName)
      set current LAF from the given LAF name
      static void updateLafFromClassName​(java.lang.String className)
      Set the LAF from the given class name.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • KEY_LAF

        public static final java.lang.String KEY_LAF
        key used to fetch the LAF name from the Properties (see init)
        See Also:
        Constant Field Values
    • Constructor Detail

      • LAFManager

        public LAFManager()
    • Method Detail

      • getCurrentLafName

        public static java.lang.String getCurrentLafName()
        Returns:
        a string representing current LAF name
      • getDefaultLafName

        public static java.lang.String getDefaultLafName()
        Returns:
        a string representing the default LAF (ie "Metal") name
      • getInstalledLookAndFeelsNames

        public static java.lang.String[] getInstalledLookAndFeelsNames()
        Returns:
        a list of installed LAF names (as returned by LookAndFeelInfo.getName()) suitable for a menu or JComboBox, e.g. "Metal,CDE/Motif,Windows"
      • updateLaf

        public static void updateLaf()
        Init LAF from the given Properties using key=KEY_LAF and value = LAF name (as returned by LookAndFeelInfo.getName()).
      • updateLaf

        public static void updateLaf​(java.lang.String lafName)
        set current LAF from the given LAF name
        Parameters:
        name - one of the predefined LAF names, e.g. "CDE/Motif" or "Metal"
      • updateLafFromClassName

        public static void updateLafFromClassName​(java.lang.String className)
        Set the LAF from the given class name.