You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by ps...@apache.org on 2003/05/20 09:37:49 UTC

cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif ChainsawIcons.java

psmith      2003/05/20 00:37:49

  Modified:    src/java/org/apache/log4j/chainsaw ChainsawStatusBar.java
               src/java/org/apache/log4j/chainsaw/icons ChainsawIcons.java
  Added:       src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif
  Log:
  found a reasonably nice animated radio tower icon, gotta love Google.
  
  Sure beats plain text anyway.
  
  Revision  Changes    Path
  1.4       +14 -11    jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java
  
  Index: ChainsawStatusBar.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ChainsawStatusBar.java	20 May 2003 07:18:03 -0000	1.3
  +++ ChainsawStatusBar.java	20 May 2003 07:37:49 -0000	1.4
  @@ -49,6 +49,8 @@
   
   package org.apache.log4j.chainsaw;
   
  +import org.apache.log4j.chainsaw.icons.ChainsawIcons;
  +
   import java.awt.Dimension;
   import java.awt.FlowLayout;
   import java.awt.GridBagConstraints;
  @@ -56,6 +58,8 @@
   import java.awt.Insets;
   
   import javax.swing.BorderFactory;
  +import javax.swing.Icon;
  +import javax.swing.ImageIcon;
   import javax.swing.JLabel;
   import javax.swing.JPanel;
   import javax.swing.SwingUtilities;
  @@ -77,6 +81,8 @@
     private final JLabel receivedEventLabel = new JLabel("", JLabel.CENTER);
     private volatile long lastReceivedEvent = System.currentTimeMillis();
     private final Thread receiveThread;
  +  private final Icon radioTowerIcon =
  +    new ImageIcon(ChainsawIcons.ANIM_RADIO_TOWER);
   
     //  private final Border statusBarComponentBorder =
     //    BorderFactory.createEmptyBorder();
  @@ -107,8 +113,7 @@
         "Indicates whether Chainsaw is receiving events");
       receivedEventLabel.setPreferredSize(
         new Dimension(
  -        pausedLabel.getFontMetrics(receivedEventLabel.getFont()).stringWidth(
  -          "Receiving...") + 10,
  +        radioTowerIcon.getIconWidth() + 4,
           (int) receivedEventLabel.getPreferredSize().getHeight()));
   
       lineSelectionLabel.setBorder(statusBarComponentBorder);
  @@ -162,19 +167,17 @@
                 } catch (InterruptedException e) {
                 }
   
  -              String msg = "";
  -
  -              if ((System.currentTimeMillis() - lastReceivedEvent) < DELAY_PERIOD) {
  -                msg = "Receiving...";
  -              } else {
  -                msg = "";
  -              }
  +			  Icon icon = null;
  +              if (
  +                (System.currentTimeMillis() - lastReceivedEvent) < DELAY_PERIOD) {
  +                icon = radioTowerIcon;
  +              } 
   
  -              final String finalMsg = msg;
  +              final Icon theIcon = icon;
                 SwingUtilities.invokeLater(
                   new Runnable() {
                     public void run() {
  -                    receivedEventLabel.setText(finalMsg);
  +                  	receivedEventLabel.setIcon(theIcon);
                     }
                   });
               }
  
  
  
  1.10      +3 -0      jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java
  
  Index: ChainsawIcons.java
  ===================================================================
  RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- ChainsawIcons.java	15 May 2003 06:28:26 -0000	1.9
  +++ ChainsawIcons.java	20 May 2003 07:37:49 -0000	1.10
  @@ -25,5 +25,8 @@
     
     public static final URL WINDOW_ICON = ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/Zoom16.gif");
     public static final URL UNDOCKED_ICON = ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/ZoomIn16.gif");
  +  
  +//	TODO give appropriate Credit, http://members.aol.com/gx0vzs/radiotower.html
  +  public static final URL ANIM_RADIO_TOWER = ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/anim_radiotower.gif");
     private ChainsawIcons(){}
   }
  
  
  
  1.1                  jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/anim_radiotower.gif
  
  	<<Binary file>>
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif ChainsawIcons.java

Posted by Ceki Gülcü <ce...@qos.ch>.
Paul,

Following up on my own mail but these are the kind of details which
when not observed, can cause a project to be shut down. Just to
dissipate any misunderstandings before they appear, in no way did I
mean to depreciate the very hard work you invest in log4j.

At 10:27 AM 5/20/2003 +0200, you wrote:

>Paul,
>
>Please be extra careful when using external resources. Did you get the
>permission of Derek Gonfa <g0...@aol.com> before distributing his
>work?
>
>In short, without his explicit approval we cannot keep the gif file in CVS.
>
>
>At 07:37 AM 5/20/2003 +0000, you wrote:
>>psmith      2003/05/20 00:37:49
>>
>>   Modified:    src/java/org/apache/log4j/chainsaw ChainsawStatusBar.java
>>                src/java/org/apache/log4j/chainsaw/icons ChainsawIcons.java
>>   Added:       src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif
>>   Log:
>>   found a reasonably nice animated radio tower icon, gotta love Google.
>
>--
>Ceki  For log4j documentation consider "The complete log4j manual"
>       ISBN: 2970036908  http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org


Re: cvs commit: jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif ChainsawIcons.java

