org.richfaces.resource
Class TestResource2

java.lang.Object
  extended by javax.faces.application.Resource
      extended by org.richfaces.resource.AbstractCacheableResource
          extended by org.richfaces.resource.AbstractBaseResource
              extended by org.ajax4jsf.resource.Java2Dresource
                  extended by org.richfaces.resource.TestResource2
All Implemented Interfaces:
javax.faces.component.StateHolder, org.richfaces.resource.VersionedResource
Direct Known Subclasses:
AnimatedTestResource

public class TestResource2
extends Java2Dresource


Nested Class Summary
 
Nested classes/interfaces inherited from class org.ajax4jsf.resource.Java2Dresource
Java2Dresource.ImageType
 
Field Summary
protected  java.awt.Color color
           
protected  java.awt.Dimension dimension
           
 
Fields inherited from class org.richfaces.resource.AbstractBaseResource
URL_PROTOCOL
 
Fields inherited from class javax.faces.application.Resource
COMPONENT_RESOURCE_KEY
 
Constructor Summary
TestResource2()
           
 
Method Summary
 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.
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.ajax4jsf.resource.Java2Dresource
getContentType, getInputStream, isTransient, restoreState, saveState, setTransient
 
Methods inherited from class org.richfaces.resource.AbstractBaseResource
getContentLength, getExpires, getLastModified, getRequestPath, getResponseHeaders, getTimeToLive, getURL, isCacheable, setCacheable, setVersion
 
Methods inherited from class org.richfaces.resource.AbstractCacheableResource
matchesEntityTag, matchesLastModified, userAgentNeedsUpdate
 
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
 

Field Detail

color

protected java.awt.Color color

dimension

protected java.awt.Dimension dimension
Constructor Detail

TestResource2

public TestResource2()
Method Detail

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

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

getEntityTag

public java.lang.String getEntityTag(javax.faces.context.FacesContext context)
Overrides:
getEntityTag in class AbstractBaseResource

getVersion

public java.lang.String getVersion()
Specified by:
getVersion in interface org.richfaces.resource.VersionedResource
Overrides:
getVersion in class AbstractBaseResource

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


Copyright © 2009. All Rights Reserved.