public void addLayoutCallback(LayoutCallback callback){
  if (callback == null) {
    throw new NullPointerException();
  }
  if (callbackList == null) {
    callbackList=new ArrayList<LayoutCallback>(1);
  }
  callbackList.add(callback);
  grid=null;
}

public void addLayoutCallback ( LayoutCallback callback ) { if ( callback == null ) { throw new NullPointerException ( ) ; } if ( callbackList == null ) { callbackList = new ArrayList < LayoutCallback > ( 1 ) ; } callbackList . add ( callback ) ; grid = null ; }
adds the callback function that will be called at different stages of the layout cylce .
