/*******************************************************************************
 * Copyright (c) 2004 Actuate Corporation.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *  Actuate Corporation  - initial API and implementation
 *******************************************************************************/

package org.eclipse.birt.report.designer.internal.ui.views.attributes.page;

import org.eclipse.birt.report.model.api.ReportItemHandle;
import org.eclipse.birt.report.model.api.StyleHandle;
import org.eclipse.birt.report.model.api.elements.ReportDesignConstants;
import org.eclipse.swt.widgets.Composite;

/**
 * The general attribute page of ListItem element.
 */
public class ListPage extends GeneralPage
{

	/**
	 * Constructor
	 * 
	 * @param parent
	 *            A widget which will be the parent of the new instance (cannot
	 *            be null)
	 * @param style
	 *            The style of widget to construct
	 */
	public ListPage( Composite parent, int style )
	{
		super( parent, style );
	}

//	/*
//	 * (non-Javadoc)
//	 * 
//	 * @see org.eclipse.birt.report.designer.internal.ui.views.attributes.page.AttributePage#buildUI()
//	 */
//	protected void buildUI( )
//	{
//		setLayout( WidgetUtil.createGridLayout( 6 ) );
//
//		WidgetUtil.buildGridControl( this,
//				propertiesMap,
//				ReportDesignConstants.LIST_ITEM,
//				ReportItemHandle.NAME_PROP,
//				2,
//				false );
//		
//		WidgetUtil.createGridPlaceholder( this, 3, true );
//		WidgetUtil.createHorizontalLine(this,6);
//		
//		WidgetUtil.buildGridControl( this,
//				propertiesMap,
//				ReportDesignConstants.REPORT_ITEM,
//				ReportItemHandle.STYLE_PROP,
//				1,
//				false );
//		
//		WidgetUtil.buildGridControl( this,
//				propertiesMap,
//				ReportDesignConstants.STYLE_ELEMENT,
//				StyleHandle.BACKGROUND_COLOR_PROP,
//				1,
//				false );
//
//		WidgetUtil.createGridPlaceholder( this, 2, true );
//
//	}
	
	protected void buildUI( )
	{
		setContentLayout( WidgetUtil.createGridLayout( 6 ) );
		super.buildUI( );
	}
	


	void buildContent( Composite content )
	{
		
		WidgetUtil.buildGridControl( content,
				propertiesMap,
				ReportDesignConstants.LIST_ITEM,
				ReportItemHandle.NAME_PROP,
				1,
				false );

		WidgetUtil.createGridPlaceholder( content, 3, true );
		WidgetUtil.createHorizontalLine( content, 6 );
		
		WidgetUtil.buildGridControl( content,
				propertiesMap,
				ReportDesignConstants.REPORT_ITEM,
				ReportItemHandle.STYLE_PROP,
				1,
				false );
		
		WidgetUtil.buildGridControl( content,
				propertiesMap,
				ReportDesignConstants.STYLE_ELEMENT,
				StyleHandle.BACKGROUND_COLOR_PROP,
				1,
				false );

		WidgetUtil.createGridPlaceholder( content, 2, true );

	}

}