JAL-1645 Version-Rel Version 2.9 Year-Rel 2015 Licensing glob
[jalview.git] / src / jalview / gui / BlogReader.java
index 759b600..5baed16 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * Jalview - A Sequence Alignment Editor and Viewer (Version 2.8.2)
- * Copyright (C) 2014 The Jalview Authors
+ * Jalview - A Sequence Alignment Editor and Viewer (Version 2.9)
+ * Copyright (C) 2015 The Jalview Authors
  * 
  * This file is part of Jalview.
  * 
@@ -25,10 +25,10 @@ import jalview.util.MessageManager;
 
 import java.awt.BorderLayout;
 import java.awt.Component;
+import java.awt.Dialog.ModalExclusionType;
 import java.awt.Dimension;
 import java.awt.Font;
 import java.awt.Rectangle;
-import java.awt.Dialog.ModalExclusionType;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.KeyEvent;
@@ -198,7 +198,7 @@ public class BlogReader extends JPanel
       {
         if (parent != null)
         {
-          Cache.log.info("News window closed.");
+          Cache.log.debug("News window closed.");
           jd = null;
           parent.showNews(false);
         }
@@ -246,7 +246,7 @@ public class BlogReader extends JPanel
 
   public BlogReader(Desktop desktop)
   {
-    Cache.log.info("Constructing news reader.");
+    Cache.log.debug("Constructing news reader.");
 
     parent = desktop;
     _channelModel = new ChannelListModel();
@@ -275,10 +275,10 @@ public class BlogReader extends JPanel
     if (setvisible)
     {
 
-      Cache.log.info("Will show jalview news automatically");
+      Cache.log.debug("Will show jalview news automatically");
       showNews();
     }
-    Cache.log.info("Completed construction of reader.");
+    Cache.log.debug("Completed construction of reader.");
 
   }
 
@@ -331,10 +331,11 @@ public class BlogReader extends JPanel
         {
           createDialog();
           bounds = new Rectangle(5, 5, 550, 350);
-          jd.initDialogFrame(me, false, false, "News from www.jalview.org",
+          jd.initDialogFrame(me, false, false,
+                  MessageManager.getString("label.news_from_jalview"),
                   bounds.width, bounds.height);
           jd.frame.setModalExclusionType(ModalExclusionType.NO_EXCLUDE);
-          Cache.log.info("Displaying news.");
+          Cache.log.debug("Displaying news.");
           jd.waitForInput();
         }
       }
@@ -421,7 +422,7 @@ public class BlogReader extends JPanel
       {
         jalview.bin.Cache.setDateProperty("JALVIEW_NEWS_RSS_LASTMODIFIED",
                 lastDate);
-        jalview.bin.Cache.log.info("Saved last read date as "
+        jalview.bin.Cache.log.debug("Saved last read date as "
                 + jalview.bin.Cache.date_format.format(lastDate));
 
       }
@@ -440,7 +441,9 @@ public class BlogReader extends JPanel
     topBottomSplitPane.setBottomComponent(bottomPanel);
     JScrollPane spTextDescription = new JScrollPane(textDescription);
     textDescription.setText("");
-    statusBar.setText(MessageManager.getString("label.status"));
+    statusBar.setText(new StringBuffer("[")
+            .append(MessageManager.getString("label.status")).append("]")
+            .toString());
     buttonRefresh.addActionListener(new ActionListener()
     {
 
@@ -758,16 +761,16 @@ public class BlogReader extends JPanel
               + jalview.bin.Cache.date_format.format(lastread.getTime()));
       if (me.isNewsNew())
       {
-        Cache.log.info("There is news to read.");
+        Cache.log.debug("There is news to read.");
       }
       else
       {
-        Cache.log.info("There is no new news.");
+        Cache.log.debug("There is no new news.");
         me.xf.setTitle("Testing : Last read is " + me.lastDate);
         me.showNews();
         me.xf.toFront();
       }
-      Cache.log.info("Waiting for closure.");
+      Cache.log.debug("Waiting for closure.");
       do
       {
         try
@@ -781,11 +784,11 @@ public class BlogReader extends JPanel
 
       if (me.isNewsNew())
       {
-        Cache.log.info("Still new news after reader displayed.");
+        Cache.log.debug("Still new news after reader displayed.");
       }
       if (lastread.getTime().before(me.lastDate))
       {
-        Cache.log.info("The news was read.");
+        Cache.log.debug("The news was read.");
         lastread.setTime(me.lastDate);
       }
       else
@@ -816,7 +819,13 @@ class ChannelsRenderer extends DefaultListCellRenderer
     if (value instanceof Channel)
     {
       Channel channel = (Channel) value;
-      component.setText(MessageManager.formatMessage("label.channel_title_item_count", new String[]{channel.getTitle(),Integer.valueOf(channel.getUnreadItemCount()).toString()}));
+      component
+              .setText(MessageManager.formatMessage(
+                      "label.channel_title_item_count",
+                      new String[] {
+                          channel.getTitle(),
+                          Integer.valueOf(channel.getUnreadItemCount())
+                                  .toString() }));
       component.setToolTipText(channel.getURL());
     }
     return component;
@@ -839,7 +848,14 @@ class ItemsRenderer extends DefaultListCellRenderer
       Item item = (Item) value;
       if (item.getPublishDate() != null)
       {
-        component.setText(MessageManager.formatMessage("label.blog_item_published_on_date", new String[]{DateFormat.getDateInstance(DateFormat.LONG, MessageManager.getLocale()).format(item.getPublishDate()).toString(),item.getTitle()}));
+        component.setText(MessageManager.formatMessage(
+                "label.blog_item_published_on_date",
+                new String[] {
+                    DateFormat
+                            .getDateInstance(DateFormat.LONG,
+                                    MessageManager.getLocale())
+                            .format(item.getPublishDate()).toString(),
+                    item.getTitle() }));
       }
       component.setToolTipText(item.getLink());
       if (!item.isRead())