org.richfaces.resource
Class TestResource2
java.lang.Object
javax.faces.application.Resource
org.richfaces.resource.AbstractBaseResource
org.richfaces.resource.AbstractCacheableResource
org.ajax4jsf.resource.Java2Dresource
org.richfaces.resource.TestResource2
- All Implemented Interfaces:
- org.richfaces.resource.CacheableResource, org.richfaces.resource.StateHolderResource, org.richfaces.resource.VersionedResource
- Direct Known Subclasses:
- AnimatedTestResource
public class TestResource2
- extends Java2Dresource
- implements org.richfaces.resource.VersionedResource
Fields inherited from class javax.faces.application.Resource |
COMPONENT_RESOURCE_KEY |
Method Summary |
java.awt.Color |
getColor()
|
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 |
java.lang.String |
getEntityTag(javax.faces.context.FacesContext context)
|
java.lang.String |
getVersion()
|
protected void |
paint(java.awt.Graphics2D graphics2d,
java.awt.Dimension dim)
Template method for create image as Applet-like paint. |
void |
readState(javax.faces.context.FacesContext context,
java.io.DataInput stream)
|
void |
setColor(java.awt.Color color)
|
void |
writeState(javax.faces.context.FacesContext context,
java.io.DataOutput stream)
|
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 |
TestResource2
public TestResource2()
paint
protected void paint(java.awt.Graphics2D graphics2d,
java.awt.Dimension dim)
- Description copied from class:
Java2Dresource
- Template method for create image as Applet-like paint.
- Overrides:
paint
in class Java2Dresource
- Parameters:
graphics2d
- -
graphics to paint.
readState
public void readState(javax.faces.context.FacesContext context,
java.io.DataInput stream)
throws java.io.IOException
- Specified by:
readState
in interface org.richfaces.resource.StateHolderResource
- Overrides:
readState
in class Java2Dresource
- Throws:
java.io.IOException
writeState
public void writeState(javax.faces.context.FacesContext context,
java.io.DataOutput stream)
throws java.io.IOException
- Specified by:
writeState
in interface org.richfaces.resource.StateHolderResource
- Overrides:
writeState
in class Java2Dresource
- Throws:
java.io.IOException
getEntityTag
public java.lang.String getEntityTag(javax.faces.context.FacesContext context)
- Specified by:
getEntityTag
in interface org.richfaces.resource.CacheableResource
- Overrides:
getEntityTag
in class AbstractCacheableResource
getVersion
public java.lang.String getVersion()
- Specified by:
getVersion
in interface org.richfaces.resource.VersionedResource
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
getColor
public java.awt.Color getColor()
setColor
public void setColor(java.awt.Color color)
Copyright © 2010 JBoss, a division of Red Hat, Inc.. All Rights Reserved.