1 19 20 package com.izforge.izpack.gui; 21 22 import java.awt.Component ; 23 import java.awt.Graphics ; 24 25 import javax.swing.border.EtchedBorder ; 26 27 32 public class EtchedLineBorder extends EtchedBorder 33 { 34 35 private static final long serialVersionUID = 3256999956257649201L; 36 37 47 public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) 48 { 49 g.translate(x, y); 50 51 g.setColor(etchType == LOWERED ? getShadowColor(c) : getHighlightColor(c)); 52 g.drawLine(10, 0, width - 2, 0); 53 54 g.setColor(etchType == LOWERED ? getHighlightColor(c) : getShadowColor(c)); 55 g.drawLine(10, 1, width - 2, 1); 56 57 g.translate(0 - x, 0 - y); 58 } 59 } 60 | Popular Tags |