1 19 24 25 package org.netbeans.swing.plaf.winclassic; 26 27 import javax.swing.*; 28 import javax.swing.border.Border ; 29 import java.awt.*; 30 31 35 public class WinClassicTabBorder implements Border { 36 37 private static final Insets insets = new Insets(1, 1, 0, 1); 38 39 public Insets getBorderInsets(Component c) { 40 return insets; 41 } 42 43 public boolean isBorderOpaque() { 44 return true; 45 } 46 47 public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { 48 g.translate(x, y); 49 g.setColor(UIManager.getColor("InternalFrame.borderShadow")); g.drawLine(0, 0, width - 2, 0); 51 g.drawLine(0, 1, 0, height - 1); 52 g.setColor(UIManager.getColor("InternalFrame.borderHighlight")); g.drawLine(width - 1, 0, width - 1, height - 1); 54 g.translate(-x, -y); 55 } 56 } 57 | Popular Tags |