@@ -0,0 +1,2618 @@
+package eg;%0A%0Aimport java.awt.Color;%0A%0A/**%0A * Defines colors for the dark and white background themes.%3Cbr%3E%0A */%0Apublic class BackgroundTheme %7B%0A%0A   private final static Prefs PREFS = new Prefs();%0A%0A   private final Color background;%0A   private final Color normalForeground;%0A   private final Color accentedNormalForeground;%0A   private final Color blueForeground;%0A   private final Color selectionBackground;%0A%0A   /**%0A    * Returns a %3Ccode%3EBackgroundTheme%3C/code%3E in which the theme%0A    * is given by the theme name read from %3Ccode%3EPrefs%3C/code%3E%0A    *%0A    * @return  the BackgroundTheme%0A    */%0A   public static BackgroundTheme givenTheme() %7B%0A      String theme = PREFS.getProperty(%22Background%22);%0A      BackgroundTheme bth = new BackgroundTheme(theme);%0A      return bth;%0A   %7D%0A%0A   /**%0A    * Creates a %3Ccode%3EBackgroundThme%3C/code%3E that has the white background%0A    *%0A    * @return  the BackgroundTheme%0A    */%0A   public static BackgroundTheme whiteTheme() %7B%0A      String theme = %22White%22;%0A      BackgroundTheme bth = new BackgroundTheme(theme);%0A      return bth;%0A   %7D%0A%0A   /**%0A    * Returns the background color%0A    *%0A    * @return  the color%0A    */%0A   public Color background() %7B%0A      return background;%0A   %7D%0A%0A   /**%0A    * Returns the foreground for normal text%0A    *%0A    * @return  the color%0A    */%0A   public Color normalForeground() %7B%0A      return normalForeground;%0A   %7D%0A%0A   /**%0A    * Returns the foreground for accented normal text. This is light%0A    * yellow and dark blue for the dark and white themes, respectively%0A    *%0A    * @return  the color%0A    */%0A   public Color accentedNormalForeground() %7B%0A      return accentedNormalForeground;%0A   %7D%0A%0A   /**%0A    * Returns the foreground for blue colored text%0A    *%0A    * @return  the color%0A    */%0A   public Color blueForeground() %7B%0A      return blueForeground;%0A   %7D%0A%0A   /**%0A    * Returns the selection background color%0A    *%0A    * @return the color%0A    */%0A   public Color selectionBackground() %7B%0A      return selectionBackground;%0A   %7D%0A%0A   //%0A   //--private--/%0A   //%0A%0A   private BackgroundTheme(String theme) %7B%0A      if (%22Dark%22.equals(theme)) %7B%0A         background = new Color(0, 0, 20);%0A         normalForeground = new Color(228, 228, 228);%0A         accentedNormalForeground = new Color(200, 200, 100);%0A         blueForeground = new Color(0, 160, 255);%0A         selectionBackground = new Color(50, 50, 250);%0A      %7D%0A      else %7B%0A         background = Color.WHITE;%0A         normalForeground = Color.BLACK;%0A         accentedNormalForeground = new Color(30, 30, 180);%0A         blueForeground = new Color(0, 20, 255);%0A         selectionBackground = new Color(190, 230, 255);%0A      %7D%0A   %7D%0A%7D%0A

add class to set white or dark background