[sip-comm-cvs] CVS update: /sip-communicator/src/net/java/sip/communicator/gui/plaf/

emcho at dev.java.net emcho at dev.java.net
Wed May 26 11:08:27 CEST 2004


User: emcho   
Date: 04/05/26 02:08:27

Modified:
 /sip-communicator/src/net/java/sip/communicator/gui/plaf/
  SipCommunicatorColorTheme.java

Log:
 Ongoing work on simple

File Changes:

Directory: /sip-communicator/src/net/java/sip/communicator/gui/plaf/
====================================================================

File [changed]: SipCommunicatorColorTheme.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/src/net/java/sip/communicator/gui/plaf/SipCommunicatorColorTheme.java?r1=1.3&r2=1.4
Delta lines:  +20 -0
--------------------
--- SipCommunicatorColorTheme.java	13 Apr 2004 00:52:51 -0000	1.3
+++ SipCommunicatorColorTheme.java	26 May 2004 09:08:24 -0000	1.4
@@ -61,6 +61,8 @@
 import javax.swing.plaf.ColorUIResource;
 import net.java.sip.communicator.gui.GuiManager;
 import java.awt.Color;
+import javax.swing.*;
+import net.java.sip.communicator.common.*;
 
 /**
  * SipCommunicator color settings
@@ -72,6 +74,8 @@
 public class SipCommunicatorColorTheme
     extends DefaultMetalTheme
 {
+    private static final Console console = Console.getConsole(SipCommunicatorColorTheme.class);
+
     //Set default colors
     //ColorUIResource defaultForeground = new ColorUIResource(122, 150, 233);
     ColorUIResource defaultForeground = new ColorUIResource(48, 63, 112);
@@ -200,6 +204,22 @@
     public ColorUIResource getUserTextColor()
     {
         return userTextColor;
+    }
+
+    /**
+     * Helper method to use when running separate sip-communicator modules
+     */
+    public static void initLookAndFeel()
+    {
+        MetalLookAndFeel mlf = new MetalLookAndFeel();
+        mlf.setCurrentTheme( new SipCommunicatorColorTheme());
+
+        try {
+            UIManager.setLookAndFeel(mlf);
+        }
+        catch (UnsupportedLookAndFeelException ex) {
+            console.error("Failed to set custom look and feel", ex);
+        }
     }
 
 }




---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe at sip-communicator.dev.java.net
For additional commands, e-mail: cvs-help at sip-communicator.dev.java.net




More information about the commits mailing list