1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * This library is free software; you can redistribute it and/or modify it under
5    * the terms of the GNU Lesser General Public License as published by the Free
6    * Software Foundation; either version 2.1 of the License, or (at your option)
7    * any later version.
8    *
9    * This library is distributed in the hope that it will be useful, but WITHOUT
10   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11   * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
12   * details.
13   */
14  
15  package com.liferay.taglib.aui;
16  
17  import javax.servlet.jsp.tagext.TagSupport;
18  
19  /**
20   * <a href="ToolTag.java.html"><b><i>View Source</i></b></a>
21   *
22   * @author Julio Camarero
23   * @author Brian Wing Shun Chan
24   */
25  public class ToolTag extends TagSupport {
26  
27      public int doStartTag() {
28          PanelTag parentTag = (PanelTag)findAncestorWithClass(
29              this, PanelTag.class);
30  
31          parentTag.addToolTag(this);
32  
33          return EVAL_PAGE;
34      }
35  
36      public String getHandler() {
37          return _handler;
38      }
39  
40      public String getIcon() {
41          return _icon;
42      }
43  
44      public String getId() {
45          return _id;
46      }
47  
48      public void setHandler(String handler) {
49          _handler = handler;
50      }
51  
52      public void setIcon(String icon) {
53          _icon = icon;
54      }
55  
56      public void setId(String id) {
57          _id = id;
58      }
59  
60      protected void cleanUp() {
61          _handler = null;
62          _icon = null;
63          _id = null;
64      }
65  
66      private String _handler;
67      private String _icon;
68      private String _id;
69  
70  }