org.richfaces.renderkit.html
Class BaseGradient
java.lang.Object
javax.faces.application.Resource
org.richfaces.resource.AbstractCacheableResource
org.richfaces.resource.AbstractBaseResource
org.ajax4jsf.resource.Java2Dresource
org.richfaces.renderkit.html.BaseGradient
- All Implemented Interfaces:
- javax.faces.component.StateHolder, org.richfaces.resource.VersionedResource
- Direct Known Subclasses:
- Base2WayGradient, BaseControlBackgroundImage, GradientA
public class BaseGradient
- extends Java2Dresource
- Author:
- Nick Belaevski - nbelaevski@exadel.com
created 02.02.2007
| Fields inherited from class javax.faces.application.Resource |
COMPONENT_RESOURCE_KEY |
|
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 void |
drawGradient(java.awt.Graphics2D g2d,
java.awt.Shape shape,
GradientType.BiColor colors,
int height)
|
protected java.lang.String |
getBaseColor()
|
protected java.lang.Integer |
getColorValueParameter(javax.faces.context.FacesContext context,
java.lang.String name,
boolean useDefault)
|
java.awt.Dimension |
getDimension()
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.lang.String |
getGradientColor()
|
protected int |
getGradientHeight()
|
protected java.lang.Integer |
getHeight(javax.faces.context.FacesContext context,
java.lang.String heightParamName)
|
protected java.lang.String |
getValueParameter(javax.faces.context.FacesContext context,
java.lang.String name)
|
boolean |
isCacheable()
|
protected boolean |
isHorizontal()
|
protected void |
paint(java.awt.Graphics2D graphics2d,
java.awt.Dimension dimension)
Template method for create image as Applet-like paint. |
protected void |
paintGradient(java.awt.Graphics2D g2d,
java.awt.Dimension dim)
|
protected void |
readState(javax.faces.context.FacesContext context,
NumericDataInputStream stream)
|
protected void |
writeState(javax.faces.context.FacesContext context,
NumericDataOutputStream stream)
|
| Methods inherited from class org.richfaces.resource.AbstractBaseResource |
getContentLength, getEntityTag, getExpires, getLastModified, getRequestPath, getResponseHeaders, getTimeToLive, getURL, getVersion, isCacheable, setCacheable, setVersion |
| Methods inherited from class javax.faces.application.Resource |
getLibraryName, getResourceName, setContentType, setLibraryName, setResourceName, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
headerBackgroundColor
protected java.lang.Integer headerBackgroundColor
headerGradientColor
protected java.lang.Integer headerGradientColor
gradientType
protected GradientType gradientType
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,
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,
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)
getDimension
public java.awt.Dimension getDimension()
- 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
- Specified by:
getDimension in class Java2Dresource
- Returns:
- dimensions of the image to be displayed on page
getGradientHeight
protected int getGradientHeight()
- Returns:
- the gradientHeight
getBaseColor
protected java.lang.String getBaseColor()
- Returns:
- the baseColor
getGradientColor
protected java.lang.String getGradientColor()
- Returns:
- the gradientColor
isHorizontal
protected boolean isHorizontal()
- Returns:
- the horizontal
drawGradient
protected void drawGradient(java.awt.Graphics2D g2d,
java.awt.Shape shape,
GradientType.BiColor colors,
int height)
paint
protected void paint(java.awt.Graphics2D graphics2d,
java.awt.Dimension dimension)
- Description copied from class:
Java2Dresource
- Template method for create image as Applet-like paint.
- Overrides:
paint in class Java2Dresource
- Parameters:
graphics2d - -
graphics to paint.
paintGradient
protected void paintGradient(java.awt.Graphics2D g2d,
java.awt.Dimension dim)
- Parameters:
g2d - data -
readState
protected void readState(javax.faces.context.FacesContext context,
NumericDataInputStream stream)
- Overrides:
readState in class Java2Dresource
writeState
protected void writeState(javax.faces.context.FacesContext context,
NumericDataOutputStream stream)
- Overrides:
writeState in class Java2Dresource
isCacheable
public boolean isCacheable()
getValueParameter
protected java.lang.String getValueParameter(javax.faces.context.FacesContext context,
java.lang.String name)
getColorValueParameter
protected java.lang.Integer getColorValueParameter(javax.faces.context.FacesContext context,
java.lang.String name,
boolean useDefault)
getHeight
protected java.lang.Integer getHeight(javax.faces.context.FacesContext context,
java.lang.String heightParamName)
Copyright © 2009. All Rights Reserved.