1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4   
     5  import org.aswing.Component;
     6  import org.aswing.graphices.Graphics;
     7  import org.aswing.graphices.Pen;
     8  import org.aswing.plaf.basic.icon.FrameIcon;
     9  
    10  /**
    11   * @author iiley
    12   */
    13  class org.aswing.plaf.basic.icon.FrameCloseIcon extends FrameIcon {
    14  
    15  	/**
    16  	 * @param width the width of the icon square.
    17  	 */	
    18  	public function FrameCloseIcon(){
    19  		super(DEFAULT_ICON_WIDTH);
    20  	}
    21  	
    22  	public function paintIcon(com : Component, g : Graphics, x : Number, y : Number) : Void {
    23  		var w:Number = width/2;
    24  		g.drawLine(
    25  			new Pen(getColor(), w/3), 
    26  			x+(width-w)/2, y+(width-w)/2,
    27  			x+(width+w)/2, y+(width+w)/2);
    28  		g.drawLine(
    29  			new Pen(getColor(), w/3), 
    30  			x+(width-w)/2, y+(width+w)/2,
    31  			x+(width+w)/2, y+(width-w)/2);		
    32  	}
    33  }
    34