svn commit: r3293 - trunk/src/net/java/sip/communicator/plugin/branding

yanas at dev.java.net yanas at dev.java.net
Thu Dec 6 11:28:23 CET 2007


Author: yanas
Date: 2007-12-06 10:28:21+0000
New Revision: 3293

Modified:
   trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java
   trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java
   trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java
   trunk/src/net/java/sip/communicator/plugin/branding/Constants.java
   trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java
   trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties
   trunk/src/net/java/sip/communicator/plugin/branding/resources.properties

Log:
some more enhancements in the branding plugin - the about window and the splashscreen now use the same fonts; all unused constants are now removed; font name and size is moved to the branding properties; splash screen now uses the same styled html editor pane as the about dialog 

Modified: trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java&p2=trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/AboutWindow.java	2007-12-06 10:28:21+0000
@@ -18,7 +18,8 @@
 {

     private WindowBackground mainPanel = new WindowBackground();

 

-    private JLabel titleLabel = new JLabel("SIP Communicator");

+    private JLabel titleLabel = new JLabel(

+        BrandingResources.getString("productName"));

 

     private JLabel versionLabel = new JLabel(" "

             + System.getProperty("sip-communicator.version"));

@@ -40,7 +41,10 @@
     {

         super(owner);

 

-        this.setTitle(Resources.getString("about"));

+        this.setTitle(  Resources.getString("aboutWindowTitle",

+                        new String[]{BrandingResources

+                                        .getString("productName")}));

+

         this.setModal(false);

 

         this.mainPanel.setLayout(new BorderLayout());

@@ -139,12 +143,13 @@
             {

                 bgImage = ImageIO.read(WindowBackground.class

                         .getResource("resources/aboutWindowBackground.png"));

-            } catch (IOException e)

+            }

+            catch (IOException e)

             {

                 bgImage = null;

             }

-            this.setPreferredSize(new Dimension(bgImage.getWidth(this), bgImage

-                    .getHeight(this)));

+            this.setPreferredSize(new Dimension(bgImage.getWidth(this),

+                                                bgImage.getHeight(this)));

         }

 

         protected void paintComponent(Graphics g)

@@ -174,8 +179,10 @@
 

             if (serviceReference != null)

             {

-                BrowserLauncherService browserLauncherService = (BrowserLauncherService) BrandingActivator

+                BrowserLauncherService browserLauncherService

+                    = (BrowserLauncherService) BrandingActivator

                         .getBundleContext().getService(serviceReference);

+

                 browserLauncherService.openURL(href);

 

             }


Modified: trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java&p2=trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/BrandingActivator.java	2007-12-06 10:28:21+0000
@@ -78,7 +78,7 @@
         // Add your menu item to the help menu
         if (aboutEntry == null)
         {
-            aboutEntry = new JMenuItem(Resources.getString("menuEntry"));
+            aboutEntry = new JMenuItem(Resources.getString("aboutMenuEntry"));
             aboutEntry.addActionListener(new ActionListener()
             {
                 public void actionPerformed(ActionEvent e)

Modified: trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java&p2=trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/BrandingResources.java	2007-12-06 10:28:21+0000
@@ -10,8 +10,8 @@
 import java.util.*;
 
 /**
- * The Messages class manages the access to the internationalization properties
- * files.
+ * The BrandingResources class manages the access to the
+ * brandingResources.properties file.
  *
  * @author Yana Stamcheva
  */

Modified: trunk/src/net/java/sip/communicator/plugin/branding/Constants.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/Constants.java?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/Constants.java&p2=trunk/src/net/java/sip/communicator/plugin/branding/Constants.java&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/Constants.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/Constants.java	2007-12-06 10:28:21+0000
@@ -27,71 +27,6 @@
      */

 

     /**

-     * The color used to paint the background of an incoming call history

-     * record.

-     */

-    public static final Color HISTORY_DATE_COLOR = new Color(255, 201, 102);

-

-    /**

-     * The color used to paint the background of an incoming call history

-     * record.

-     */

-    public static final Color HISTORY_IN_CALL_COLOR = new Color(249, 255, 197);

-

-    /**

-     * The color used to paint the background of an outgoing call history

-     * record.

-     */

-    public static final Color HISTORY_OUT_CALL_COLOR = new Color(243, 244, 247);

-

-    /**

-     * The start color used to paint a gradient selected background of some

-     * components.

-     */

-    public static final Color SELECTED_START_COLOR = new Color(151, 169, 198);

-

-    /**

-     * The end color used to paint a gradient selected background of some

-     * components.

-     */

-    public static final Color SELECTED_END_COLOR = new Color(209, 212, 225);

-

-    /**

-     * The start color used to paint a gradient mouse over background of some

-     * components.

-     */

-    public static final Color MOVER_START_COLOR = new Color(230, 230, 230);

-

-    /**

-     * The end color used to paint a gradient mouse over background of some

-     * components.

-     */

-    public static final Color MOVER_END_COLOR = new Color(255, 255, 255);

-

-    /**

-     * Gray color used to paint some borders, like the button border for

-     * example.

-     */

-    public static final Color GRAY_COLOR = new Color(154, 154, 154);

-

-    /**

-     * A color between blue and gray used to paint some borders.

-     */

-    public static final Color BLUE_GRAY_BORDER_COLOR = new Color(142, 160, 188);

-

-    /**

-     * A color between blue and gray (darker than the other one), used to paint

-     * some borders.

-     */

-    public static final Color BLUE_GRAY_BORDER_DARKER_COLOR = new Color(131,

-            149, 178);

-

-    /**

-     * Light gray color used in the look and feel.

-     */

-    public static final Color LIGHT_GRAY_COLOR = new Color(200, 200, 200);

-

-    /**

      * Dark blue color used in the About Window.

      */

     public static final Color DARK_BLUE = new Color(23, 65, 125);

@@ -103,20 +38,13 @@
      */

 

     /**

-     * The name of the font used in this ui implementation.

-     */

-    public static final String FONT_NAME = "Verdana";

-

-    /**

-     * The size of the font used in this ui implementation.

-     */

-    public static final String FONT_SIZE = "12";

-

-    /**

      * The default <tt>Font</tt> object used through this ui implementation.

      */

-    public static final Font FONT = new Font(Constants.FONT_NAME, Font.PLAIN,

-            new Integer(Constants.FONT_SIZE).intValue());

+    public static final Font FONT

+        = new Font( BrandingResources.getString("fontName"),

+                    Font.PLAIN,

+                    new Integer(BrandingResources.getString("fontSize"))

+                        .intValue());

 

     /**

      * Temporary method to load the css style used in the chat window.

@@ -125,7 +53,6 @@
      */

     public static void loadSimpleStyle(StyleSheet style)

     {

-

         InputStream is = Constants.class

                 .getResourceAsStream("resources/defaultStyle.css");

 


Modified: trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java&p2=trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/WelcomeWindow.java	2007-12-06 10:28:21+0000
@@ -9,7 +9,8 @@
 {
     private WindowBackground mainPanel = new WindowBackground();
 
-    private JLabel titleLabel = new JLabel("SIP Communicator");
+    private JLabel titleLabel
+        = new JLabel(BrandingResources.getString("productName"));
 
     private JLabel versionLabel = new JLabel(" "
             + System.getProperty("sip-communicator.version"));
@@ -17,51 +18,43 @@
     private JTextArea logoArea = new JTextArea(Resources
             .getString("logoMessage"));
 
-    private JEditorPane rightsArea = new JEditorPane();
+    private StyledHTMLEditorPane rightsArea = new StyledHTMLEditorPane();
 
-    private JEditorPane licenseArea = new JEditorPane();
+    private StyledHTMLEditorPane licenseArea = new StyledHTMLEditorPane();
 
     private JPanel textPanel = new JPanel();
 
     private static final Color DARK_BLUE = new Color(23, 65, 125);
 
-    private static final String FONT_NAME = "Verdana";
-
-    private static final String FONT_SIZE = "12";
-
-    private static final Font FONT = new Font(FONT_NAME, Font.PLAIN,
-            new Integer(FONT_SIZE).intValue());
-
     private JPanel loadingPanel = new JPanel(new BorderLayout());
 
-    private JLabel loadingLabel = new JLabel(Resources.getString("loading")
-            + ": ");
+    private JLabel loadingLabel = new JLabel(
+        Resources.getString("loading") + ": ");
 
     private JLabel bundleLabel = new JLabel();
 
     public WelcomeWindow()
     {
-        this.setTitle("SIP Communicator");
         this.setModal(false);
         this.setUndecorated(true);
 
         this.mainPanel.setLayout(new BorderLayout());
 
-        this.textPanel.setPreferredSize(new Dimension(470, 240));
+        this.textPanel.setPreferredSize(new Dimension(470, 280));
         this.textPanel.setLayout(new BoxLayout(textPanel, BoxLayout.Y_AXIS));
         this.textPanel
                 .setBorder(BorderFactory.createEmptyBorder(15, 15, 0, 15));
         this.textPanel.setOpaque(false);
 
-        this.titleLabel.setFont(FONT.deriveFont(Font.BOLD, 28));
+        this.titleLabel.setFont(Constants.FONT.deriveFont(Font.BOLD, 28));
         this.titleLabel.setForeground(DARK_BLUE);
         this.titleLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
 
-        this.versionLabel.setFont(FONT.deriveFont(Font.BOLD, 18));
+        this.versionLabel.setFont(Constants.FONT.deriveFont(Font.BOLD, 18));
         this.versionLabel.setForeground(Color.GRAY);
         this.versionLabel.setAlignmentX(Component.RIGHT_ALIGNMENT);
 
-        this.logoArea.setFont(FONT.deriveFont(Font.BOLD, 12));
+        this.logoArea.setFont(Constants.FONT.deriveFont(Font.BOLD, 12));
         this.logoArea.setForeground(DARK_BLUE);
         this.logoArea.setOpaque(false);
         this.logoArea.setLineWrap(true);
@@ -72,11 +65,11 @@
         this.logoArea.setBorder(BorderFactory.createEmptyBorder(20, 180, 0, 0));
 
         this.rightsArea.setContentType("text/html");
-        this.rightsArea.setText(Resources.getString("welcomeMessage",
+        this.rightsArea.appendToEnd(Resources.getString("welcomeMessage",
             new String[]{   BrandingResources.getString("productName"),
                             BrandingResources.getString("productWebSite")}));
 
-        this.rightsArea.setPreferredSize(new Dimension(50, 10));
+        this.rightsArea.setPreferredSize(new Dimension(50, 50));
         this.rightsArea
                 .setBorder(BorderFactory.createEmptyBorder(0, 180, 0, 0));
         this.rightsArea.setOpaque(false);
@@ -84,7 +77,7 @@
         this.rightsArea.setAlignmentX(Component.RIGHT_ALIGNMENT);
 
         this.licenseArea.setContentType("text/html");
-        this.licenseArea.setText(Resources.getString("license", new String[]
+        this.licenseArea.appendToEnd(Resources.getString("license", new String[]
         {
             "<a href=http://sip-communicator.org>"
                     + "http://sip-communicator.org</a>"
@@ -102,8 +95,8 @@
         this.loadingPanel.add(loadingLabel, BorderLayout.WEST);
         this.loadingPanel.add(bundleLabel, BorderLayout.CENTER);
         this.loadingPanel.setAlignmentX(Component.RIGHT_ALIGNMENT);
-        this.loadingPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10,
-                10));
+        this.loadingPanel.setBorder(
+            BorderFactory.createEmptyBorder(10, 10, 10, 10));
 
         this.textPanel.add(titleLabel);
         this.textPanel.add(versionLabel);

Modified: trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties&p2=trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/brandingResources.properties	2007-12-06 10:28:21+0000
@@ -1,2 +1,4 @@
 productName=SIP Communicator
-productWebSite=http://sip-communicator.org
\ No newline at end of file
+productWebSite=http://sip-communicator.org
+fontName=Verdana
+fontSize=12
\ No newline at end of file

Modified: trunk/src/net/java/sip/communicator/plugin/branding/resources.properties
Url: https://sip-communicator.dev.java.net/source/browse/sip-communicator/trunk/src/net/java/sip/communicator/plugin/branding/resources.properties?view=diff&rev=3293&p1=trunk/src/net/java/sip/communicator/plugin/branding/resources.properties&p2=trunk/src/net/java/sip/communicator/plugin/branding/resources.properties&r1=3292&r2=3293
==============================================================================
--- trunk/src/net/java/sip/communicator/plugin/branding/resources.properties	(original)
+++ trunk/src/net/java/sip/communicator/plugin/branding/resources.properties	2007-12-06 10:28:21+0000
@@ -1,11 +1,12 @@
-about=About
+aboutWindowTitle=About {0}
 logoMessage=Open Source VoIP & Instant Messaging
 loading=Loading
-menuEntry=About
+aboutMenuEntry=About
 ok=OK
-welcomeMessage=The {0} is currently under active development. \
+basedOn=based on
+welcomeMessage=<DIV id=\"message\">The {0} is currently under active development. \
                The version you are running is only experimental and MAY NOT \
-               work as expected. Please refer to {1} for more information.
+               work as expected. Please refer to {1} for more information.</DIV>
 copyright=<DIV id=\"message\"><font size=3>(c)2003-2007 Copyright \
           <b>sip-communicator.org</b>. All rights reserved. Visit \
           <a href="http://sip-communicator.org">http://sip-communicator.org</a>.\

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





More information about the commits mailing list