org.richfaces.renderkit.html
Class CustomizeableGradient

java.lang.Object
  extended by org.ajax4jsf.resource.InternetResourceBase
      extended by org.ajax4jsf.resource.Java2Dresource
          extended by org.richfaces.renderkit.html.CustomizeableGradient
All Implemented Interfaces:
org.ajax4jsf.resource.InternetResource

public class CustomizeableGradient
extends Java2Dresource

Author:
Nick Belaevski - nbelaevski@exadel.com created 02.02.2007

Nested Class Summary
protected static class CustomizeableGradient.Data
           
 
Field Summary
 
Fields inherited from interface org.ajax4jsf.resource.InternetResource
CODEC_ATTR, DATA_SEPARATOR, DEFAULT_EXPIRE, DEFAULT_EXPITE_PARAMETER, ENCODE_PASS_PARAMETER, ENCODE_URI_PARAMETER, RESOURCE_PROTOCOL, RESOURCE_URI_PREFIX, RESOURCE_URI_PREFIX_LENGTH
 
Constructor Summary
CustomizeableGradient()
           
 
Method Summary
protected  java.lang.Object deserializeData(byte[] objectArray)
          Deserialize parameters object from byte array.
protected  java.lang.Object getDataToStore(javax.faces.context.FacesContext context, java.lang.Object parameterData)
          Template method to construct resource-specific data ( to store in resource URI ).
 java.awt.Dimension getDimensions(javax.faces.context.FacesContext facesContext, java.lang.Object data)
          Primary calculation of image dimensions - used when HTML code is generated to render IMG's width and height Subclasses should override this method to provide correct sizes of rendered images
protected  java.awt.Dimension getDimensions(org.ajax4jsf.resource.ResourceContext resourceContext)
          Secondary calculation is used basically by getImage method
protected  java.lang.String getValueParameter(javax.faces.context.FacesContext context, java.lang.String name)
           
 boolean isCacheable()
           
protected  void paint(org.ajax4jsf.resource.ResourceContext resourceContext, java.awt.Graphics2D g2d)
          Template method for create image as Applet-like paint.
protected static java.lang.String safeTrim(java.lang.String s)
           
 
Methods inherited from class org.ajax4jsf.resource.Java2Dresource
getImage, getResourceAsStream, send
 
Methods inherited from class org.ajax4jsf.resource.InternetResourceBase
encode, encode, encodeBegin, encodeEnd, getContentLength, getContentType, getExpired, getKey, getLastModified, getProperty, getRenderer, getUri, isCacheable, isSessionAware, requireFacesContext, restoreData, sendHeaders, setCacheable, setContentLength, setExpired, setKey, setLastModified, setProperty, setRenderer, setSessionAware
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomizeableGradient

public CustomizeableGradient()
Method Detail

getDimensions

public java.awt.Dimension getDimensions(javax.faces.context.FacesContext facesContext,
                                        java.lang.Object data)
Description copied from class: Java2Dresource
Primary calculation of image dimensions - used when HTML code is generated to render IMG's width and height Subclasses should override this method to provide correct sizes of rendered images

Overrides:
getDimensions in class Java2Dresource
Returns:
dimensions of the image to be displayed on page

getDimensions

protected java.awt.Dimension getDimensions(org.ajax4jsf.resource.ResourceContext resourceContext)
Description copied from class: Java2Dresource
Secondary calculation is used basically by getImage method

Overrides:
getDimensions in class Java2Dresource
Returns:

paint

protected void paint(org.ajax4jsf.resource.ResourceContext resourceContext,
                     java.awt.Graphics2D g2d)
Description copied from class: Java2Dresource
Template method for create image as Applet-like paint.

Overrides:
paint in class Java2Dresource
Parameters:
resourceContext - - current resource context.
g2d - - graphics to paint.

deserializeData

protected java.lang.Object deserializeData(byte[] objectArray)
Description copied from class: InternetResourceBase
Deserialize parameters object from byte array. By default, used Java de-serialisation from ObjectOutputStream , but implementations can override this method ( togewer with getDataToStore ) for implement short version.

Overrides:
deserializeData in class InternetResourceBase
Returns:

safeTrim

protected static java.lang.String safeTrim(java.lang.String s)

getDataToStore

protected java.lang.Object getDataToStore(javax.faces.context.FacesContext context,
                                          java.lang.Object parameterData)
Description copied from class: InternetResourceBase
Template method to construct resource-specific data ( to store in resource URI ). If resource must store any data in session or other cache, it must be done here. Since lightweight realisation, information for restore such data muct be returned by this method.

Overrides:
getDataToStore in class InternetResourceBase
Parameters:
context - - current faces context.
parameterData - - data for build information, usually current UIComponent
Returns:
- any Serializable object, or null.

isCacheable

public boolean isCacheable()

getValueParameter

protected java.lang.String getValueParameter(javax.faces.context.FacesContext context,
                                             java.lang.String name)


Copyright © 2009. All Rights Reserved.