org.richfaces.renderkit.html
Class BaseGradient
java.lang.Object
org.ajax4jsf.resource.InternetResourceBase
org.ajax4jsf.resource.Java2Dresource
org.richfaces.renderkit.html.BaseGradient
- All Implemented Interfaces:
- org.ajax4jsf.resource.InternetResource
- Direct Known Subclasses:
- GradientA, SpinnerButtonGradient, SpinnerFieldGradient
public class BaseGradient
- extends Java2Dresource
- Author:
- Nick Belaevski - nbelaevski@exadel.com
created 02.02.2007
| Fields inherited from interface org.ajax4jsf.resource.InternetResource |
CODEC_ATTR, DATA_SEPARATOR, DEFAULT_EXPIRE, ENCODE_PASS_PARAMETER, ENCODE_URI_PARAMETER, RESOURCE_PROTOCOL, RESOURCE_URI_PREFIX, RESOURCE_URI_PREFIX_LENGTH |
|
Constructor Summary |
BaseGradient()
|
BaseGradient(boolean horizontal)
|
BaseGradient(int width,
int height)
|
BaseGradient(int width,
int height,
boolean horizontal)
|
BaseGradient(int width,
int height,
int gradientHeight)
|
BaseGradient(int width,
int height,
int gradientHeight,
boolean horizontal)
|
BaseGradient(int width,
int height,
int gradientHeight,
java.lang.String baseColor,
java.lang.String gradientColor)
|
BaseGradient(int width,
int height,
int gradientHeight,
java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
|
BaseGradient(int width,
int height,
java.lang.String baseColor,
java.lang.String gradientColor)
|
BaseGradient(int width,
int height,
java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
|
BaseGradient(java.lang.String baseColor,
java.lang.String gradientColor)
|
BaseGradient(java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
|
|
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 data)
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 |
boolean |
isCacheable()
|
protected void |
paint(org.ajax4jsf.resource.ResourceContext resourceContext,
java.awt.Graphics2D g2d)
Template method for create image as Applet-like paint. |
| 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 |
BaseGradient
public BaseGradient(int width,
int height,
int gradientHeight)
BaseGradient
public BaseGradient(int width,
int height,
int gradientHeight,
java.lang.String baseColor,
java.lang.String gradientColor)
BaseGradient
public BaseGradient(int width,
int height)
BaseGradient
public BaseGradient(int width,
int height,
java.lang.String baseColor,
java.lang.String gradientColor)
BaseGradient
public BaseGradient()
BaseGradient
public BaseGradient(java.lang.String baseColor,
java.lang.String gradientColor)
BaseGradient
public BaseGradient(int width,
int height,
int gradientHeight,
boolean horizontal)
BaseGradient
public BaseGradient(int width,
int height,
int gradientHeight,
java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
BaseGradient
public BaseGradient(int width,
int height,
boolean horizontal)
BaseGradient
public BaseGradient(int width,
int height,
java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
BaseGradient
public BaseGradient(boolean horizontal)
BaseGradient
public BaseGradient(java.lang.String baseColor,
java.lang.String gradientColor,
boolean horizontal)
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:
getDataToStore
protected java.lang.Object getDataToStore(javax.faces.context.FacesContext context,
java.lang.Object data)
- 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.data - -
data for build information, usually current
UIComponent
- Returns:
- - any
Serializable object, or null.
isCacheable
public boolean isCacheable()
Copyright © 2008. All Rights Reserved.