Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.richfaces.component.html
Class HtmlPaint2D

    java.lang.Object
      javax.faces.component.UIComponent
          javax.faces.component.UIComponentBase
              org.richfaces.component.UIPaint2D
                  org.richfaces.component.html.HtmlPaint2D

All Implemented Interfaces:
  javax.faces.component.StateHolder

    public class HtmlPaint2D

extends UIPaint2D

Component-Type org.richfaces.Paint2D Component-Family javax.faces.Output Renderer-Type org.richfaces.Paint2DRenderer 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.

Field Summary
`static java.lang.String` | `COMPONENT_FAMILY`
`static java.lang.String` | `COMPONENT_TYPE`

Constructor Summary
`HtmlPaint2D()` Constructor to init default renderers

Method Summary
`java.lang.String` | `getAlign()` bottom|middle|top|left|right Deprecated.
`java.lang.String` | `getBgcolor()` Background color of painted image.
`java.lang.String` | `getBorder()` Deprecated.
`javax.faces.convert.Converter` | `getConverter()` Id of Converter to be used or reference to a Converter Getter for converter
`java.lang.Object` | `getData()` Value calculated at render time and stored in Image URI (as part of cache Key), at paint time passed to a paint method.
`java.lang.String` | `getDir()` Direction indication for text that does not inherit directionality.
`java.lang.String` | `getFamily()`
`java.lang.String` | `getFormat()` format Name of format for sending a generated image.
`int` | `getHeight()` Height in pixels of image (for paint canvas and HTML attribute) Getter for height
`java.lang.String` | `getHspace()` Deprecated.
`java.lang.String` | `getLang()` Code describing the language used in the generated markup for this component Getter for lang
`javax.faces.el.MethodBinding` | `getPaint()` The method calls expression to paint Image on prepared Buffered image.
`java.lang.String` | `getStyle()` CSS style(s) is/are to be applied when this component is rendered Getter for style
`java.lang.String` | `getStyleClass()` Corresponds to the HTML class attribute Getter for styleClass
`java.lang.String` | `getTitle()` Advisory title information about markup elements generated for this component Getter for title
`java.lang.Object` | `getValue()` The initial value to set when rendered for the first time Getter for value
`java.lang.String` | `getVspace()` Deprecated.
`int` | `getWidth()` Width in pixels of image (for paint canvas and HTML attribute) Getter for width
`boolean` | `isCacheable()` Supported (or not) client/server caching for generated images.
`void` | `restoreState(javax.faces.context.FacesContext context, java.lang.Object state)`
`java.lang.Object` | `saveState(javax.faces.context.FacesContext context)`
`void` | `setAlign(java.lang.String __align)` bottom|middle|top|left|right Deprecated.
`void` | `setBgcolor(java.lang.String __bgcolor)` Background color of painted image.
`void` | `setBorder(java.lang.String __border)` Deprecated.
`void` | `setCacheable(boolean __cacheable)` Supported (or not) client/server caching for generated images.
`void` | `setConverter(javax.faces.convert.Converter __converter)` Id of Converter to be used or reference to a Converter Setter for converter
`void` | `setData(java.lang.Object __data)` Value calculated at render time and stored in Image URI (as part of cache Key), at paint time passed to a paint method.
`void` | `setDir(java.lang.String __dir)` Direction indication for text that does not inherit directionality.
`void` | `setFormat(java.lang.String __format)` format Name of format for sending a generated image.
`void` | `setHeight(int __height)` Height in pixels of image (for paint canvas and HTML attribute) Setter for height
`void` | `setHspace(java.lang.String __hspace)` Deprecated.
`void` | `setLang(java.lang.String __lang)` Code describing the language used in the generated markup for this component Setter for lang
`void` | `setPaint(javax.faces.el.MethodBinding __paint)` The method calls expression to paint Image on prepared Buffered image.
`void` | `setStyle(java.lang.String __style)` CSS style(s) is/are to be applied when this component is rendered Setter for style
`void` | `setStyleClass(java.lang.String __styleClass)` Corresponds to the HTML class attribute Setter for styleClass
`void` | `setTitle(java.lang.String __title)` Advisory title information about markup elements generated for this component Setter for title
`void` | `setValue(java.lang.Object __value)` The initial value to set when rendered for the first time Setter for value
`void` | `setVspace(java.lang.String __vspace)` Deprecated.
`void` | `setWidth(int __width)` Width in pixels of image (for paint canvas and HTML attribute) Setter for width

Methods inherited from class javax.faces.component.UIComponentBase
`addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processDecodes, processRestoreState, processSaveState, processUpdates, processValidators, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### COMPONENT_TYPE

    public static final java.lang.String COMPONENT_TYPE

See Also:
  Constant Field Values

### COMPONENT_FAMILY

    public static final java.lang.String COMPONENT_FAMILY

See Also:
  Constant Field Values

Constructor Detail

### HtmlPaint2D

    public HtmlPaint2D()

  Constructor to init default renderers

Method Detail

### setAlign

    public void setAlign(java.lang.String __align)

  bottom|middle|top|left|right Deprecated. This attribute specifies the position of an IMG, OBJECT, or APPLET with respect to its context. The following values for align concern the object's position with respect to surrounding text: bottom: means that the bottom of the object should be vertically aligned with the current baseline. This is the default value. middle: means that the center of the object should be vertically aligned with the current baseline. top: means that the top of the object should be vertically aligned with the top of the current text line Setter for align

  Parameters:
    `align` - - new value

### getAlign

    public java.lang.String getAlign()

  bottom|middle|top|left|right Deprecated. This attribute specifies the position of an IMG, OBJECT, or APPLET with respect to its context. The following values for align concern the object's position with respect to surrounding text: bottom: means that the bottom of the object should be vertically aligned with the current baseline. This is the default value. middle: means that the center of the object should be vertically aligned with the current baseline. top: means that the top of the object should be vertically aligned with the top of the current text line Getter for align

  Returns:
    align value from local variable or value bindings

### setBgcolor

    public void setBgcolor(java.lang.String __bgcolor)

  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 Setter for bgcolor

  Specified by:
    `setBgcolor` in class `UIPaint2D`
  Parameters:
    `bgcolor` - - new value

### getBgcolor

    public java.lang.String getBgcolor()

  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 Getter for bgcolor

  Specified by:
    `getBgcolor` in class `UIPaint2D`
  Returns:
    bgcolor value from local variable or value bindings

### setBorder

    public void setBorder(java.lang.String __border)

  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 Setter for border

  Parameters:
    `border` - - new value

### getBorder

    public java.lang.String getBorder()

  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 Getter for border

  Returns:
    border value from local variable or value bindings

### setCacheable

    public void setCacheable(boolean __cacheable)

  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 Setter for cacheable

  Specified by:
    `setCacheable` in class `UIPaint2D`
  Parameters:
    `cacheable` - - new value

### isCacheable

    public boolean isCacheable()

  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 Getter for cacheable

  Specified by:
    `isCacheable` in class `UIPaint2D`
  Returns:
    cacheable value from local variable or value bindings

### setConverter

    public void setConverter(javax.faces.convert.Converter __converter)

  Id of Converter to be used or reference to a Converter Setter for converter

  Parameters:
    `converter` - - new value

### getConverter

    public javax.faces.convert.Converter getConverter()

  Id of Converter to be used or reference to a Converter Getter for converter

  Returns:
    converter value from local variable or value bindings

### setData

    public void setData(java.lang.Object __data)

  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 Setter for data

  Specified by:
    `setData` in class `UIPaint2D`
  Parameters:
    `data` - - new value

### getData

    public java.lang.Object getData()

  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 Getter for data

  Specified by:
    `getData` in class `UIPaint2D`
  Returns:
    data value from local variable or value bindings

### setDir

    public void setDir(java.lang.String __dir)

  Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left) Setter for dir

  Parameters:
    `dir` - - new value

### getDir

    public java.lang.String getDir()

  Direction indication for text that does not inherit directionality. Valid values are "LTR" (left-to-right) and "RTL" (right-to-left) Getter for dir

  Returns:
    dir value from local variable or value bindings

### setFormat

    public void setFormat(java.lang.String __format)

  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) Setter for format

  Specified by:
    `setFormat` in class `UIPaint2D`
  Parameters:
    `format` - - new value

### getFormat

    public java.lang.String getFormat()

  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) Getter for format

  Specified by:
    `getFormat` in class `UIPaint2D`
  Returns:
    format value from local variable or value bindings

### setHeight

    public void setHeight(int __height)

  Height in pixels of image (for paint canvas and HTML attribute) Setter for height

  Specified by:
    `setHeight` in class `UIPaint2D`
  Parameters:
    `height` - - new value

### getHeight

    public int getHeight()

  Height in pixels of image (for paint canvas and HTML attribute) Getter for height

  Specified by:
    `getHeight` in class `UIPaint2D`
  Returns:
    height value from local variable or value bindings

### setHspace

    public void setHspace(java.lang.String __hspace)

  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 Setter for hspace

  Parameters:
    `hspace` - - new value

### getHspace

    public java.lang.String getHspace()

  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 Getter for hspace

  Returns:
    hspace value from local variable or value bindings

### setLang

    public void setLang(java.lang.String __lang)

  Code describing the language used in the generated markup for this component Setter for lang

  Parameters:
    `lang` - - new value

### getLang

    public java.lang.String getLang()

  Code describing the language used in the generated markup for this component Getter for lang

  Returns:
    lang value from local variable or value bindings

### setPaint

    public void setPaint(javax.faces.el.MethodBinding __paint)

  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) Setter for paint

  Specified by:
    `setPaint` in class `UIPaint2D`
  Parameters:
    `paint` - - new value

### getPaint

    public javax.faces.el.MethodBinding getPaint()

  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) Getter for paint

  Specified by:
    `getPaint` in class `UIPaint2D`
  Returns:
    paint value from local variable or value bindings

### setStyle

    public void setStyle(java.lang.String __style)

  CSS style(s) is/are to be applied when this component is rendered Setter for style

  Parameters:
    `style` - - new value

### getStyle

    public java.lang.String getStyle()

  CSS style(s) is/are to be applied when this component is rendered Getter for style

  Returns:
    style value from local variable or value bindings

### setStyleClass

    public void setStyleClass(java.lang.String __styleClass)

  Corresponds to the HTML class attribute Setter for styleClass

  Parameters:
    `styleClass` - - new value

### getStyleClass

    public java.lang.String getStyleClass()

  Corresponds to the HTML class attribute Getter for styleClass

  Returns:
    styleClass value from local variable or value bindings

### setTitle

    public void setTitle(java.lang.String __title)

  Advisory title information about markup elements generated for this component Setter for title

  Parameters:
    `title` - - new value

### getTitle

    public java.lang.String getTitle()

  Advisory title information about markup elements generated for this component Getter for title

  Returns:
    title value from local variable or value bindings

### setValue

    public void setValue(java.lang.Object __value)

  The initial value to set when rendered for the first time Setter for value

  Parameters:
    `value` - - new value

### getValue

    public java.lang.Object getValue()

  The initial value to set when rendered for the first time Getter for value

  Returns:
    value value from local variable or value bindings

### setVspace

    public void setVspace(java.lang.String __vspace)

  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 Setter for vspace

  Parameters:
    `vspace` - - new value

### getVspace

    public java.lang.String getVspace()

  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 Getter for vspace

  Returns:
    vspace value from local variable or value bindings

### setWidth

    public void setWidth(int __width)

  Width in pixels of image (for paint canvas and HTML attribute) Setter for width

  Specified by:
    `setWidth` in class `UIPaint2D`
  Parameters:
    `width` - - new value

### getWidth

    public int getWidth()

  Width in pixels of image (for paint canvas and HTML attribute) Getter for width

  Specified by:
    `getWidth` in class `UIPaint2D`
  Returns:
    width value from local variable or value bindings

### getFamily

    public java.lang.String getFamily()

  Specified by:
    `getFamily` in class `javax.faces.component.UIComponent`

### saveState

    public java.lang.Object saveState(javax.faces.context.FacesContext context)

  Specified by:
    `saveState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `saveState` in class `javax.faces.component.UIComponentBase`

### restoreState

    public void restoreState(javax.faces.context.FacesContext context,
                             java.lang.Object state)

  Specified by:
    `restoreState` in interface `javax.faces.component.StateHolder`
  Overrides:
    `restoreState` in class `javax.faces.component.UIComponentBase`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2007. All Rights Reserved.