|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.faces.render.Renderer org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer org.apache.myfaces.custom.htmlTag.HtmlTagRenderer org.apache.myfaces.custom.roundeddiv.HtmlRoundedDivRenderer
public class HtmlRoundedDivRenderer
Renderer for the HtmlRoundedDiv
component.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.myfaces.renderkit.html.util.ResourceLoader |
---|
org.apache.myfaces.renderkit.html.util.ResourceLoader.ClosedSocketException |
Field Summary | |
---|---|
static java.lang.String |
RENDERER_TYPE
|
Constructor Summary | |
---|---|
HtmlRoundedDivRenderer()
|
Method Summary | |
---|---|
protected java.awt.Dimension |
_getSize(HtmlRoundedDiv component)
|
protected void |
addImage(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
HtmlRoundedDiv component,
java.lang.String area,
java.util.Set areas,
boolean ie)
Adds an IMG tag to the response for an image |
protected void |
addPadding(int padding,
java.lang.StringBuffer style,
java.util.Set areas)
Adds padding to the inner DIV so that the contents do not overlap the rounded corner |
protected RoundedBorderGenerator |
buildGenerator(javax.servlet.http.HttpServletRequest request)
|
protected java.util.Map |
buildParameterMap(HtmlRoundedDiv component,
java.lang.String area)
Build a set of parameters as a map that are needed for the rendering |
protected java.lang.String |
colorToHtml(java.awt.Color c)
Convert a color to an HTML style color (i.e. |
void |
encodeBegin(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
void |
encodeChildren(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
protected void |
encodeContentColumn(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
HtmlRoundedDiv component,
java.util.Set areas,
boolean ie)
|
protected void |
encodeDivBegin(javax.faces.context.FacesContext context,
boolean ie,
HtmlRoundedDiv div,
javax.faces.context.ResponseWriter writer,
java.util.Set areas)
|
void |
encodeEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
|
protected void |
encodeImageColumn(javax.faces.context.ResponseWriter writer,
javax.faces.context.FacesContext context,
HtmlRoundedDiv component,
java.lang.String area,
java.util.Set areas,
int padding,
boolean ie)
|
protected void |
encodeTable(javax.faces.context.FacesContext context,
boolean ie,
HtmlRoundedDiv div,
javax.faces.context.ResponseWriter writer,
java.util.Set areas)
|
protected int |
getAreaAsSection(java.lang.String area)
Convert the string area to one of the integer constants from RoundedBorderGenerator |
protected java.util.Set |
getAreasToRender(javax.faces.context.FacesContext context,
HtmlRoundedDiv component)
Get the areas to render. |
protected java.lang.String |
getCacheKey(java.lang.String queryString)
|
protected java.lang.String |
getImageSource(javax.faces.context.FacesContext context,
HtmlRoundedDiv component,
java.lang.String area)
Get the URL to use to let this class work with the MyFaces resource handling in order to generate the image |
boolean |
getRendersChildren()
|
protected RoundedBorderGenerator |
initCachedGenerator(javax.servlet.http.HttpServletRequest request,
java.lang.String cacheKey)
|
protected boolean |
isIE(javax.faces.context.FacesContext context)
Check if the user is using IE |
void |
serveResource(javax.servlet.ServletContext context,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String resourceUri)
|
protected void |
setCssPosition(int padding,
java.lang.StringBuffer style,
java.lang.String area,
java.util.Set areas)
Set the CSS position using CSS2 attributes |
protected void |
setIECssPosition(int padding,
java.lang.StringBuffer style,
java.lang.String area,
java.util.Set areas)
Set the CSS positioning attributes for IE6 |
Methods inherited from class org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlRenderer |
---|
getActionUrl, getChildCount, getChildren, getClientId, renderId, shouldRenderId, toUri |
Methods inherited from class javax.faces.render.Renderer |
---|
convertClientId, decode, getConvertedValue |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String RENDERER_TYPE
Constructor Detail |
---|
public HtmlRoundedDivRenderer()
Method Detail |
---|
public void serveResource(javax.servlet.ServletContext context, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String resourceUri) throws java.io.IOException
serveResource
in interface org.apache.myfaces.renderkit.html.util.ResourceLoader
java.io.IOException
ResourceLoader.serveResource(
javax.servlet.ServletContext, javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse, java.lang.String)
protected RoundedBorderGenerator initCachedGenerator(javax.servlet.http.HttpServletRequest request, java.lang.String cacheKey)
request
- cacheKey
-
protected RoundedBorderGenerator buildGenerator(javax.servlet.http.HttpServletRequest request)
public void encodeBegin(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeBegin
in class org.apache.myfaces.custom.htmlTag.HtmlTagRenderer
java.io.IOException
HtmlTagRenderer.encodeBegin(
javax.faces.context.FacesContext, javax.faces.component.UIComponent)
protected void encodeDivBegin(javax.faces.context.FacesContext context, boolean ie, HtmlRoundedDiv div, javax.faces.context.ResponseWriter writer, java.util.Set areas) throws java.io.IOException
java.io.IOException
protected void encodeTable(javax.faces.context.FacesContext context, boolean ie, HtmlRoundedDiv div, javax.faces.context.ResponseWriter writer, java.util.Set areas) throws java.io.IOException
java.io.IOException
public void encodeChildren(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeChildren
in class javax.faces.render.Renderer
java.io.IOException
Renderer.encodeChildren(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
public void encodeEnd(javax.faces.context.FacesContext context, javax.faces.component.UIComponent component) throws java.io.IOException
encodeEnd
in class org.apache.myfaces.custom.htmlTag.HtmlTagRenderer
java.io.IOException
HtmlTagRenderer.encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)
public boolean getRendersChildren()
getRendersChildren
in class javax.faces.render.Renderer
Renderer.getRendersChildren()
protected int getAreaAsSection(java.lang.String area)
RoundedBorderGenerator
area
- the area as a string
protected java.util.Set getAreasToRender(javax.faces.context.FacesContext context, HtmlRoundedDiv component)
context
- FacesContext
component
- The component
protected void addImage(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, HtmlRoundedDiv component, java.lang.String area, java.util.Set areas, boolean ie) throws java.io.IOException
writer
- The response writercontext
- The faces contextcomponent
- The componentarea
- The area of the imageareas
- All the areas to be renderedie
- If the browser is IE
java.io.IOException
- when writing to the writerprotected void setIECssPosition(int padding, java.lang.StringBuffer style, java.lang.String area, java.util.Set areas)
padding
- The size of the image sectionstyle
- The current stylearea
- The areaareas
- All the areas to be renderedprotected void encodeContentColumn(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, HtmlRoundedDiv component, java.util.Set areas, boolean ie) throws java.io.IOException
java.io.IOException
protected void encodeImageColumn(javax.faces.context.ResponseWriter writer, javax.faces.context.FacesContext context, HtmlRoundedDiv component, java.lang.String area, java.util.Set areas, int padding, boolean ie) throws java.io.IOException
java.io.IOException
protected void setCssPosition(int padding, java.lang.StringBuffer style, java.lang.String area, java.util.Set areas)
padding
- The size of the image sectionstyle
- The current stylearea
- The areaareas
- All the areas to be renderedprotected java.lang.String getImageSource(javax.faces.context.FacesContext context, HtmlRoundedDiv component, java.lang.String area)
context
- The faces contextcomponent
- The componentarea
- The area
protected void addPadding(int padding, java.lang.StringBuffer style, java.util.Set areas)
padding
- The max of the border width and radiusstyle
- The styleareas
- The areas to renderprotected java.awt.Dimension _getSize(HtmlRoundedDiv component)
protected java.util.Map buildParameterMap(HtmlRoundedDiv component, java.lang.String area)
component
- The componentarea
- The area
protected java.lang.String colorToHtml(java.awt.Color c)
c
- The color
protected boolean isIE(javax.faces.context.FacesContext context)
context
- Faces context
protected java.lang.String getCacheKey(java.lang.String queryString)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |