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

com.talk2object.plum.interaction.viewgeneneration.AbstractViewBuilder Maven / Gradle / Ivy

There is a newer version: 0.1.22
Show newest version
package com.talk2object.plum.interaction.viewgeneneration;

import com.talk2object.plum.view._abstract.window.UIComponent;

public abstract class AbstractViewBuilder implements ViewBuilder {
	protected ViewBuilder parent;

	public AbstractViewBuilder() {

	}

	@Override
	public UIComponent build(Object model, String viewClass, ViewBuildContext context,
			UIComponent parentView) {

		// do something for some contexts

		// else
		if (parent != null)
			return parent.build(model, viewClass, context, parentView);
		else
			return null;
	}

	public ViewBuilder getParent() {
		return parent;
	}

	public void setParent(ViewBuilder parent) {
		this.parent = parent;
	}

	@Override
	public abstract Class getModelClass();
	 

	@Override
	public boolean isImportant(){
		return false;
	}
	@Override
	public String toString() {
		String targetClass = getModelClass() == null ? "null"
				: getModelClass().getName();
		return targetClass + "\t\t\t-> " + getClass().getCanonicalName();
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy