/* D-RexGxt - D-RexGxt - GUI Design Tool for GWT
 * Copyright (c) 2008,  KPS Corporation
 * All rights reserved.
 *
 * Open Source License
 * ------------------------------------------------------------------------------------------
 * D-RexGxt is licensed under the terms of the Open Source GPL 3.0 license.
 *
 * http://www.gnu.org/licenses/gpl.html
 *
 * --
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * General Public License for more details.
 */
package jp.co.kpscorp.gwt.client.design.gxt.widget;

import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
import com.extjs.gxt.ui.client.widget.Component;
import com.extjs.gxt.ui.client.widget.grid.CellEditor;
import com.extjs.gxt.ui.client.widget.grid.ColumnConfig;
import com.extjs.gxt.ui.client.widget.grid.GridCellRenderer;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.i18n.client.NumberFormat;

public class ColumnConfigWidget extends ConfigWidget {
	private ColumnConfig data;

	private ColumnModelWidget model;

	public ColumnConfigWidget(ColumnConfig data, ColumnModelWidget parent) {
		super();
		this.data = data;
		this.model = parent;
	}

	public HorizontalAlignment getAlignment() {
		return data.getAlignment();
	}

	public String getDataIndex() {
		return data.getDataIndex();
	}

	public DateTimeFormat getDateTimeFormat() {
		return data.getDateTimeFormat();
	}

	public CellEditor getEditor() {
		return data.getEditor();
	}

	public boolean getFiresEvents() {
		return data.getFiresEvents();
	}

	public String getHeader() {
		return data.getHeader();
	}

	public String getId() {
		return data.getId();
	}

	public NumberFormat getNumberFormat() {
		return data.getNumberFormat();
	}

	public GridCellRenderer getRenderer() {
		return data.getRenderer();
	}

	public String getStyle() {
		return data.getStyle();
	}

	public int getWidth() {
		return data.getWidth();
	}

	public boolean isFixed() {
		return data.isFixed();
	}

	public boolean isGroupable() {
		return data.isGroupable();
	}

	public boolean isHidden() {
		return data.isHidden();
	}

	public boolean isMenuDisabled() {
		return data.isMenuDisabled();
	}

	public boolean isResizable() {
		return data.isResizable();
	}

	public boolean isSortable() {
		return data.isSortable();
	}

	public void setAlignment(HorizontalAlignment alignment) {
		data.setAlignment(alignment);
	}

	public void setDataIndex(String dataIndex) {
		data.setDataIndex(dataIndex);
	}

	public void setDateTimeFormat(DateTimeFormat dateTimeFormat) {
		data.setDateTimeFormat(dateTimeFormat);
	}

	public void setEditor(CellEditor editor) {
		data.setEditor(editor);
	}

	public void setFiresEvents(boolean firesEvents) {
		data.setFiresEvents(firesEvents);
	}

	public void setFixed(boolean fixed) {
		data.setFixed(fixed);
	}

	public void setGroupable(boolean groupable) {
		data.setGroupable(groupable);
	}

	public void setHeader(String header) {
		data.setHeader(header);
	}

	public void setHidden(boolean hidden) {
		data.setHidden(hidden);
	}

	public void setId(String id) {
		data.setId(id);
	}

	public void setMenuDisabled(boolean menuDisabled) {
		data.setMenuDisabled(menuDisabled);
	}

	public void setNumberFormat(NumberFormat format) {
		data.setNumberFormat(format);
	}

	public void setRenderer(GridCellRenderer renderer) {
		data.setRenderer(renderer);
	}

	public void setResizable(boolean resizable) {
		data.setResizable(resizable);
	}

	public void setSortable(boolean sortable) {
		data.setSortable(sortable);
	}

	public void setStyle(String style) {
		data.setStyle(style);
	}

	public void setWidth(int width) {
		data.setWidth(width);
	}

	public Component getParent() {
		return model;
	}

	public ColumnConfig getWrapConfig() {
		return data;
	}

	public void setParent(ColumnModelWidget model) {
		this.model = model;
	}

}
