com.talk2object.plum.interaction.viewgeneneration.AbstractViewBuilder Maven / Gradle / Ivy
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