| /** |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * Contributors: |
| * Florian Pirchner - Initial implementation |
| */ |
| |
| package org.eclipse.osbp.runtime.web.vaadin.databinding.properties; |
| |
| import org.eclipse.core.databinding.observable.Realm; |
| import org.eclipse.core.databinding.observable.list.IObservableList; |
| import org.eclipse.core.databinding.observable.masterdetail.IObservableFactory; |
| import org.eclipse.core.databinding.observable.value.IObservableValue; |
| import org.eclipse.core.databinding.property.list.IListProperty; |
| import org.eclipse.core.databinding.property.list.ListProperty; |
| import org.eclipse.osbp.runtime.web.vaadin.databinding.values.IVaadinObservableList; |
| import org.eclipse.osbp.runtime.web.vaadin.databinding.values.VaadinObservableListDecorator; |
| |
| // TODO: Auto-generated Javadoc |
| /** |
| * The Class VaadinListPropertyDecorator. |
| */ |
| public class VaadinListPropertyDecorator extends ListProperty implements |
| IVaadinListProperty { |
| |
| /** The delegate. */ |
| private final IListProperty delegate; |
| |
| /** |
| * Instantiates a new vaadin list property decorator. |
| * |
| * @param delegate |
| * the delegate |
| */ |
| public VaadinListPropertyDecorator(IListProperty delegate) { |
| this.delegate = delegate; |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.IListProperty#getElementType() |
| */ |
| public Object getElementType() { |
| return delegate.getElementType(); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.ListProperty#observe(java.lang.Object) |
| */ |
| @Override |
| public IVaadinObservableList observe(Object source) { |
| return new VaadinObservableListDecorator(delegate.observe(source)); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.IListProperty#observe(org.eclipse.core.databinding.observable.Realm, java.lang.Object) |
| */ |
| public IObservableList observe(Realm realm, Object source) { |
| return new VaadinObservableListDecorator( |
| delegate.observe(realm, source)); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.ListProperty#listFactory() |
| */ |
| @Override |
| public IObservableFactory listFactory() { |
| return delegate.listFactory(); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.ListProperty#listFactory(org.eclipse.core.databinding.observable.Realm) |
| */ |
| @Override |
| public IObservableFactory listFactory(Realm realm) { |
| return delegate.listFactory(realm); |
| } |
| |
| /* (non-Javadoc) |
| * @see org.eclipse.core.databinding.property.list.ListProperty#observeDetail(org.eclipse.core.databinding.observable.value.IObservableValue) |
| */ |
| @Override |
| public IObservableList observeDetail(IObservableValue master) { |
| return new VaadinObservableListDecorator(delegate.observeDetail(master)); |
| } |
| |
| /* (non-Javadoc) |
| * @see java.lang.Object#toString() |
| */ |
| @Override |
| public String toString() { |
| return delegate.toString(); |
| } |
| |
| } |