1 5 package org.exoplatform.faces.core.renderer.html; 6 7 import java.io.IOException ; 8 import javax.faces.component.UIComponent ; 9 import javax.faces.context.FacesContext ; 10 import javax.faces.context.ResponseWriter; 11 16 public class BorderDecorator extends Decorator { 17 18 public BorderDecorator(String cssClass) { 19 super(cssClass) ; 20 } 21 22 public void decorate(FacesContext context, UIComponent uiComponent) throws IOException { 23 ResponseWriter w = context.getResponseWriter() ; 24 w.write("<table class='") ;w.write(cssClass_); w.write("'>") ; 25 w. write("<tr>"); 26 w. write("<td class='top-left'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 27 w. write("<td class='top-middle'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 28 w. write("<td class='top-right'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 29 w. write("</tr>"); 30 31 w. write("<tr>"); 32 w. write("<td class='middle-left'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 33 w. write("<td>"); 34 render(context, uiComponent) ; 35 w. write("</td>"); 36 w. write("<td class='middle-right'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 37 w. write("</tr>"); 38 39 w. write("<tr>"); 40 w. write("<td class='bottom-left'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 41 w. write("<td class='bottom-middle'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 42 w. write("<td class='bottom-right'>"); w.write("<img SRC='/skin/blank.gif'/>"); w.write("</td>"); 43 w. write("</tr>"); 44 w.write("</table>") ; 45 } 46 } | Popular Tags |