package net.sf.jwan.tutorial;
import java.util.Properties;
import net.sf.jwan.servlet.exception.WanRenderException;
import net.sf.jwan.servlet.gui.elements.WanDiv;
import net.sf.jwan.servlet.gui.elements.WanParagraph;
import net.sf.jwan.servlet.gui.layer.AbstractWanSublayer;
import net.sf.jwan.servlet.gui.layer.WanSubLayer;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
public class ExampleSublayer extends AbstractWanSublayer implements WanSubLayer
{
static Log logger = LogFactory.getLog(ExampleSublayer.class);
private static final long serialVersionUID = 1;
public ExampleSublayer()
{
super("ExSub", "SubLayer Example");
}
public StringBuffer render(Properties hP)
{
WanDiv div = new WanDiv();
div.setDivclass(WanDiv.DivClass.iBlock);
div.addContent(new WanParagraph("This is a sublayer"));
content = new StringBuffer();
try {content = content.append(div.render());}
catch (WanRenderException e) {logger.error(e);}
return content;
}
}