1  /*
     2   Copyright aswing.org, see the LICENCE.txt.
     3  */
     4  
     5  import org.aswing.*;
     6  import org.aswing.geom.*;
     7  
     8  /**
     9   * LayoutManager's empty implementation.
    10   * @author iiley
    11   */
    12  class org.aswing.EmptyLayout implements LayoutManager{
    13  	
    14  	public function EmptyLayout(){
    15  	}
    16  	
    17      /**
    18       * do nothing
    19       */
    20      public function addLayoutComponent(comp:Component, constraints:Object):Void{
    21      }
    22  
    23      /**
    24       * do nothing
    25       */
    26      public function removeLayoutComponent(comp:Component):Void{
    27      }
    28  	
    29  	/**
    30  	 * return target.getSize();
    31  	 */
    32      public function preferredLayoutSize(target:Container):Dimension{
    33      	return target.getSize();
    34      }
    35  
    36  	/**
    37  	 * new Dimension(0, 0);
    38  	 */
    39      public function minimumLayoutSize(target:Container):Dimension{
    40      	return new Dimension(0, 0);
    41      }
    42  	
    43  	/**
    44  	 * return new Dimension(Number.MAX_VALUE, Number.MAX_VALUE);
    45  	 */
    46      public function maximumLayoutSize(target:Container):Dimension{
    47      	return new Dimension(Number.MAX_VALUE, Number.MAX_VALUE);
    48      }
    49      
    50      /**
    51       * do nothing
    52       */
    53      public function layoutContainer(target:Container):Void{
    54      }
    55      
    56  	/**
    57  	 * return 0
    58  	 */
    59      public function getLayoutAlignmentX(target:Container):Number{
    60      	return 0;
    61      }
    62  
    63  	/**
    64  	 * return 0
    65  	 */
    66      public function getLayoutAlignmentY(target:Container):Number{
    67      	return 0;
    68      }
    69  
    70      /**
    71       * do nothing
    72       */
    73      public function invalidateLayout(target:Container):Void{
    74      }		
    75  }
    76