Coverage Report - javax.faces.component.html.HtmlOutputLabel
 
Classes in this File Line Coverage Branch Coverage Complexity
HtmlOutputLabel
100%
169/169
100%
40/40
1.93
 
 1  
 /*
 2  
  * Copyright 2004-2011 the Seasar Foundation and the Others.
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 13  
  * either express or implied. See the License for the specific language
 14  
  * governing permissions and limitations under the License.
 15  
  */
 16  
 package javax.faces.component.html;
 17  
 
 18  
 import javax.faces.component.ComponentUtil_;
 19  
 import javax.faces.component.UIOutput;
 20  
 import javax.faces.context.FacesContext;
 21  
 
 22  
 import org.seasar.teeda.core.JsfConstants;
 23  
 
 24  
 /**
 25  
  * @author shot
 26  
  */
 27  
 public class HtmlOutputLabel extends UIOutput {
 28  
 
 29  
     public static final String COMPONENT_TYPE = "javax.faces.HtmlOutputLabel";
 30  
 
 31  
     private static final String DEFAULT_RENDERER_TYPE = "javax.faces.Label";
 32  
 
 33  148
     private String accesskey = null;
 34  
 
 35  148
     private String dir = null;
 36  
 
 37  148
     private String forValue = null;
 38  
 
 39  148
     private String lang = null;
 40  
 
 41  148
     private String onblur = null;
 42  
 
 43  148
     private String onclick = null;
 44  
 
 45  148
     private String ondblclick = null;
 46  
 
 47  148
     private String onfocus = null;
 48  
 
 49  148
     private String onkeydown = null;
 50  
 
 51  148
     private String onkeypress = null;
 52  
 
 53  148
     private String onkeyup = null;
 54  
 
 55  148
     private String onmousedown = null;
 56  
 
 57  148
     private String onmousemove = null;
 58  
 
 59  148
     private String onmouseout = null;
 60  
 
 61  148
     private String onmouseover = null;
 62  
 
 63  148
     private String onmouseup = null;
 64  
 
 65  148
     private String style = null;
 66  
 
 67  148
     private String styleClass = null;
 68  
 
 69  148
     private String tabindex = null;
 70  
 
 71  148
     private String title = null;
 72  
 
 73  148
     public HtmlOutputLabel() {
 74  148
         setRendererType(DEFAULT_RENDERER_TYPE);
 75  148
     }
 76  
 
 77  
     public void setAccesskey(String accesskey) {
 78  3
         this.accesskey = accesskey;
 79  3
     }
 80  
 
 81  
     public String getAccesskey() {
 82  11
         if (accesskey != null) {
 83  3
             return accesskey;
 84  
         }
 85  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 86  
                 JsfConstants.ACCESSKEY_ATTR);
 87  
     }
 88  
 
 89  
     public void setDir(String dir) {
 90  3
         this.dir = dir;
 91  3
     }
 92  
 
 93  
     public String getDir() {
 94  11
         if (dir != null) {
 95  3
             return dir;
 96  
         }
 97  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 98  
                 JsfConstants.DIR_ATTR);
 99  
     }
 100  
 
 101  
     public void setFor(String forValue) {
 102  5
         this.forValue = forValue;
 103  5
     }
 104  
 
 105  
     public String getFor() {
 106  12
         if (forValue != null) {
 107  5
             return forValue;
 108  
         }
 109  7
         return ComponentUtil_.getValueBindingValueAsString(this,
 110  
                 JsfConstants.FOR_ATTR);
 111  
     }
 112  
 
 113  
     public void setLang(String lang) {
 114  3
         this.lang = lang;
 115  3
     }
 116  
 
 117  
     public String getLang() {
 118  11
         if (lang != null) {
 119  3
             return lang;
 120  
         }
 121  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 122  
                 JsfConstants.LANG_ATTR);
 123  
     }
 124  
 
 125  
     public void setOnblur(String onblur) {
 126  3
         this.onblur = onblur;
 127  3
     }
 128  
 
 129  
     public String getOnblur() {
 130  11
         if (onblur != null) {
 131  3
             return onblur;
 132  
         }
 133  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 134  
                 JsfConstants.ONBLUR_ATTR);
 135  
     }
 136  
 
 137  
     public void setOnclick(String onclick) {
 138  3
         this.onclick = onclick;
 139  3
     }
 140  
 
 141  
     public String getOnclick() {
 142  11
         if (onclick != null) {
 143  3
             return onclick;
 144  
         }
 145  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 146  
                 JsfConstants.ONCLICK_ATTR);
 147  
     }
 148  
 
 149  
     public void setOndblclick(String ondblclick) {
 150  3
         this.ondblclick = ondblclick;
 151  3
     }
 152  
 
 153  
     public String getOndblclick() {
 154  11
         if (ondblclick != null) {
 155  3
             return ondblclick;
 156  
         }
 157  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 158  
                 JsfConstants.ONDBLCLICK_ATTR);
 159  
     }
 160  
 
 161  
     public void setOnfocus(String onfocus) {
 162  3
         this.onfocus = onfocus;
 163  3
     }
 164  
 
 165  
     public String getOnfocus() {
 166  11
         if (onfocus != null) {
 167  3
             return onfocus;
 168  
         }
 169  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 170  
                 JsfConstants.ONFOCUS_ATTR);
 171  
     }
 172  
 
 173  
     public void setOnkeydown(String onkeydown) {
 174  3
         this.onkeydown = onkeydown;
 175  3
     }
 176  
 
 177  
     public String getOnkeydown() {
 178  11
         if (onkeydown != null) {
 179  3
             return onkeydown;
 180  
         }
 181  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 182  
                 JsfConstants.ONKEYDOWN_ATTR);
 183  
     }
 184  
 
 185  
     public void setOnkeypress(String onkeypress) {
 186  3
         this.onkeypress = onkeypress;
 187  3
     }
 188  
 
 189  
     public String getOnkeypress() {
 190  11
         if (onkeypress != null) {
 191  3
             return onkeypress;
 192  
         }
 193  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 194  
                 JsfConstants.ONKEYPRESS_ATTR);
 195  
     }
 196  
 
 197  
     public void setOnkeyup(String onkeyup) {
 198  3
         this.onkeyup = onkeyup;
 199  3
     }
 200  
 
 201  
     public String getOnkeyup() {
 202  11
         if (onkeyup != null) {
 203  3
             return onkeyup;
 204  
         }
 205  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 206  
                 JsfConstants.ONKEYUP_ATTR);
 207  
     }
 208  
 
 209  
     public void setOnmousedown(String onmousedown) {
 210  3
         this.onmousedown = onmousedown;
 211  3
     }
 212  
 
 213  
     public String getOnmousedown() {
 214  11
         if (onmousedown != null) {
 215  3
             return onmousedown;
 216  
         }
 217  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 218  
                 JsfConstants.ONMOUSEDOWN_ATTR);
 219  
     }
 220  
 
 221  
     public void setOnmousemove(String onmousemove) {
 222  3
         this.onmousemove = onmousemove;
 223  3
     }
 224  
 
 225  
     public String getOnmousemove() {
 226  11
         if (onmousemove != null) {
 227  3
             return onmousemove;
 228  
         }
 229  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 230  
                 JsfConstants.ONMOUSEMOVE_ATTR);
 231  
     }
 232  
 
 233  
     public void setOnmouseout(String onmouseout) {
 234  3
         this.onmouseout = onmouseout;
 235  3
     }
 236  
 
 237  
     public String getOnmouseout() {
 238  11
         if (onmouseout != null) {
 239  3
             return onmouseout;
 240  
         }
 241  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 242  
                 JsfConstants.ONMOUSEOUT_ATTR);
 243  
     }
 244  
 
 245  
     public void setOnmouseover(String onmouseover) {
 246  3
         this.onmouseover = onmouseover;
 247  3
     }
 248  
 
 249  
     public String getOnmouseover() {
 250  11
         if (onmouseover != null) {
 251  3
             return onmouseover;
 252  
         }
 253  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 254  
                 JsfConstants.ONMOUSEOVER_ATTR);
 255  
     }
 256  
 
 257  
     public void setOnmouseup(String onmouseup) {
 258  3
         this.onmouseup = onmouseup;
 259  3
     }
 260  
 
 261  
     public String getOnmouseup() {
 262  11
         if (onmouseup != null) {
 263  3
             return onmouseup;
 264  
         }
 265  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 266  
                 JsfConstants.ONMOUSEUP_ATTR);
 267  
     }
 268  
 
 269  
     public void setStyle(String style) {
 270  3
         this.style = style;
 271  3
     }
 272  
 
 273  
     public String getStyle() {
 274  11
         if (style != null) {
 275  3
             return style;
 276  
         }
 277  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 278  
                 JsfConstants.STYLE_ATTR);
 279  
     }
 280  
 
 281  
     public void setStyleClass(String styleClass) {
 282  3
         this.styleClass = styleClass;
 283  3
     }
 284  
 
 285  
     public String getStyleClass() {
 286  11
         if (styleClass != null) {
 287  3
             return styleClass;
 288  
         }
 289  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 290  
                 JsfConstants.STYLE_CLASS_ATTR);
 291  
     }
 292  
 
 293  
     public void setTabindex(String tabindex) {
 294  3
         this.tabindex = tabindex;
 295  3
     }
 296  
 
 297  
     public String getTabindex() {
 298  11
         if (tabindex != null) {
 299  3
             return tabindex;
 300  
         }
 301  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 302  
                 JsfConstants.TABINDEX_ATTR);
 303  
     }
 304  
 
 305  
     public void setTitle(String title) {
 306  3
         this.title = title;
 307  3
     }
 308  
 
 309  
     public String getTitle() {
 310  11
         if (title != null) {
 311  3
             return title;
 312  
         }
 313  8
         return ComponentUtil_.getValueBindingValueAsString(this,
 314  
                 JsfConstants.TITLE_ATTR);
 315  
     }
 316  
 
 317  
     public Object saveState(FacesContext context) {
 318  4
         Object values[] = new Object[21];
 319  4
         values[0] = super.saveState(context);
 320  4
         values[1] = accesskey;
 321  4
         values[2] = dir;
 322  4
         values[3] = forValue;
 323  4
         values[4] = lang;
 324  4
         values[5] = onblur;
 325  4
         values[6] = onclick;
 326  4
         values[7] = ondblclick;
 327  4
         values[8] = onfocus;
 328  4
         values[9] = onkeydown;
 329  4
         values[10] = onkeypress;
 330  4
         values[11] = onkeyup;
 331  4
         values[12] = onmousedown;
 332  4
         values[13] = onmousemove;
 333  4
         values[14] = onmouseout;
 334  4
         values[15] = onmouseover;
 335  4
         values[16] = onmouseup;
 336  4
         values[17] = style;
 337  4
         values[18] = styleClass;
 338  4
         values[19] = tabindex;
 339  4
         values[20] = title;
 340  4
         return ((Object) (values));
 341  
     }
 342  
 
 343  
     public void restoreState(FacesContext context, Object state) {
 344  3
         Object values[] = (Object[]) state;
 345  3
         super.restoreState(context, values[0]);
 346  3
         accesskey = (String) values[1];
 347  3
         dir = (String) values[2];
 348  3
         forValue = (String) values[3];
 349  3
         lang = (String) values[4];
 350  3
         onblur = (String) values[5];
 351  3
         onclick = (String) values[6];
 352  3
         ondblclick = (String) values[7];
 353  3
         onfocus = (String) values[8];
 354  3
         onkeydown = (String) values[9];
 355  3
         onkeypress = (String) values[10];
 356  3
         onkeyup = (String) values[11];
 357  3
         onmousedown = (String) values[12];
 358  3
         onmousemove = (String) values[13];
 359  3
         onmouseout = (String) values[14];
 360  3
         onmouseover = (String) values[15];
 361  3
         onmouseup = (String) values[16];
 362  3
         style = (String) values[17];
 363  3
         styleClass = (String) values[18];
 364  3
         tabindex = (String) values[19];
 365  3
         title = (String) values[20];
 366  3
     }
 367  
 }