home *** CD-ROM | disk | FTP | other *** search
/ CD/PC Actual Thematic 7: Programming / CDAT7.iso / demos / VisualAge for Java 2.0 Entry / setup / data1.cab / ide-e / IDE / cache / U2U729 (.txt) < prev    next >
Encoding:
Java Class File  |  1998-09-16  |  1.7 KB  |  54 lines

  1. package com.sun.java.swing.plaf.metal;
  2.  
  3. import com.sun.java.swing.Icon;
  4. import com.sun.java.swing.plaf.UIResource;
  5. import java.awt.Component;
  6. import java.awt.Graphics;
  7. import java.io.Serializable;
  8.  
  9. class MetalIconFactory$FileChooserListViewIcon implements Icon, UIResource, Serializable {
  10.    public void paintIcon(Component c, Graphics g, int x, int y) {
  11.       g.translate(x, y);
  12.       g.setColor(MetalLookAndFeel.getPrimaryControlInfo());
  13.       g.drawLine(2, 2, 5, 2);
  14.       g.drawLine(2, 3, 2, 7);
  15.       g.drawLine(3, 7, 6, 7);
  16.       g.drawLine(6, 6, 6, 3);
  17.       g.drawLine(10, 2, 13, 2);
  18.       g.drawLine(10, 3, 10, 7);
  19.       g.drawLine(11, 7, 14, 7);
  20.       g.drawLine(14, 6, 14, 3);
  21.       g.drawLine(2, 10, 5, 10);
  22.       g.drawLine(2, 11, 2, 15);
  23.       g.drawLine(3, 15, 6, 15);
  24.       g.drawLine(6, 14, 6, 11);
  25.       g.drawLine(10, 10, 13, 10);
  26.       g.drawLine(10, 11, 10, 15);
  27.       g.drawLine(11, 15, 14, 15);
  28.       g.drawLine(14, 14, 14, 11);
  29.       g.drawLine(8, 5, 8, 5);
  30.       g.drawLine(16, 5, 16, 5);
  31.       g.drawLine(8, 13, 8, 13);
  32.       g.drawLine(16, 13, 16, 13);
  33.       g.setColor(MetalLookAndFeel.getPrimaryControl());
  34.       g.drawRect(3, 3, 2, 3);
  35.       g.drawRect(11, 3, 2, 3);
  36.       g.drawRect(3, 11, 2, 3);
  37.       g.drawRect(11, 11, 2, 3);
  38.       g.setColor(MetalLookAndFeel.getPrimaryControlHighlight());
  39.       g.drawLine(4, 4, 4, 5);
  40.       g.drawLine(12, 4, 12, 5);
  41.       g.drawLine(4, 12, 4, 13);
  42.       g.drawLine(12, 12, 12, 13);
  43.       g.translate(-x, -y);
  44.    }
  45.  
  46.    public int getIconWidth() {
  47.       return 18;
  48.    }
  49.  
  50.    public int getIconHeight() {
  51.       return 18;
  52.    }
  53. }
  54.