// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.
/*
 *  Licensed to the Apache Software Foundation (ASF) under one
 *  or more contributor license agreements.  See the NOTICE file
 *  distributed with this work for additional information
 *  regarding copyright ownership.  The ASF licenses this file
 *  to you under the Apache License, Version 2.0 (the
 *  "License"); you may not use this file except in compliance
 *  with the License.  You may obtain a copy of the License at
 * 
 *  http://www.apache.org/licenses/LICENSE-2.0
 * 
 *  Unless required by applicable law or agreed to in writing,
 *  software distributed under the License is distributed on an
 *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 *  KIND, either express or implied.  See the License for the
 *  specific language governing permissions and limitations
 *  under the License.
 */
package org.apache.myfaces.custom.swapimage;

import javax.faces.component.UIComponent;
import javax.faces.el.ValueBinding;
import javax.faces.context.FacesContext;


// Generated from class org.apache.myfaces.custom.swapimage.AbstractHtmlSwapImage.
//
// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.
public class HtmlSwapImageTag
    extends javax.faces.webapp.UIComponentTag
{
    public HtmlSwapImageTag()
    {    
    }
    
    public String getComponentType()
    {
        return "org.apache.myfaces.HtmlSwapImage";
    }

    public String getRendererType()
    {
        return "org.apache.myfaces.SwapImage";
    }

 
    private String _border;
    
    public void setBorder(String border)
    {
        _border = border;
    }
 
    private String _hspace;
    
    public void setHspace(String hspace)
    {
        _hspace = hspace;
    }
 
    private String _vspace;
    
    public void setVspace(String vspace)
    {
        _vspace = vspace;
    }
 
    private String _swapImageUrl;
    
    public void setSwapImageUrl(String swapImageUrl)
    {
        _swapImageUrl = swapImageUrl;
    }
 
    private String _activeImageUrl;
    
    public void setActiveImageUrl(String activeImageUrl)
    {
        _activeImageUrl = activeImageUrl;
    }
 
    private String _alt;
    
    public void setAlt(String alt)
    {
        _alt = alt;
    }
 
    private String _height;
    
    public void setHeight(String height)
    {
        _height = height;
    }
 
    private String _ismap;
    
    public void setIsmap(String ismap)
    {
        _ismap = ismap;
    }
 
    private String _longdesc;
    
    public void setLongdesc(String longdesc)
    {
        _longdesc = longdesc;
    }
 
    private String _onclick;
    
    public void setOnclick(String onclick)
    {
        _onclick = onclick;
    }
 
    private String _ondblclick;
    
    public void setOndblclick(String ondblclick)
    {
        _ondblclick = ondblclick;
    }
 
    private String _onkeydown;
    
    public void setOnkeydown(String onkeydown)
    {
        _onkeydown = onkeydown;
    }
 
    private String _onkeypress;
    
    public void setOnkeypress(String onkeypress)
    {
        _onkeypress = onkeypress;
    }
 
    private String _onkeyup;
    
    public void setOnkeyup(String onkeyup)
    {
        _onkeyup = onkeyup;
    }
 
    private String _usemap;
    
    public void setUsemap(String usemap)
    {
        _usemap = usemap;
    }
 
    private String _width;
    
    public void setWidth(String width)
    {
        _width = width;
    }
 
    private String _dir;
    
    public void setDir(String dir)
    {
        _dir = dir;
    }
 
    private String _lang;
    
    public void setLang(String lang)
    {
        _lang = lang;
    }
 
    private String _title;
    
    public void setTitle(String title)
    {
        _title = title;
    }
 
    private String _style;
    
    public void setStyle(String style)
    {
        _style = style;
    }
 
    private String _styleClass;
    
    public void setStyleClass(String styleClass)
    {
        _styleClass = styleClass;
    }
 
    private String _align;
    
    public void setAlign(String align)
    {
        _align = align;
    }
 
    private String _url;
    
    public void setUrl(String url)
    {
        _url = url;
    }
 
    private String _value;
    
    public void setValue(String value)
    {
        _value = value;
    }

    protected void setProperties(UIComponent component)
    {
        if (!(component instanceof org.apache.myfaces.custom.swapimage.HtmlSwapImage))
        {
            throw new IllegalArgumentException("Component "+
                component.getClass().getName() +" is no org.apache.myfaces.custom.swapimage.HtmlSwapImage");
        }
        
        org.apache.myfaces.custom.swapimage.HtmlSwapImage comp = (org.apache.myfaces.custom.swapimage.HtmlSwapImage) component;
        
        super.setProperties(component);
        
        FacesContext context = getFacesContext();

        if (_border != null)
        {
            if (isValueReference(_border))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_border);
                comp.setValueBinding("border", vb);
            }
            else
            {
                comp.getAttributes().put("border", _border);
            }
        } 
        if (_hspace != null)
        {
            if (isValueReference(_hspace))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_hspace);
                comp.setValueBinding("hspace", vb);
            }
            else
            {
                comp.getAttributes().put("hspace", _hspace);
            }
        } 
        if (_vspace != null)
        {
            if (isValueReference(_vspace))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_vspace);
                comp.setValueBinding("vspace", vb);
            }
            else
            {
                comp.getAttributes().put("vspace", _vspace);
            }
        } 
        if (_swapImageUrl != null)
        {
            if (isValueReference(_swapImageUrl))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_swapImageUrl);
                comp.setValueBinding("swapImageUrl", vb);
            }
            else
            {
                comp.getAttributes().put("swapImageUrl", _swapImageUrl);
            }
        } 
        if (_activeImageUrl != null)
        {
            if (isValueReference(_activeImageUrl))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_activeImageUrl);
                comp.setValueBinding("activeImageUrl", vb);
            }
            else
            {
                comp.getAttributes().put("activeImageUrl", _activeImageUrl);
            }
        } 
        if (_alt != null)
        {
            if (isValueReference(_alt))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_alt);
                comp.setValueBinding("alt", vb);
            }
            else
            {
                comp.getAttributes().put("alt", _alt);
            }
        } 
        if (_height != null)
        {
            if (isValueReference(_height))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_height);
                comp.setValueBinding("height", vb);
            }
            else
            {
                comp.getAttributes().put("height", _height);
            }
        } 
        if (_ismap != null)
        {
            if (isValueReference(_ismap))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_ismap);
                comp.setValueBinding("ismap", vb);
            }
            else
            {
                comp.getAttributes().put("ismap", Boolean.valueOf(_ismap));
            }
        } 
        if (_longdesc != null)
        {
            if (isValueReference(_longdesc))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_longdesc);
                comp.setValueBinding("longdesc", vb);
            }
            else
            {
                comp.getAttributes().put("longdesc", _longdesc);
            }
        } 
        if (_onclick != null)
        {
            if (isValueReference(_onclick))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onclick);
                comp.setValueBinding("onclick", vb);
            }
            else
            {
                comp.getAttributes().put("onclick", _onclick);
            }
        } 
        if (_ondblclick != null)
        {
            if (isValueReference(_ondblclick))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_ondblclick);
                comp.setValueBinding("ondblclick", vb);
            }
            else
            {
                comp.getAttributes().put("ondblclick", _ondblclick);
            }
        } 
        if (_onkeydown != null)
        {
            if (isValueReference(_onkeydown))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onkeydown);
                comp.setValueBinding("onkeydown", vb);
            }
            else
            {
                comp.getAttributes().put("onkeydown", _onkeydown);
            }
        } 
        if (_onkeypress != null)
        {
            if (isValueReference(_onkeypress))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onkeypress);
                comp.setValueBinding("onkeypress", vb);
            }
            else
            {
                comp.getAttributes().put("onkeypress", _onkeypress);
            }
        } 
        if (_onkeyup != null)
        {
            if (isValueReference(_onkeyup))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onkeyup);
                comp.setValueBinding("onkeyup", vb);
            }
            else
            {
                comp.getAttributes().put("onkeyup", _onkeyup);
            }
        } 
        if (_usemap != null)
        {
            if (isValueReference(_usemap))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_usemap);
                comp.setValueBinding("usemap", vb);
            }
            else
            {
                comp.getAttributes().put("usemap", _usemap);
            }
        } 
        if (_width != null)
        {
            if (isValueReference(_width))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_width);
                comp.setValueBinding("width", vb);
            }
            else
            {
                comp.getAttributes().put("width", _width);
            }
        } 
        if (_dir != null)
        {
            if (isValueReference(_dir))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_dir);
                comp.setValueBinding("dir", vb);
            }
            else
            {
                comp.getAttributes().put("dir", _dir);
            }
        } 
        if (_lang != null)
        {
            if (isValueReference(_lang))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_lang);
                comp.setValueBinding("lang", vb);
            }
            else
            {
                comp.getAttributes().put("lang", _lang);
            }
        } 
        if (_title != null)
        {
            if (isValueReference(_title))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_title);
                comp.setValueBinding("title", vb);
            }
            else
            {
                comp.getAttributes().put("title", _title);
            }
        } 
        if (_style != null)
        {
            if (isValueReference(_style))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_style);
                comp.setValueBinding("style", vb);
            }
            else
            {
                comp.getAttributes().put("style", _style);
            }
        } 
        if (_styleClass != null)
        {
            if (isValueReference(_styleClass))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_styleClass);
                comp.setValueBinding("styleClass", vb);
            }
            else
            {
                comp.getAttributes().put("styleClass", _styleClass);
            }
        } 
        if (_align != null)
        {
            if (isValueReference(_align))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_align);
                comp.setValueBinding("align", vb);
            }
            else
            {
                comp.getAttributes().put("align", _align);
            }
        } 
        if (_url != null)
        {
            if (isValueReference(_url))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_url);
                comp.setValueBinding("url", vb);
            }
            else
            {
                comp.getAttributes().put("url", _url);
            }
        } 
        if (_value != null)
        {
            if (isValueReference(_value))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_value);
                comp.setValueBinding("value", vb);
            }
            else
            {
                comp.getAttributes().put("value", _value);
            }
        } 
    }

    public void release()
    {
        super.release();
        _border = null;
        _hspace = null;
        _vspace = null;
        _swapImageUrl = null;
        _activeImageUrl = null;
        _alt = null;
        _height = null;
        _ismap = null;
        _longdesc = null;
        _onclick = null;
        _ondblclick = null;
        _onkeydown = null;
        _onkeypress = null;
        _onkeyup = null;
        _usemap = null;
        _width = null;
        _dir = null;
        _lang = null;
        _title = null;
        _style = null;
        _styleClass = null;
        _align = null;
        _url = null;
        _value = null;
    }
}