/*
 * Copyright (c) 2006-2008 Maskat Project.
 *
 * 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:
 *     Maskat Project - initial API and implementation
 */
package org.maskat.ui.editors.layout.models;

//import java.beans.PropertyChangeListener;
//import java.beans.PropertyChangeSupport;
//
//import org.maskat.core.layout.StructuredComponent;
import org.maskat.core.layout.StructuredComponent;
import org.maskat.core.layout.TabItem;

public class TabDef implements ModelWrapper {

	private TabItem tabItem;
	
	public TabDef(TabItem item) {
		tabItem = item;
	}
	
	public Object getModel() {
		return tabItem;
	}
	
	public void setModel(Object item) {
		tabItem = (TabItem) item;
	}
	
	public String getName() {
		return tabItem.getName();
	}

	public void setName(String name) {
		tabItem.setName(name);
	}

	public StructuredComponent getParent() {
		return (StructuredComponent) tabItem.getParent();
	}
	
	public void setParent(StructuredComponent parent) {
		tabItem.setParent(parent);
	}
	
	public String getTitle() {
		return tabItem.getTitle();
	}
	
	public void setTitle(String title) {
		tabItem.setTitle(title);
	}

	
//	private StructuredComponent parent;
//
//	private TabItem tabItemDef;

//	// モデルの状態変化を通知するリスナのリスト
//	private PropertyChangeSupport listeners = new PropertyChangeSupport(this);
//
//	public TabDef(StructuredComponent parent, TabItem tabItemDef) {
//		this.parent = parent;
//		this.tabItemDef = tabItemDef;
//	}
//
//	public String getName() {
//		return tabItemDef.getName();
//	}
//
//	public void setName(String name) {
//		tabItemDef.setName(name);
//	}
//
//	public StructuredComponent getParent() {
//		return parent;
//	}
//
//	public void setParent(StructuredComponent parent) {
//		this.parent = parent;
//	}
//
//	public String getTitle() {
//		return tabItemDef.getTitle();
//	}
//
//	public void setTitle(String title) {
//		tabItemDef.setTitle(title);
//		firePropertyChange("title", "", title);
//	}
//
//	public void addPropertyChangeListener(PropertyChangeListener l) {
//		listeners.addPropertyChangeListener(l);
//	}
//
//	protected void firePropertyChange(String propName, Object oldValue, Object newValue) {
//		listeners.firePropertyChange(propName, oldValue, newValue);
//	}
//
//	public void removePropertyChangeListener(PropertyChangeListener l) {
//		listeners.removePropertyChangeListener(l);
//	}
//
//	public TabItem getTabItemDef() {
//		return tabItemDef;
//	}
}
