All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dragome.forms.bindings.builders.ValueModelDelegator Maven / Gradle / Ivy

/*******************************************************************************
 * Copyright (c) 2011-2014 Fernando Petrola
 * 
 *  This file is part of Dragome SDK.
 * 
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html
 ******************************************************************************/
package com.dragome.forms.bindings.builders;

import com.dragome.forms.bindings.client.value.MutableValueModel;

public class ValueModelDelegator extends CustomValueModel
{
	private MutableValueModel valueSource;

	public ValueModelDelegator()
	{
	}
	
	public ValueModelDelegator(MutableValueModel valueSource)
	{
		this.valueSource= valueSource;
	}

	public void fireValueChangeEvent(V newValue)
	{
		super.fireValueChangeEvent(null, newValue);
	}

	public void fireValueChangeEvent()
	{
		super.fireValueChangeEvent(getValue());
	}

	public V getValue()
	{
		return valueSource.getValue();
	}

	public void setValue(V value)
	{
		valueSource.setValue(value);
	}


	public MutableValueModel getValueSource()
	{
		return valueSource;
	}

	public void setValueSource(MutableValueModel valueSource)
	{
		this.valueSource= valueSource;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy