code: public void setPattern(final ConwayPattern pattern) {
          final boolean[][] gridData = pattern.getPattern();
          int gridWidth = gridData[0].length;
          int gridHeight = gridData.length;
  
          int columnOffset = 0;
          int rowOffset = 0;
  
          if ( gridWidth > getNumberOfColumns() ) {
              gridWidth = getNumberOfColumns();
          } else {
              columnOffset = (getNumberOfColumns() - gridWidth) / 2;
          }
  
          if ( gridHeight > getNumberOfRows() ) {
              gridHeight = getNumberOfRows();
          } else {
              rowOffset = (getNumberOfRows() - gridHeight) / 2;
          }
  
          this.delegate.killAll();
  
          for ( int column = 0; column < gridWidth; column++ ) {
              for ( int row = 0; row < gridHeight; row++ ) {
                  if ( gridData[row][column] ) {
                      final Cell cell = getCellAt( row + rowOffset,
                                                   column + columnOffset );
                      updateCell( cell, CellState.LIVE );
                  }
              }
          }
  
          //this.delegate.setPattern();
      }
docs: /* (non-Javadoc)
  @see org.drools.examples.conway.CellGrid#setPattern(org.drools.examples.conway.patterns.ConwayPattern)