1 19 24 25 package org.netbeans.swing.plaf.metal; 26 27 import javax.swing.*; 28 import javax.swing.border.AbstractBorder ; 29 import java.awt.*; 30 31 35 class MetalScrollPaneBorder extends AbstractBorder { 36 37 private static final Insets insets = new Insets(1, 1, 2, 2); 38 39 public void paintBorder(Component c, Graphics g, int x, int y, 40 int w, int h) { 41 g.translate(x, y); 42 43 Color color = UIManager.getColor("controlShadow"); 44 g.setColor(color == null ? Color.darkGray : color); 45 g.drawRect(0, 0, w-2, h-2); 46 color = UIManager.getColor("controlHighlight"); 47 g.setColor(color == null ? Color.white : color); 48 g.drawLine(w-1, 1, w-1, h-1); 49 g.drawLine(1, h-1, w-1, h-1); 50 51 g.translate(-x, -y); 52 } 53 54 public Insets getBorderInsets(Component c) { 55 return insets; 56 } 57 } 58 | Popular Tags |