Posted by Ceki Gülcü <ce...@qos.ch>.
Paul,

Please be extra careful when using external resources. Did you get the
permission of Derek Gonfa <g0...@aol.com> before distributing his
work?

In short, without his explicit approval we cannot keep the gif file in CVS.


At 07:37 AM 5/20/2003 +0000, you wrote:
>psmith      2003/05/20 00:37:49
>
>   Modified:    src/java/org/apache/log4j/chainsaw ChainsawStatusBar.java
>                src/java/org/apache/log4j/chainsaw/icons ChainsawIcons.java
>   Added:       src/java/org/apache/log4j/chainsaw/icons anim_radiotower.gif
>   Log:
>   found a reasonably nice animated radio tower icon, gotta love Google.
>
>   Sure beats plain text anyway.
>
>   Revision  Changes    Path
>   1.4       +14 
> -11 
> jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java
>
>   Index: ChainsawStatusBar.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ChainsawStatusBar.java,v
>   retrieving revision 1.3
>   retrieving revision 1.4
>   diff -u -r1.3 -r1.4
>   --- ChainsawStatusBar.java    20 May 2003 07:18:03 -0000      1.3
>   +++ ChainsawStatusBar.java    20 May 2003 07:37:49 -0000      1.4
>   @@ -49,6 +49,8 @@
>
>    package org.apache.log4j.chainsaw;
>
>   +import org.apache.log4j.chainsaw.icons.ChainsawIcons;
>   +
>    import java.awt.Dimension;
>    import java.awt.FlowLayout;
>    import java.awt.GridBagConstraints;
>   @@ -56,6 +58,8 @@
>    import java.awt.Insets;
>
>    import javax.swing.BorderFactory;
>   +import javax.swing.Icon;
>   +import javax.swing.ImageIcon;
>    import javax.swing.JLabel;
>    import javax.swing.JPanel;
>    import javax.swing.SwingUtilities;
>   @@ -77,6 +81,8 @@
>      private final JLabel receivedEventLabel = new JLabel("", JLabel.CENTER);
>      private volatile long lastReceivedEvent = System.currentTimeMillis();
>      private final Thread receiveThread;
>   +  private final Icon radioTowerIcon =
>   +    new ImageIcon(ChainsawIcons.ANIM_RADIO_TOWER);
>
>      //  private final Border statusBarComponentBorder =
>      //    BorderFactory.createEmptyBorder();
>   @@ -107,8 +113,7 @@
>          "Indicates whether Chainsaw is receiving events");
>        receivedEventLabel.setPreferredSize(
>          new Dimension(
>   - 
> pausedLabel.getFontMetrics(receivedEventLabel.getFont()).stringWidth(
>   -          "Receiving...") + 10,
>   +        radioTowerIcon.getIconWidth() + 4,
>            (int) receivedEventLabel.getPreferredSize().getHeight()));
>
>        lineSelectionLabel.setBorder(statusBarComponentBorder);
>   @@ -162,19 +167,17 @@
>                  } catch (InterruptedException e) {
>                  }
>
>   -              String msg = "";
>   -
>   -              if ((System.currentTimeMillis() - lastReceivedEvent) < 
> DELAY_PERIOD) {
>   -                msg = "Receiving...";
>   -              } else {
>   -                msg = "";
>   -              }
>   +                       Icon icon = null;
>   +              if (
>   +                (System.currentTimeMillis() - lastReceivedEvent) < 
> DELAY_PERIOD) {
>   +                icon = radioTowerIcon;
>   +              }
>
>   -              final String finalMsg = msg;
>   +              final Icon theIcon = icon;
>                  SwingUtilities.invokeLater(
>                    new Runnable() {
>                      public void run() {
>   -                    receivedEventLabel.setText(finalMsg);
>   +                     receivedEventLabel.setIcon(theIcon);
>                      }
>                    });
>                }
>
>
>
>   1.10      +3 
> -0 
> jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java
>
>   Index: ChainsawIcons.java
>   ===================================================================
>   RCS file: 
> /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java,v
>   retrieving revision 1.9
>   retrieving revision 1.10
>   diff -u -r1.9 -r1.10
>   --- ChainsawIcons.java        15 May 2003 06:28:26 -0000      1.9
>   +++ ChainsawIcons.java        20 May 2003 07:37:49 -0000      1.10
>   @@ -25,5 +25,8 @@
>
>      public static final URL WINDOW_ICON = 
> ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/Zoom16.gif");
>      public static final URL UNDOCKED_ICON = 
> ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/ZoomIn16.gif");
>   +
>   +//   TODO give appropriate Credit, 
> http://members.aol.com/gx0vzs/radiotower.html
>   +  public static final URL ANIM_RADIO_TOWER = 
> ChainsawIcons.class.getClassLoader().getResource("org/apache/log4j/chainsaw/icons/anim_radiotower.gif");
>      private ChainsawIcons(){}
>    }
>
>
>
>   1.1 
> jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/anim_radiotower.gif
>
>         <<Binary file>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

--
Ceki  For log4j documentation consider "The complete log4j manual"
       ISBN: 2970036908  http://www.qos.ch/shop/products/clm_t.jsp 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-dev-help@jakarta.apache.org