1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4  
     5  import org.aswing.border.Border;
     6  import org.aswing.border.DecorateBorder;
     7  import org.aswing.Component;
     8  import org.aswing.geom.Rectangle;
     9  import org.aswing.Insets;
    10  
    11  /**
    12   * EmptyBorder not draw any graphics, only use to hold a blank space around component.
    13   * @author iiley
    14   */
    15  class org.aswing.border.EmptyBorder extends DecorateBorder{
    16  	private var insets:Insets;
    17  	
    18  	public function EmptyBorder(interior:Border, insets:Insets){
    19  		super(interior);
    20  		this.insets = new Insets();
    21  		this.insets.addInsets(insets);
    22  	}
    23  	
    24      public function getBorderInsetsImp(c:Component, bounds:Rectangle):Insets{
    25      	return getInsets();
    26      }
    27      
    28  	public function getInsets():Insets {
    29  		return new Insets(insets.top, insets.left, insets.bottom, insets.right);
    30  	}
    31  
    32  	public function setInsets(insets:Insets):Void {
    33  		this.insets = new Insets(insets.top, insets.left, insets.bottom, insets.right);
    34  	}    
    35  }
    36