001    /**
002     * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
003     *
004     * The contents of this file are subject to the terms of the Liferay Enterprise
005     * Subscription License ("License"). You may not use this file except in
006     * compliance with the License. You can obtain a copy of the License by
007     * contacting Liferay, Inc. See the License for the specific language governing
008     * permissions and limitations under the License, including but not limited to
009     * distribution rights of the Software.
010     *
011     *
012     *
013     */
014    
015    package com.liferay.taglib.aui;
016    
017    import javax.servlet.jsp.tagext.TagSupport;
018    
019    /**
020     * @author Julio Camarero
021     * @author Brian Wing Shun Chan
022     */
023    public class ToolTag extends TagSupport {
024    
025            public int doStartTag() {
026                    PanelTag parentTag = (PanelTag)findAncestorWithClass(
027                            this, PanelTag.class);
028    
029                    parentTag.addToolTag(this);
030    
031                    return EVAL_PAGE;
032            }
033    
034            public String getHandler() {
035                    return _handler;
036            }
037    
038            public String getIcon() {
039                    return _icon;
040            }
041    
042            public String getId() {
043                    return _id;
044            }
045    
046            public void setHandler(String handler) {
047                    _handler = handler;
048            }
049    
050            public void setIcon(String icon) {
051                    _icon = icon;
052            }
053    
054            public void setId(String id) {
055                    _id = id;
056            }
057    
058            protected void cleanUp() {
059                    _handler = null;
060                    _icon = null;
061                    _id = null;
062            }
063    
064            private String _handler;
065            private String _icon;
066            private String _id;
067    
068    }