Package org.zkoss.zul

Class Image

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, Component, Scope, ComponentCtrl
    Direct Known Subclasses:
    Captcha, Imagemap

    public class Image
    extends XulElement
    An image.

    [Since 6.0.0]

    To turn on the preload image function for this component, you have to specify the component's attribute map with key "org.zkoss.zul.image.preload" to true. That is, for example, if in a zul file, you shall specify <custom-attributes> of the component like this:

     <image ...>
         <custom-attributes org.zkoss.zul.image.preload='true'/>
     </image>
     
    Or specify it onto the root component. For example,
     <window ...>
         <custom-attributes org.zkoss.zul.image.preload="true"/>
         <image .../>
     </window>
     
    [Since 6.5.2]

    Preload image function is also configurable from zk.xml by setting library properties. For example,

     <library-property/>
         <name>org.zkoss.zul.image.preload</name/>
         <value>true</value/>
     </library-property/>
     

    See also how to fix the alpha transparency problem of PNG files found in IE6?

    Author:
    tomyeh
    See Also:
    Serialized Form