| /** |
| * 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.vaadin.databinding.values; |
| |
| import org.eclipse.core.databinding.observable.IObservable; |
| import org.eclipse.core.databinding.observable.IObserving; |
| import org.eclipse.core.databinding.observable.list.DecoratingObservableList; |
| import org.eclipse.core.databinding.observable.list.IObservableList; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * The Class VaadinObservableListDecorator. |
| */ |
| public class VaadinObservableListDecorator extends DecoratingObservableList |
| implements IVaadinObservableList { |
| |
| /** |
| * Instantiates a new vaadin observable list decorator. |
| * |
| * @param decorated |
| * the decorated |
| */ |
| public VaadinObservableListDecorator(IObservableList decorated) { |
| super(decorated, true); |
| } |
| |
| /** |
| * Gets the observed. |
| * |
| * @return the observed |
| */ |
| public Object getObserved() { |
| IObservable decorated = getDecorated(); |
| if (decorated instanceof IObserving) { |
| return ((IObserving) decorated).getObserved(); |
| } |
| return null; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.osbp.runtime.web.vaadin.databinding.values.IVaadinObservableList#getSource() |
| */ |
| @Override |
| public Object getSource() { |
| return getObserved(); |
| } |
| |
| } |