View Javadoc

    1   /*
    2    * Licensed to the Apache Software Foundation (ASF) under one
    3    * or more contributor license agreements.  See the NOTICE file
    4    * distributed with this work for additional information
    5    * regarding copyright ownership.  The ASF licenses this file
    6    * to you under the Apache License, Version 2.0 (the
    7    * "License"); you may not use this file except in compliance
    8    * with the License.  You may obtain a copy of the License at
    9    *
    10   *   http://www.apache.org/licenses/LICENSE-2.0
    11   *
    12   * Unless required by applicable law or agreed to in writing,
    13   * software distributed under the License is distributed on an
    14   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    15   * KIND, either express or implied.  See the License for the
    16   * specific language governing permissions and limitations
    17   * under the License.
    18   */
    19  package org.apache.myfaces.shared_orchestra.taglib.html;
    20
    21  import org.apache.myfaces.shared_orchestra.renderkit.html.HTML;
    22
    23  import javax.faces.component.UIComponent;
    24
    25  /**
    26   * @author Manfred Geiler (latest modification by $Author: grantsmith $)
    27   * @version $Revision: 472618 $ $Date: 2006-11-08 15:06:54 -0500 (Wed, 08 Nov 2006) $
    28   */
    29  public abstract class HtmlComponentBodyTagBase
    30          extends org.apache.myfaces.shared_orchestra.taglib.UIComponentBodyTagBase
    31  {
    32      //private static final Log log = LogFactory.getLog(HtmlComponentTag.class);
    33
    34      //HTML universal attributes
    35      private String _dir;
    36      private String _lang;
    37      private String _style;
    38      private String _styleClass;
    39      private String _title;
    40
    41      //HTML event handler attributes
    42      private String _onclick;
    43      private String _ondblclick;
    44      private String _onkeydown;
    45      private String _onkeypress;
    46      private String _onkeyup;
    47      private String _onmousedown;
    48      private String _onmousemove;
    49      private String _onmouseout;
    50      private String _onmouseover;
    51      private String _onmouseup;
    52
    53      public void release() {
    54          super.release();
    55          _dir=null;
    56          _lang=null;
    57          _style=null;
    58          _styleClass=null;
    59          _title=null;
    60          _onclick=null;
    61          _ondblclick=null;
    62          _onkeydown=null;
    63          _onkeypress=null;
    64          _onkeyup=null;
    65          _onmousedown=null;
    66          _onmousemove=null;
    67          _onmouseout=null;
    68          _onmouseover=null;
    69          _onmouseup=null;
    70      }
    71
    72      protected void setProperties(UIComponent component)
    73      {
    74          super.setProperties(component);
    75          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.DIR_ATTR, _dir);
    76          setStringProperty(component, HTML.LANG_ATTR, _lang);
    77          setStringProperty(component, HTML.STYLE_ATTR, _style);
    78          setStringProperty(component, HTML.TITLE_ATTR, _title);
    79          setStringProperty(component, HTML.STYLE_CLASS_ATTR, _styleClass);
    80          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONCLICK_ATTR, _onclick);
    81          setStringProperty(component, HTML.ONDBLCLICK_ATTR, _ondblclick);
    82          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONMOUSEDOWN_ATTR, _onmousedown);
    83          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONMOUSEUP_ATTR, _onmouseup);
    84          setStringProperty(component, HTML.ONMOUSEOVER_ATTR, _onmouseover);
    85          setStringProperty(component, HTML.ONMOUSEMOVE_ATTR, _onmousemove);
    86          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONMOUSEOUT_ATTR, _onmouseout);
    87          setStringProperty(component, HTML.ONKEYPRESS_ATTR, _onkeypress);
    88          setStringProperty(component, HTML.ONKEYDOWN_ATTR, _onkeydown);
    89          setStringProperty(component, org.apache.myfaces.shared_orchestra.renderkit.html.HTML.ONKEYUP_ATTR, _onkeyup);
    90      }
    91
    92      public void setStyleClass(String styleClass)
    93      {
    94          _styleClass = styleClass;
    95      }
    96
    97      public void setDir(String dir)
    98      {
    99          _dir = dir;
    100     }
    101
    102     public void setLang(String lang)
    103     {
    104         _lang = lang;
    105     }
    106
    107     public void setStyle(String style)
    108     {
    109         _style = style;
    110     }
    111
    112     public void setTitle(String title)
    113     {
    114         _title = title;
    115     }
    116
    117     public void setOnclick(String onclick)
    118     {
    119         _onclick = onclick;
    120     }
    121
    122     public void setOndblclick(String ondblclick)
    123     {
    124         _ondblclick = ondblclick;
    125     }
    126
    127     public void setOnmousedown(String onmousedown)
    128     {
    129         _onmousedown = onmousedown;
    130     }
    131
    132     public void setOnmouseup(String onmouseup)
    133     {
    134         _onmouseup = onmouseup;
    135     }
    136
    137     public void setOnmouseover(String onmouseover)
    138     {
    139         _onmouseover = onmouseover;
    140     }
    141
    142     public void setOnmousemove(String onmousemove)
    143     {
    144         _onmousemove = onmousemove;
    145     }
    146
    147     public void setOnmouseout(String onmouseout)
    148     {
    149         _onmouseout = onmouseout;
    150     }
    151
    152     public void setOnkeypress(String onkeypress)
    153     {
    154         _onkeypress = onkeypress;
    155     }
    156
    157     public void setOnkeydown(String onkeydown)
    158     {
    159         _onkeydown = onkeydown;
    160     }
    161
    162     public void setOnkeyup(String onkeyup)
    163     {
    164         _onkeyup = onkeyup;
    165     }
    166 }