psmith      2003/09/01 20:36:20

  Modified:    src/java/org/apache/log4j/chainsaw ReceiversPanel.java
  Added:       src/java/org/apache/log4j/chainsaw CloseIcon.java
  Log:
  Moved out the CloseIcon into a separate class so other
  panels can share it.
  
  Revision  Changes    Path
  1.8       +0 -38     
jakarta-log4j/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java
  
  Index: ReceiversPanel.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-log4j/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ReceiversPanel.java       28 Aug 2003 23:55:42 -0000      1.7
  +++ ReceiversPanel.java       2 Sep 2003 03:36:20 -0000       1.8
  @@ -533,44 +533,6 @@
     }
   
     /**
  -   * A nice and simple 'X' style icon that is used to indicate a 'close' operation.
  -   *
  -   * @author Scott Deboy <[EMAIL PROTECTED]>
  -   *
  -   */
  -  class CloseIcon implements Icon {
  -    int size;
  -    int xOffSet;
  -    int yOffSet;
  -
  -    public CloseIcon(int size, int xOffSet, int yOffSet) {
  -      this.size = size;
  -      this.xOffSet = xOffSet;
  -      this.yOffSet = yOffSet;
  -    }
  -
  -    public int getIconHeight() {
  -      return size;
  -    }
  -
  -    public int getIconWidth() {
  -      return size;
  -    }
  -
  -    public void paintIcon(Component c, Graphics g, int x, int y) {
  -      Graphics2D g2D = (Graphics2D) g;
  -      g2D.setStroke(new BasicStroke(1.5f));
  -      g2D.setRenderingHint(
  -        RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
  -      g2D.setColor(Color.black);
  -      g2D.drawLine(
  -        x + xOffSet, y + yOffSet, x + size + xOffSet, y + size + yOffSet);
  -      g2D.drawLine(
  -        x + xOffSet, y + size + yOffSet, x + size + xOffSet, y + yOffSet);
  -    }
  -  }
  -
  -  /**
      * A popup menu that allows the user to choose which
      * style of Receiver to create, which spawns a relevant Dialog
      * to enter the information and create the Receiver
  
  
  
  1.1                  jakarta-log4j/src/java/org/apache/log4j/chainsaw/CloseIcon.java
  
  Index: CloseIcon.java
  ===================================================================
  /*
   * Created on 2/09/2003
   *
   * To change the template for this generated file go to
   * Window - Preferences - Java - Code Generation - Code and Comments
   */
  package org.apache.log4j.chainsaw;
  
  import java.awt.BasicStroke;
  import java.awt.Color;
  import java.awt.Component;
  import java.awt.Graphics;
  import java.awt.Graphics2D;
  import java.awt.RenderingHints;
  
  import javax.swing.Icon;
  
  
  /**
     * A nice and simple 'X' style icon that is used to indicate a 'close' operation.
     *
     * @author Scott Deboy <[EMAIL PROTECTED]>
     *
     */
    class CloseIcon implements Icon {
      int size;
      int xOffSet;
      int yOffSet;
  
      public CloseIcon(int size, int xOffSet, int yOffSet) {
        this.size = size;
        this.xOffSet = xOffSet;
        this.yOffSet = yOffSet;
      }
  
      public int getIconHeight() {
        return size;
      }
  
      public int getIconWidth() {
        return size;
      }
  
      public void paintIcon(Component c, Graphics g, int x, int y) {
        Graphics2D g2D = (Graphics2D) g;
        g2D.setStroke(new BasicStroke(1.5f));
        g2D.setRenderingHint(
          RenderingHints.KEY_STROKE_CONTROL, RenderingHints.VALUE_STROKE_PURE);
        g2D.setColor(Color.black);
        g2D.drawLine(
          x + xOffSet, y + yOffSet, x + size + xOffSet, y + size + yOffSet);
        g2D.drawLine(
          x + xOffSet, y + size + yOffSet, x + size + xOffSet, y + yOffSet);
      }
    }
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to