Bug 316568 Refactor data set editor pages' codes[26849]
Build Identifier: 20100610 Refactor data set editor pages' codes. Reproducible: Always
UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/data/ui/util/Utility.java
* 
	 * @return the layout created
	 */
	public static GridLayout createGridLayoutWithoutMargin( )
	{
		GridLayout layout = new GridLayout( );
		layout.marginHeight = layout.marginWidth = 0;
		return layout;
	}
	
	public static String getExpression( Object element )
	{
		if ( element instanceof DataSetViewData )
		{
			String colName = ( (DataSetViewData) element ).getAlias( );
			if ( colName == null || colName.trim( ).length( ) == 0 )
			{
				colName = ( (DataSetViewData) element ).getName( );
			}
			return getColumnExpression( colName );
		}
		return null;
	}
	
	/**
	 * Create a row expression base on a binding column name.
	 * 
	 * @param columnName
	 *            the column name
	 * @return the expression, or null if the column name is blank.