home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 139 / dpcs0999.iso / Web / CFserver / data1.cab / Java / CFJava.cab / CFJavaRuntime.cab / netscape / application / BrokenImageAttachment.class (.txt) < prev    next >
Encoding:
Java Class File  |  1998-10-01  |  1.1 KB  |  28 lines

  1. package netscape.application;
  2.  
  3. class BrokenImageAttachment extends TextAttachment {
  4.    private static int WIDTH = 32;
  5.    private static int HEIGHT = 32;
  6.  
  7.    public int width() {
  8.       return WIDTH;
  9.    }
  10.  
  11.    public int height() {
  12.       return HEIGHT;
  13.    }
  14.  
  15.    public void drawInRect(Graphics var1, Rect var2) {
  16.       new Rect();
  17.       if (var1 != null && var2 != null) {
  18.          var1.setColor(Color.lightGray);
  19.          var1.fillRect(var2);
  20.          var1.setColor(Color.black);
  21.          var1.fillRect(var2.x, var2.y, var2.width, 1);
  22.          var1.fillRect(var2.x + var2.width - 1, var2.y, 1, var2.height);
  23.          var1.fillRect(var2.x, var2.y, 1, var2.height);
  24.          var1.fillRect(var2.x, var2.y + var2.height - 1, var2.width, 1);
  25.       }
  26.    }
  27. }
  28.