KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > exoplatform > faces > core > renderer > html > ThreeImagePatternButton


1 /***************************************************************************
2  * Copyright 2001-2003 The eXo Platform SARL All rights reserved. *
3  * Please look at license.txt in info directory for more license detail. *
4  **************************************************************************/

5 package org.exoplatform.faces.core.renderer.html;
6
7 import java.io.IOException JavaDoc;
8 import javax.faces.context.ResponseWriter;
9 import org.exoplatform.faces.core.component.UIExoComponent;
10 import org.exoplatform.faces.core.component.model.Parameter;
11 /**
12  * @author Tuan Nguyen (tuan08@users.sourceforge.net)
13  * @since Aug 28, 2004
14  * @version $Id: ThreeImagePatternButton.java,v 1.1 2004/11/01 14:52:22 tuan08 Exp $
15  */

16 public class ThreeImagePatternButton extends ButtonRenderer {
17   private String JavaDoc buttonClass_ ;
18   private String JavaDoc selectButtonClass_ ;
19   
20   public ThreeImagePatternButton(String JavaDoc buttonClass, String JavaDoc selectButtonClass) {
21     buttonClass_ = buttonClass ;
22     selectButtonClass_ = selectButtonClass ;
23   }
24   
25   public void renderSelect(ResponseWriter w, UIExoComponent component,
26                            String JavaDoc text, Parameter[] params) throws IOException JavaDoc {
27     render(w, component, text, selectButtonClass_, params, null) ;
28   }
29   
30   public void render(ResponseWriter w, UIExoComponent component,
31                      String JavaDoc text, Parameter[] params) throws IOException JavaDoc {
32     render(w, component, text, buttonClass_, params, null) ;
33   }
34   
35   protected void writeText(ResponseWriter w, String JavaDoc text) throws IOException JavaDoc {
36     w.write("<span class='left'/> </span>");
37     w.write("<span class='middle'>");
38     w.write(text);
39     w.write("</span>");
40     w.write("<span class='right'/> </span>");
41   }
42 }
Popular Tags