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

import javax.faces.component.UIComponent;
import javax.faces.el.ValueBinding;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
import javax.faces.el.MethodBinding;


// Generated from class org.apache.myfaces.custom.picklist.AbstractHtmlSelectManyPicklist.
//
// WARNING: This file was automatically generated. Do not edit it directly,
//          or you will lose your changes.
public class HtmlSelectManyPicklistTag
    extends org.apache.myfaces.generated.taglib.html.ext.HtmlSelectManyListboxTag
{
    public HtmlSelectManyPicklistTag()
    {    
    }
    
    public String getComponentType()
    {
        return "org.apache.myfaces.HtmlSelectManyPicklist";
    }

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

 
    private String _addButtonText;
    
    public void setAddButtonText(String addButtonText)
    {
        _addButtonText = addButtonText;
    }
 
    private String _addAllButtonText;
    
    public void setAddAllButtonText(String addAllButtonText)
    {
        _addAllButtonText = addAllButtonText;
    }
 
    private String _removeButtonText;
    
    public void setRemoveButtonText(String removeButtonText)
    {
        _removeButtonText = removeButtonText;
    }
 
    private String _removeAllButtonText;
    
    public void setRemoveAllButtonText(String removeAllButtonText)
    {
        _removeAllButtonText = removeAllButtonText;
    }
 
    private String _addButtonStyle;
    
    public void setAddButtonStyle(String addButtonStyle)
    {
        _addButtonStyle = addButtonStyle;
    }
 
    private String _addAllButtonStyle;
    
    public void setAddAllButtonStyle(String addAllButtonStyle)
    {
        _addAllButtonStyle = addAllButtonStyle;
    }
 
    private String _removeButtonStyle;
    
    public void setRemoveButtonStyle(String removeButtonStyle)
    {
        _removeButtonStyle = removeButtonStyle;
    }
 
    private String _removeAllButtonStyle;
    
    public void setRemoveAllButtonStyle(String removeAllButtonStyle)
    {
        _removeAllButtonStyle = removeAllButtonStyle;
    }
 
    private String _addButtonStyleClass;
    
    public void setAddButtonStyleClass(String addButtonStyleClass)
    {
        _addButtonStyleClass = addButtonStyleClass;
    }
 
    private String _addAllButtonStyleClass;
    
    public void setAddAllButtonStyleClass(String addAllButtonStyleClass)
    {
        _addAllButtonStyleClass = addAllButtonStyleClass;
    }
 
    private String _removeButtonStyleClass;
    
    public void setRemoveButtonStyleClass(String removeButtonStyleClass)
    {
        _removeButtonStyleClass = removeButtonStyleClass;
    }
 
    private String _removeAllButtonStyleClass;
    
    public void setRemoveAllButtonStyleClass(String removeAllButtonStyleClass)
    {
        _removeAllButtonStyleClass = removeAllButtonStyleClass;
    }

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

        if (_addButtonText != null)
        {
            if (isValueReference(_addButtonText))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addButtonText);
                comp.setValueBinding("addButtonText", vb);
            }
            else
            {
                comp.getAttributes().put("addButtonText", _addButtonText);
            }
        } 
        if (_addAllButtonText != null)
        {
            if (isValueReference(_addAllButtonText))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addAllButtonText);
                comp.setValueBinding("addAllButtonText", vb);
            }
            else
            {
                comp.getAttributes().put("addAllButtonText", _addAllButtonText);
            }
        } 
        if (_removeButtonText != null)
        {
            if (isValueReference(_removeButtonText))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeButtonText);
                comp.setValueBinding("removeButtonText", vb);
            }
            else
            {
                comp.getAttributes().put("removeButtonText", _removeButtonText);
            }
        } 
        if (_removeAllButtonText != null)
        {
            if (isValueReference(_removeAllButtonText))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeAllButtonText);
                comp.setValueBinding("removeAllButtonText", vb);
            }
            else
            {
                comp.getAttributes().put("removeAllButtonText", _removeAllButtonText);
            }
        } 
        if (_addButtonStyle != null)
        {
            if (isValueReference(_addButtonStyle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addButtonStyle);
                comp.setValueBinding("addButtonStyle", vb);
            }
            else
            {
                comp.getAttributes().put("addButtonStyle", _addButtonStyle);
            }
        } 
        if (_addAllButtonStyle != null)
        {
            if (isValueReference(_addAllButtonStyle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addAllButtonStyle);
                comp.setValueBinding("addAllButtonStyle", vb);
            }
            else
            {
                comp.getAttributes().put("addAllButtonStyle", _addAllButtonStyle);
            }
        } 
        if (_removeButtonStyle != null)
        {
            if (isValueReference(_removeButtonStyle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeButtonStyle);
                comp.setValueBinding("removeButtonStyle", vb);
            }
            else
            {
                comp.getAttributes().put("removeButtonStyle", _removeButtonStyle);
            }
        } 
        if (_removeAllButtonStyle != null)
        {
            if (isValueReference(_removeAllButtonStyle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeAllButtonStyle);
                comp.setValueBinding("removeAllButtonStyle", vb);
            }
            else
            {
                comp.getAttributes().put("removeAllButtonStyle", _removeAllButtonStyle);
            }
        } 
        if (_addButtonStyleClass != null)
        {
            if (isValueReference(_addButtonStyleClass))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addButtonStyleClass);
                comp.setValueBinding("addButtonStyleClass", vb);
            }
            else
            {
                comp.getAttributes().put("addButtonStyleClass", _addButtonStyleClass);
            }
        } 
        if (_addAllButtonStyleClass != null)
        {
            if (isValueReference(_addAllButtonStyleClass))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_addAllButtonStyleClass);
                comp.setValueBinding("addAllButtonStyleClass", vb);
            }
            else
            {
                comp.getAttributes().put("addAllButtonStyleClass", _addAllButtonStyleClass);
            }
        } 
        if (_removeButtonStyleClass != null)
        {
            if (isValueReference(_removeButtonStyleClass))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeButtonStyleClass);
                comp.setValueBinding("removeButtonStyleClass", vb);
            }
            else
            {
                comp.getAttributes().put("removeButtonStyleClass", _removeButtonStyleClass);
            }
        } 
        if (_removeAllButtonStyleClass != null)
        {
            if (isValueReference(_removeAllButtonStyleClass))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_removeAllButtonStyleClass);
                comp.setValueBinding("removeAllButtonStyleClass", vb);
            }
            else
            {
                comp.getAttributes().put("removeAllButtonStyleClass", _removeAllButtonStyleClass);
            }
        } 
    }

    public void release()
    {
        super.release();
        _addButtonText = null;
        _addAllButtonText = null;
        _removeButtonText = null;
        _removeAllButtonText = null;
        _addButtonStyle = null;
        _addAllButtonStyle = null;
        _removeButtonStyle = null;
        _removeAllButtonStyle = null;
        _addButtonStyleClass = null;
        _addAllButtonStyleClass = null;
        _removeButtonStyleClass = null;
        _removeAllButtonStyleClass = null;
    }
}