| /** |
| * Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany) |
| * 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: |
| * Florian Pirchner - Initial implementation |
| */ |
| package org.eclipse.osbp.runtime.web.ecview.presentation.vaadin.common; |
| |
| import java.util.ArrayList; |
| import java.util.Collections; |
| import java.util.List; |
| |
| import org.eclipse.osbp.ecview.core.common.context.IViewContext; |
| import org.eclipse.osbp.ecview.core.common.presentation.ILayoutPresentation; |
| import org.eclipse.osbp.ecview.core.extension.model.extension.YTabSheet; |
| import org.eclipse.osbp.ecview.core.ui.core.editparts.extension.ITabEditpart; |
| import org.eclipse.osbp.ecview.core.ui.core.editparts.extension.ITabSheetEditpart; |
| import org.eclipse.osbp.ecview.core.ui.core.editparts.extension.presentation.ITabSheetPresentation; |
| |
| import com.vaadin.ui.ComponentContainer; |
| |
| /** |
| * An abstract base class implementing {@link ILayoutPresentation}. |
| */ |
| public abstract class AbstractTabSheetPresenter<A extends ComponentContainer> |
| extends AbstractVaadinWidgetPresenter<A> implements |
| ITabSheetPresentation<A> { |
| |
| public AbstractTabSheetPresenter(ITabSheetEditpart editpart) { |
| super(editpart); |
| } |
| |
| /** |
| * Returns the editpart the presenter will render for. |
| * |
| * @return the editpart |
| */ |
| protected ITabSheetEditpart getEditpart() { |
| return (ITabSheetEditpart) super.getEditpart(); |
| } |
| |
| @Override |
| public YTabSheet getModel() { |
| return (YTabSheet) getEditpart().getModel(); |
| } |
| } |