Class UIDesignManager

java.lang.Object
org.omegat.util.gui.UIDesignManager

public final class UIDesignManager extends Object
UI Design Manager.
  • Field Details

  • Method Details

    • addMenuUIPreference

      public static void addMenuUIPreference(IMenuPreferece menuUIPreference)
    • getMenuUIPreferences

      public static List<IMenuPreferece> getMenuUIPreferences()
    • setTheme

      public static void setTheme(String lafClassName, ClassLoader classLoader)
      Load and set theme.
      Parameters:
      lafClassName - LookAndFeel full qualified class name.
      classLoader - class loader to use.
    • setTheme

      public static void setTheme(String lafClassName)
      Load and set theme.
      Parameters:
      lafClassName - LookAndFeel full qualified class name.
    • initialize

      public static void initialize() throws IOException
      Initialize a docking subsystem.
      Throws:
      IOException
    • removeUnusedMenuSeparators

      public static void removeUnusedMenuSeparators(JPopupMenu menu)
      Removes first, last and duplicate separators from menu.
    • ensureDockablesVisible

      public static void ensureDockablesVisible(com.vlsolutions.swing.docking.DockingDesktop desktop)
      Ensure that any "closed" Dockables are made visible.
    • getDesktop

      public static com.vlsolutions.swing.docking.DockingDesktop getDesktop(Container c)
      Traverse the given container's parents until either an instance of DockingDesktop is found, or null is found.
      Parameters:
      c - The container to search
      Returns:
      Either the parent DockingDesktop, or null
    • isDarkTheme

      public static boolean isDarkTheme(UIDefaults uiDefaults)
      Heuristic detection of dark theme.

      isDarkTheme method derived from NetBeans licensed by Apache-2.0

      Returns:
      true when dark theme, otherwise false.
    • loadDefaultColors

      public static void loadDefaultColors(UIDefaults uiDefaults) throws IOException
      Load application default colors
      Throws:
      IOException
    • loadDefaultAppDarkColors

      public static void loadDefaultAppDarkColors(UIDefaults uiDefaults) throws IOException
      Throws:
      IOException
    • loadDefaultAppLightColors

      public static void loadDefaultAppLightColors(UIDefaults uiDefaults) throws IOException
      Throws:
      IOException