blob: dd02e6625361da37ea9a70ad236705d0a9c658bd [file] [log] [blame]
/**
* 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.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.value.ValueProperty;
import org.eclipse.osbp.runtime.web.vaadin.databinding.values.IVaadinObservableList;
import org.eclipse.osbp.runtime.web.vaadin.databinding.values.IVaadinObservableValue;
import org.eclipse.osbp.runtime.web.vaadin.databinding.values.VaadinObservableListDecorator;
import org.eclipse.osbp.runtime.web.vaadin.databinding.values.VaadinObservableValueDecorator;
// TODO: Auto-generated Javadoc
/**
* The Class VaadinValuePropertyDecorator.
*/
public class VaadinValuePropertyDecorator extends ValueProperty implements
IVaadinValueProperty {
/** The delegate. */
private final IVaadinValueProperty delegate;
/**
* Instantiates a new vaadin value property decorator.
*
* @param delegate
* the delegate
*/
public VaadinValuePropertyDecorator(IVaadinValueProperty delegate) {
this.delegate = delegate;
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.IValueProperty#getValueType()
*/
@Override
public Object getValueType() {
return delegate.getValueType();
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.ValueProperty#observe(java.lang.Object)
*/
@Override
public IVaadinObservableValue observe(Object source) {
return new VaadinObservableValueDecorator(delegate.observe(source));
}
/* (non-Javadoc)
* @see org.eclipse.osbp.runtime.web.vaadin.databinding.properties.IVaadinValueProperty#observeVaadinProperty(java.lang.Object)
*/
@Override
public IVaadinObservableValue observeVaadinProperty(Object source) {
return new VaadinObservableValueDecorator(
delegate.observeVaadinProperty(source));
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.IValueProperty#observe(org.eclipse.core.databinding.observable.Realm, java.lang.Object)
*/
public IObservableValue observe(Realm realm, Object source) {
return new VaadinObservableValueDecorator(delegate.observe(realm,
source));
}
/* (non-Javadoc)
* @see org.eclipse.osbp.runtime.web.vaadin.databinding.properties.IVaadinValueProperty#observeDelayed(int, java.lang.Object)
*/
@Override
public IVaadinObservableValue observeDelayed(int delay, Object component) {
return delegate.observeDelayed(delay, component);
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.ValueProperty#valueFactory()
*/
@Override
public IObservableFactory valueFactory() {
return delegate.valueFactory();
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.ValueProperty#valueFactory(org.eclipse.core.databinding.observable.Realm)
*/
@Override
public IObservableFactory valueFactory(Realm realm) {
return delegate.valueFactory(realm);
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.ValueProperty#observeDetail(org.eclipse.core.databinding.observable.value.IObservableValue)
*/
@Override
public IObservableValue observeDetail(IObservableValue master) {
return new VaadinObservableValueDecorator(
delegate.observeDetail(master));
}
/* (non-Javadoc)
* @see org.eclipse.core.databinding.property.value.ValueProperty#observeDetail(org.eclipse.core.databinding.observable.list.IObservableList)
*/
@SuppressWarnings("all")
public IVaadinObservableList observeDetail(IObservableList master) {
return new VaadinObservableListDecorator(delegate.observeDetail(master));
}
/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return delegate.toString();
}
}