/*
 * 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.core.layout;

import org.maskat.core.AbstractMaskatElement;

public abstract class AbstractLayoutElement extends AbstractMaskatElement
		implements LayoutElement {

	/*
	 * (non-Javadoc)
	 * 
	 * @see org.maskat.core.layout.LayoutElement#getLayout()
	 */
	public Layout getLayout() {
		if (getParent() instanceof LayoutElement) {
			return ((LayoutElement) getParent()).getLayout();
		}
		return null;
	}

}
