RichFaces ( Legacy URL )
Tag paint2D


Create an image by paint in a managed bean, same as paint (Graphics g) in SWING components. It can be used as a cacheable or non-cacheable resource. With a cache support, a key is created in URI with a mix of size (width/height), paint method, format and data attributes.


Tag Information
Tag Classorg.richfaces.taglib.Paint2DTag
TagExtraInfo ClassNone
Body ContentJSP
Display NameNone

Attributes
NameRequiredRequest-timeTypeDescription
alignfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Deprecated. This attribute specifies the position of an IMG, OBJECT, or APPLET with respect to its context. The possible values are "bottom", "middle", "top", "left" and "right". The default value is "middle".
altfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
For compability with XHTML 1.1 standart
bgcolorfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Background color of painted image. Default value is 'transparent' which means no background fill. Hex colors can be used, as well as common color names. Invalid values are treated as transparent. Note, that JPEG format doesn't support transparency, and transparent background is painted black. Also note, that several browsers (e.g. IE6) do not support PNG transparency. Default value is "transparent"
bindingfalsefalsejavax.el.ValueExpression
(must evaluate to javax.faces.component.UIComponent)
The attribute takes a value-binding expression for a component property of a backing bean
borderfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Deprecated. This attribute specifies the width of an IMG or OBJECT border, in pixels. The default value for this attribute depends on the user agent
cacheablefalsefalsejavax.el.ValueExpression
(must evaluate to boolean)
Supported (or not) client/server caching for generated images. Caching on client supported by properly sending and processing of HTTP headers (Last-Modified, Expires, If-Modified-Since, etc.) Server-side caching is supported by application-scope object cache. For build of cache key use "value" attribute, serialized to URI
datafalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.Object)
Value calculated at render time and stored in Image URI (as part of cache Key), at paint time passed to a paint method. It can be used for updating cache at change of image generating conditions, and for creating paint beans as "Lightweight" pattern components (request scope). IMPORTANT: Since serialized data stored in URI, avoid using big objects
formatfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
format Name of format for sending a generated image. It currently supports "jpeg" (24 bit, default), "gif" (8 bit with transparency), "png" (32 bit with transparency)
heightfalsefalsejavax.el.ValueExpression
(must evaluate to int)
Height in pixels of image (for paint canvas and HTML attribute). Default value is "10".
hspacefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Deprecated. This attribute specifies the amount of white space to be inserted to the left and right of an IMG, APPLET, or OBJECT. The default value is not specified, but is generally a small, non-zero length
idfalsefalsejava.lang.StringEvery component may have a unique id that is automatically created if omitted
langfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Code describing the language used in the generated markup for this component
paintfalsefalsejavax.el.MethodExpression
(signature must match void paint(java.awt.Graphics2D,java.lang.Object))
The method calls expression to paint Image on prepared Buffered image. It must have two parameters with a type of java.awt.Graphics2D (graphics to paint) and Object (restored from URI "data" property). For painting used 32-bit RGBA color model (for 8-bit images used Diffusion filtration before sending)
renderedfalsefalsejavax.el.ValueExpression
(must evaluate to boolean)
If "false", this component is not rendered
stylefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
CSS style rules to be applied to the component
styleClassfalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Assigns one or more CSS class names to the component. Corresponds to the HTML "class" attribute.
titlefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Advisory title information about markup elements generated for this component
valuefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.Object)
The current value of this component
vspacefalsefalsejavax.el.ValueExpression
(must evaluate to java.lang.String)
Deprecated. This attribute specifies the amount of white space to be inserted above and below an IMG, APPLET, or OBJECT. The default value is not specified, but is generally a small, non-zero length
widthfalsefalsejavax.el.ValueExpression
(must evaluate to int)
Width in pixels of image (for paint canvas and HTML attribute). Default value is "10".

Variables
No Variables Defined.


Output Generated by Tag Library Documentation Generator. Java, JSP, and JavaServer Pages are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries. Copyright 2002-4 Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054, U.S.A. All Rights Reserved.