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

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


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

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

 
    private String _clientSideToggle;
    
    public void setClientSideToggle(String clientSideToggle)
    {
        _clientSideToggle = clientSideToggle;
    }
 
    private String _varNodeToggler;
    
    public void setVarNodeToggler(String varNodeToggler)
    {
        _varNodeToggler = varNodeToggler;
    }
 
    private String _showNav;
    
    public void setShowNav(String showNav)
    {
        _showNav = showNav;
    }
 
    private String _showLines;
    
    public void setShowLines(String showLines)
    {
        _showLines = showLines;
    }
 
    private String _showRootNode;
    
    public void setShowRootNode(String showRootNode)
    {
        _showRootNode = showRootNode;
    }
 
    private String _preserveToggle;
    
    public void setPreserveToggle(String preserveToggle)
    {
        _preserveToggle = preserveToggle;
    }
 
    private String _javascriptLocation;
    
    public void setJavascriptLocation(String javascriptLocation)
    {
        _javascriptLocation = javascriptLocation;
    }
 
    private String _imageLocation;
    
    public void setImageLocation(String imageLocation)
    {
        _imageLocation = imageLocation;
    }
 
    private String _styleLocation;
    
    public void setStyleLocation(String styleLocation)
    {
        _styleLocation = styleLocation;
    }
 
    private String _value;
    
    public void setValue(String value)
    {
        _value = value;
    }
 
    private String _var;
    
    public void setVar(String var)
    {
        _var = var;
    }

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

        if (_clientSideToggle != null)
        {
            if (isValueReference(_clientSideToggle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_clientSideToggle);
                comp.setValueBinding("clientSideToggle", vb);
            }
            else
            {
                comp.getAttributes().put("clientSideToggle", Boolean.valueOf(_clientSideToggle));
            }
        } 
        if (_varNodeToggler != null)
        {
            if (isValueReference(_varNodeToggler))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_varNodeToggler);
                comp.setValueBinding("varNodeToggler", vb);
            }
            else
            {
                comp.getAttributes().put("varNodeToggler", _varNodeToggler);
            }
        } 
        if (_showNav != null)
        {
            if (isValueReference(_showNav))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_showNav);
                comp.setValueBinding("showNav", vb);
            }
            else
            {
                comp.getAttributes().put("showNav", Boolean.valueOf(_showNav));
            }
        } 
        if (_showLines != null)
        {
            if (isValueReference(_showLines))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_showLines);
                comp.setValueBinding("showLines", vb);
            }
            else
            {
                comp.getAttributes().put("showLines", Boolean.valueOf(_showLines));
            }
        } 
        if (_showRootNode != null)
        {
            if (isValueReference(_showRootNode))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_showRootNode);
                comp.setValueBinding("showRootNode", vb);
            }
            else
            {
                comp.getAttributes().put("showRootNode", Boolean.valueOf(_showRootNode));
            }
        } 
        if (_preserveToggle != null)
        {
            if (isValueReference(_preserveToggle))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_preserveToggle);
                comp.setValueBinding("preserveToggle", vb);
            }
            else
            {
                comp.getAttributes().put("preserveToggle", Boolean.valueOf(_preserveToggle));
            }
        } 
        if (_javascriptLocation != null)
        {
            if (isValueReference(_javascriptLocation))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_javascriptLocation);
                comp.setValueBinding("javascriptLocation", vb);
            }
            else
            {
                comp.getAttributes().put("javascriptLocation", _javascriptLocation);
            }
        } 
        if (_imageLocation != null)
        {
            if (isValueReference(_imageLocation))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_imageLocation);
                comp.setValueBinding("imageLocation", vb);
            }
            else
            {
                comp.getAttributes().put("imageLocation", _imageLocation);
            }
        } 
        if (_styleLocation != null)
        {
            if (isValueReference(_styleLocation))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_styleLocation);
                comp.setValueBinding("styleLocation", vb);
            }
            else
            {
                comp.getAttributes().put("styleLocation", _styleLocation);
            }
        } 
        if (_value != null)
        {
            if (isValueReference(_value))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_value);
                comp.setValueBinding("value", vb);
            }
            else
            {
                comp.getAttributes().put("value", _value);
            }
        } 
        if (_var != null)
        {
            if (isValueReference(_var))
            {
                ValueBinding vb = context.getApplication().createValueBinding(_var);
                comp.setValueBinding("var", vb);
            }
            else
            {
                comp.getAttributes().put("var", _var);
            }
        } 
    }

    public void release()
    {
        super.release();
        _clientSideToggle = null;
        _varNodeToggler = null;
        _showNav = null;
        _showLines = null;
        _showRootNode = null;
        _preserveToggle = null;
        _javascriptLocation = null;
        _imageLocation = null;
        _styleLocation = null;
        _value = null;
        _var = null;
    }
}