Bug 318835 Refactor data set editor pages' codes[27965]
Build Identifier: 20100702 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui.data/src/org/eclipse/birt/report/designer/data/ui/dataset/ResultSetPreviewPage.java
metaData = ( (DataSetEditor) this.getContainer( ) ).getCurrentItemModel( );
			if ( metaData != null )
				createColumns( metaData );
			insertRecords( );
		}
	}
	private void createColumns( DataSetViewData[] rsMd )
	{
		DataSetViewData[] columnsModel = rsMd;
		TableColumn column = null;
		TableLayout layout = new TableLayout( );
		for ( int n = 0; n < rsMd.length; n++ )
		{
			column = new TableColumn( resultSetTable, SWT.LEFT );
			column.setText( getColumnDisplayName( columnsModel, n ) );
			column.setResizable( true );
			layout.addColumnData( new ColumnPixelData( 120, true ) );
			addColumnSortListener( column, n );
			column.pack( );
		}
		resultSetTable.setLayout( layout );
		resultSetTable.layout( true );
	}
	private void insertRecords( )
	{
		resultSetTableViewer.setInput( recordList );
	}
	private String getColumnDisplayName( DataSetViewData[] columnsModel,
			int index )
	{