Package net.sf.jwan.tutorial

Source Code of net.sf.jwan.tutorial.ExampleSublayer

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;
  }
}
TOP

Related Classes of net.sf.jwan.tutorial.ExampleSublayer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.