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

xq.gwt.mvc.controller.IntegerPropertyController Maven / Gradle / Ivy

Go to download

A framework for implementing the MVP variant of the Model View Controller design pattern in the context of GWT

The newest version!
package xq.gwt.mvc.controller;

import xq.gwt.mvc.model.IntegerPropertyModel;
import xq.gwt.mvc.view.IntegerPropertyView;

public class IntegerPropertyController extends AbstractPropertyController {

	protected IntegerPropertyModel integerModel;
	protected IntegerPropertyView integerView;
	
	public IntegerPropertyController(IntegerPropertyView integerView){
		super(integerView);
		this.integerView = integerView;
	}
	
	public void setPropertyModel(IntegerPropertyModel integerModel){
        this.integerModel = integerModel;
        super.setPropertyModel(integerModel);        
    }
	
	@Override
	public void updateModel() {
		if (integerModel != null)
			integerModel.setValue(integerView.getInteger());
	}

	@Override
	public void updateView() {
		if (integerView != null)
			integerView.setInteger(integerModel.getValue());
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy