// 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.popup;

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


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

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

 
    private String _style;
    
    public void setStyle(String style)
    {
        _style = style;
    }
 
    private String _styleClass;
    
    public void setStyleClass(String styleClass)
    {
        _styleClass = styleClass;
    }
 
    private String _displayAtDistanceX;
    
    public void setDisplayAtDistanceX(String displayAtDistanceX)
    {
        _displayAtDistanceX = displayAtDistanceX;
    }
 
    private String _displayAtDistanceY;
    
    public void setDisplayAtDistanceY(String displayAtDistanceY)
    {
        _displayAtDistanceY = displayAtDistanceY;
    }
 
    private String _closePopupOnExitingElement;
    
    public void setClosePopupOnExitingElement(String closePopupOnExitingElement)
    {
        _closePopupOnExitingElement = closePopupOnExitingElement;
    }
 
    private String _closePopupOnExitingPopup;
    
    public void setClosePopupOnExitingPopup(String closePopupOnExitingPopup)
    {
        _closePopupOnExitingPopup = closePopupOnExitingPopup;
    }
 
    private String _layout;
    
    public void setLayout(String layout)
    {
        _layout = layout;
    }
 
    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 _onmousedown;
    
    public void setOnmousedown(String onmousedown)
    {
        _onmousedown = onmousedown;
    }
 
    private String _onmousemove;
    
    public void setOnmousemove(String onmousemove)
    {
        _onmousemove = onmousemove;
    }
 
    private String _onmouseout;
    
    public void setOnmouseout(String onmouseout)
    {
        _onmouseout = onmouseout;
    }
 
    private String _onmouseover;
    
    public void setOnmouseover(String onmouseover)
    {
        _onmouseover = onmouseover;
    }
 
    private String _onmouseup;
    
    public void setOnmouseup(String onmouseup)
    {
        _onmouseup = onmouseup;
    }
 
    private String _enabledOnUserRole;
    
    public void setEnabledOnUserRole(String enabledOnUserRole)
    {
        _enabledOnUserRole = enabledOnUserRole;
    }
 
    private String _visibleOnUserRole;
    
    public void setVisibleOnUserRole(String visibleOnUserRole)
    {
        _visibleOnUserRole = visibleOnUserRole;
    }
 
    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;
    }

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

        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 (_displayAtDistanceX != null)
        {
            if (isValueReference(_displayAtDistanceX))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_displayAtDistanceX);
                comp.setValueBinding("displayAtDistanceX", vb);
            }
            else
            {
                comp.getAttributes().put("displayAtDistanceX", Integer.valueOf(_displayAtDistanceX));
            }
        } 
        if (_displayAtDistanceY != null)
        {
            if (isValueReference(_displayAtDistanceY))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_displayAtDistanceY);
                comp.setValueBinding("displayAtDistanceY", vb);
            }
            else
            {
                comp.getAttributes().put("displayAtDistanceY", Integer.valueOf(_displayAtDistanceY));
            }
        } 
        if (_closePopupOnExitingElement != null)
        {
            if (isValueReference(_closePopupOnExitingElement))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_closePopupOnExitingElement);
                comp.setValueBinding("closePopupOnExitingElement", vb);
            }
            else
            {
                comp.getAttributes().put("closePopupOnExitingElement", Boolean.valueOf(_closePopupOnExitingElement));
            }
        } 
        if (_closePopupOnExitingPopup != null)
        {
            if (isValueReference(_closePopupOnExitingPopup))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_closePopupOnExitingPopup);
                comp.setValueBinding("closePopupOnExitingPopup", vb);
            }
            else
            {
                comp.getAttributes().put("closePopupOnExitingPopup", Boolean.valueOf(_closePopupOnExitingPopup));
            }
        } 
        if (_layout != null)
        {
            if (isValueReference(_layout))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_layout);
                comp.setValueBinding("layout", vb);
            }
            else
            {
                comp.getAttributes().put("layout", _layout);
            }
        } 
        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 (_onmousedown != null)
        {
            if (isValueReference(_onmousedown))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onmousedown);
                comp.setValueBinding("onmousedown", vb);
            }
            else
            {
                comp.getAttributes().put("onmousedown", _onmousedown);
            }
        } 
        if (_onmousemove != null)
        {
            if (isValueReference(_onmousemove))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onmousemove);
                comp.setValueBinding("onmousemove", vb);
            }
            else
            {
                comp.getAttributes().put("onmousemove", _onmousemove);
            }
        } 
        if (_onmouseout != null)
        {
            if (isValueReference(_onmouseout))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onmouseout);
                comp.setValueBinding("onmouseout", vb);
            }
            else
            {
                comp.getAttributes().put("onmouseout", _onmouseout);
            }
        } 
        if (_onmouseover != null)
        {
            if (isValueReference(_onmouseover))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onmouseover);
                comp.setValueBinding("onmouseover", vb);
            }
            else
            {
                comp.getAttributes().put("onmouseover", _onmouseover);
            }
        } 
        if (_onmouseup != null)
        {
            if (isValueReference(_onmouseup))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_onmouseup);
                comp.setValueBinding("onmouseup", vb);
            }
            else
            {
                comp.getAttributes().put("onmouseup", _onmouseup);
            }
        } 
        if (_enabledOnUserRole != null)
        {
            if (isValueReference(_enabledOnUserRole))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_enabledOnUserRole);
                comp.setValueBinding("enabledOnUserRole", vb);
            }
            else
            {
                comp.getAttributes().put("enabledOnUserRole", _enabledOnUserRole);
            }
        } 
        if (_visibleOnUserRole != null)
        {
            if (isValueReference(_visibleOnUserRole))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_visibleOnUserRole);
                comp.setValueBinding("visibleOnUserRole", vb);
            }
            else
            {
                comp.getAttributes().put("visibleOnUserRole", _visibleOnUserRole);
            }
        } 
        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);
            }
        } 
    }

    public void release()
    {
        super.release();
        _style = null;
        _styleClass = null;
        _displayAtDistanceX = null;
        _displayAtDistanceY = null;
        _closePopupOnExitingElement = null;
        _closePopupOnExitingPopup = null;
        _layout = null;
        _onclick = null;
        _ondblclick = null;
        _onkeydown = null;
        _onkeypress = null;
        _onkeyup = null;
        _onmousedown = null;
        _onmousemove = null;
        _onmouseout = null;
        _onmouseover = null;
        _onmouseup = null;
        _enabledOnUserRole = null;
        _visibleOnUserRole = null;
        _dir = null;
        _lang = null;
        _title = null;
    }
}