1 package org.columba.core.gui.base; 19 20 import java.awt.Color ; 21 import java.awt.Component ; 22 import java.awt.Graphics ; 23 import java.awt.Graphics2D ; 24 25 import javax.swing.ImageIcon ; 26 27 28 public class DescendingIcon extends ImageIcon { 29 public DescendingIcon() { 30 super(); 31 } 32 33 public void paintIcon(Component c, Graphics g, int x, int y) { 34 Graphics2D g2 = (Graphics2D ) g; 35 36 int[] xp = new int[3]; 37 int[] yp = new int[3]; 38 39 xp[0] = x; 40 xp[1] = x + 10; 41 xp[2] = x + 5; 42 43 yp[0] = y + 2; 44 yp[1] = y + 2; 45 yp[2] = y - 4; 46 47 g2.setColor(Color.black); 48 g2.fillPolygon(xp, yp, 3); 49 50 58 } 59 } | Popular Tags |