|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.faces.render.Renderer
com.sun.rave.web.ui.renderer.AbstractRenderer
com.sun.rave.web.ui.renderer.ButtonRenderer
public class ButtonRenderer
Renderer for a Button component.
| Field Summary |
|---|
| Fields inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer |
|---|
BUNDLE, EVENTS_ATTRIBUTES, I18N_ATTRIBUTES |
| Constructor Summary | |
|---|---|
ButtonRenderer()
|
|
| Method Summary | |
|---|---|
void |
decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Determine if this was the component that submitted the form. |
protected java.lang.String |
getJavascript(java.lang.String value,
java.lang.String jsmethod)
Helper method to set style classes during Javascript events such as onblur, onfocus, onmouseover, and onmouseout. |
protected java.lang.String |
getOnBlurStyle(Button button,
Theme theme)
Get onblur style class. |
protected java.lang.String |
getOnFocusStyle(Button button,
Theme theme)
Get onfocus style class. |
protected java.lang.String |
getOnMouseOutStyle(Button button,
Theme theme)
Get onmouseout style class. |
protected java.lang.String |
getOnMouseOverStyle(Button button,
Theme theme)
Get onmouseover style class. |
protected java.lang.String |
getStyle(Button button,
Theme theme)
Get style class. |
protected void |
renderAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
Render the appropriate element attributes depending on the value of the imageURL attribute. |
protected void |
renderEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
Render the appropriate element end, depending on the value of the type property. |
protected void |
renderIconAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer,
java.lang.String url)
Render the appropriate element attributes for an icon button. |
protected void |
renderStart(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
Render the appropriate element start, depending on the value of the type property. |
protected void |
renderTextAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
Render the appropriate element attributes for a text button. |
| Methods inherited from class com.sun.rave.web.ui.renderer.AbstractRenderer |
|---|
addBooleanAttributes, addCoreAttributes, addIntegerAttributes, addStringAttributes, encodeBegin, encodeChildren, encodeEnd, getApplication, getAsObject, getAsString, getExternalContext, getFacesContext, getSubmittedValue, isDisabled, isPortlet, isReadOnly, renderMarkup, setSubmittedValue |
| Methods inherited from class javax.faces.render.Renderer |
|---|
convertClientId, getConvertedValue, getRendersChildren |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ButtonRenderer()
| Method Detail |
|---|
public void decode(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component)
Determine if this was the component that submitted the form.
decode in class AbstractRenderercontext - FacesContext for the current requestcomponent - UIComponent to be decoded
java.lang.NullPointerException - if context or
component is null
protected void renderStart(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
Render the appropriate element start, depending on the value of the
type property.
renderStart in class AbstractRenderercontext - FacesContext for the current requestcomponent - UIComponent to be renderedwriter - ResponseWriter to which the element
start should be rendered
java.io.IOException - if an input/output error occurs
protected void renderAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
Render the appropriate element attributes depending on
the value of the imageURL attribute.
renderAttributes in class AbstractRenderercontext - FacesContext for the current requestcomponent - UIComponent to be renderedwriter - ResponseWriter to which the element
attributes should be rendered
java.io.IOException - if an input/output error occurs
protected void renderEnd(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
Render the appropriate element end, depending on the value of the
type property.
renderEnd in class AbstractRenderercontext - FacesContext for the current requestcomponent - UIComponent to be renderedwriter - ResponseWriter to which the element
end should be rendered
java.io.IOException - if an input/output error occurs
protected void renderIconAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer,
java.lang.String url)
throws java.io.IOException
Render the appropriate element attributes for an icon button.
context - FacesContext for the current requestcomponent - UIComponent to be renderedwriter - ResponseWriter to which the element
attributes should be renderedurl - The image URL
java.io.IOException - if an input/output error occurs
protected void renderTextAttributes(javax.faces.context.FacesContext context,
javax.faces.component.UIComponent component,
javax.faces.context.ResponseWriter writer)
throws java.io.IOException
Render the appropriate element attributes for a text button.
context - FacesContext for the current requestcomponent - UIComponent to be renderedwriter - ResponseWriter to which the element
attributes should be rendered
java.io.IOException - if an input/output error occurs
protected java.lang.String getOnBlurStyle(Button button,
Theme theme)
button - Button to be renderedtheme - Theme for the component
protected java.lang.String getOnFocusStyle(Button button,
Theme theme)
button - Button to be renderedtheme - Theme for the component
protected java.lang.String getOnMouseOverStyle(Button button,
Theme theme)
button - Button to be renderedtheme - Theme for the component
protected java.lang.String getOnMouseOutStyle(Button button,
Theme theme)
button - Button to be renderedtheme - Theme for the component
protected java.lang.String getStyle(Button button,
Theme theme)
button - Button to be renderedtheme - Theme for the component
protected java.lang.String getJavascript(java.lang.String value,
java.lang.String jsmethod)
value - The existing attribute value to append Javascript to.jsmethod - The JS event to invoke.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||