001// ***************************************************************************************************************************
002// * Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.  See the NOTICE file *
003// * distributed with this work for additional information regarding copyright ownership.  The ASF licenses this file        *
004// * to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance            *
005// * with the License.  You may obtain a copy of the License at                                                              *
006// *                                                                                                                         *
007// *  http://www.apache.org/licenses/LICENSE-2.0                                                                             *
008// *                                                                                                                         *
009// * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an  *
010// * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the License for the        *
011// * specific language governing permissions and limitations under the License.                                              *
012// ***************************************************************************************************************************
013package org.apache.juneau.dto.html5;
014
015import org.apache.juneau.annotation.*;
016import org.apache.juneau.internal.*;
017
018/**
019 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-textarea-element">&lt;textarea&gt;</a>
020 * element.
021 *
022 * <h5 class='section'>See Also:</h5><ul>
023 *    <li class='link'><a class="doclink" href="../../../../../index.html#jd.Html5">Overview &gt; juneau-dto &gt; HTML5</a>
024 * </ul>
025 */
026@Bean(typeName="textarea")
027@FluentSetters
028public class Textarea extends HtmlElementRawText {
029
030   /**
031    * Creates an empty {@link Textarea} element.
032    */
033   public Textarea() {}
034
035   /**
036    * Creates a {@link Textarea} element with the specified {@link Textarea#name(String)} attribute and
037    * {@link Textarea#text(Object)} node.
038    *
039    * @param name The {@link Textarea#name(String)} attribute.
040    * @param text The {@link Textarea#text(Object)} node.
041    */
042   public Textarea(String name, String text) {
043      name(name).text(text);
044   }
045
046   /**
047    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-autocomplete">autocomplete</a> attribute.
048    *
049    * <p>
050    * Hint for form auto-fill feature.
051    *
052    * @param autocomplete The new value for this attribute.
053    * @return This object.
054    */
055   public final Textarea autocomplete(String autocomplete) {
056      attr("autocomplete", autocomplete);
057      return this;
058   }
059
060   /**
061    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-autofocus">autofocus</a> attribute.
062    *
063    * <p>
064    * Automatically focus the form control when the page is loaded.
065    *
066    * @param autofocus
067    *    The new value for this attribute.
068    *    Typically a {@link Boolean} or {@link String}.
069    * @return This object.
070    */
071   public final Textarea autofocus(Boolean autofocus) {
072      attr("autofocus", autofocus);
073      return this;
074   }
075
076   /**
077    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-cols">cols</a> attribute.
078    *
079    * <p>
080    * Maximum number of characters per line.
081    *
082    * @param cols
083    *    The new value for this attribute.
084    *    Typically a {@link Number} or {@link String}.
085    * @return This object.
086    */
087   public final Textarea cols(Object cols) {
088      attr("cols", cols);
089      return this;
090   }
091
092   /**
093    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-dirname">dirname</a> attribute.
094    *
095    * <p>
096    * Name of form field to use for sending the element's directionality in form submission.
097    *
098    * @param dirname The new value for this attribute.
099    * @return This object.
100    */
101   public final Textarea dirname(String dirname) {
102      attr("dirname", dirname);
103      return this;
104   }
105
106   /**
107    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-disabled">disabled</a> attribute.
108    *
109    * <p>
110    * Whether the form control is disabled.
111    *
112    * @param disabled
113    *    The new value for this attribute.
114    *    Typically a {@link Boolean} or {@link String}.
115    * @return This object.
116    */
117   public final Textarea disabled(Object disabled) {
118      attr("disabled", deminimize(disabled, "disabled"));
119      return this;
120   }
121
122   /**
123    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fae-form">form</a> attribute.
124    *
125    * <p>
126    * Associates the control with a form element.
127    *
128    * @param form The new value for this attribute.
129    * @return This object.
130    */
131   public final Textarea form(String form) {
132      attr("form", form);
133      return this;
134   }
135
136   /**
137    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#inputmode">inputmode</a> attribute.
138    *
139    * <p>
140    * Hint for selecting an input modality.
141    *
142    * @param inputmode The new value for this attribute.
143    * @return This object.
144    */
145   public final Textarea inputmode(String inputmode) {
146      attr("inputmode", inputmode);
147      return this;
148   }
149
150   /**
151    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-maxlength">maxlength</a> attribute.
152    *
153    * <p>
154    * Maximum length of value.
155    *
156    * @param maxlength
157    *    The new value for this attribute.
158    *    Typically a {@link Number} or {@link String}.
159    * @return This object.
160    */
161   public final Textarea maxlength(Object maxlength) {
162      attr("maxlength", maxlength);
163      return this;
164   }
165
166   /**
167    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-minlength">minlength</a> attribute.
168    *
169    * <p>
170    * Minimum length of value.
171    *
172    * @param minlength
173    *    The new value for this attribute.
174    *    Typically a {@link Number} or {@link String}.
175    * @return This object.
176    */
177   public final Textarea minlength(Object minlength) {
178      attr("minlength", minlength);
179      return this;
180   }
181
182   /**
183    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-fe-name">name</a> attribute.
184    *
185    * <p>
186    * Name of form control to use for form submission and in the form.elements API.
187    *
188    * @param name The new value for this attribute.
189    * @return This object.
190    */
191   public final Textarea name(String name) {
192      attr("name", name);
193      return this;
194   }
195
196   /**
197    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-placeholder">placeholder</a>
198    * attribute.
199    *
200    * <p>
201    * User-visible label to be placed within the form control.
202    *
203    * @param placeholder The new value for this attribute.
204    * @return This object.
205    */
206   public final Textarea placeholder(String placeholder) {
207      attr("placeholder", placeholder);
208      return this;
209   }
210
211   /**
212    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-readonly">readonly</a> attribute.
213    *
214    * <p>
215    * Whether to allow the value to be edited by the user.
216    *
217    * @param readonly
218    *    The new value for this attribute.
219    *    Typically a {@link Boolean} or {@link String}.
220    * @return This object.
221    */
222   public final Textarea readonly(Object readonly) {
223      attr("readonly", readonly);
224      return this;
225   }
226
227   /**
228    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-required">required</a> attribute.
229    *
230    * <p>
231    * Whether the control is required for form submission.
232    *
233    * @param required
234    *    The new value for this attribute.
235    *    Typically a {@link Boolean} or {@link String}.
236    * @return This object.
237    */
238   public final Textarea required(Object required) {
239      attr("required", required);
240      return this;
241   }
242
243   /**
244    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-rows">rows</a> attribute.
245    *
246    * <p>
247    * Number of lines to show.
248    *
249    * @param rows
250    *    The new value for this attribute.
251    *    Typically a {@link Number} or {@link String}.
252    * @return This object.
253    */
254   public final Textarea rows(Number rows) {
255      attr("rows", rows);
256      return this;
257   }
258
259   /**
260    * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-textarea-wrap">wrap</a> attribute.
261    *
262    * <p>
263    * How the value of the form control is to be wrapped for form submission.
264    *
265    * @param wrap The new value for this attribute.
266    * @return This object.
267    */
268   public final Textarea wrap(String wrap) {
269      attr("wrap", wrap);
270      return this;
271   }
272
273
274   //-----------------------------------------------------------------------------------------------------------------
275   // Overridden methods
276   //-----------------------------------------------------------------------------------------------------------------
277
278   // <FluentSetters>
279
280   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
281   public Textarea _class(String _class) {
282      super._class(_class);
283      return this;
284   }
285
286   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
287   public Textarea accesskey(String accesskey) {
288      super.accesskey(accesskey);
289      return this;
290   }
291
292   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
293   public Textarea contenteditable(Object contenteditable) {
294      super.contenteditable(contenteditable);
295      return this;
296   }
297
298   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
299   public Textarea dir(String dir) {
300      super.dir(dir);
301      return this;
302   }
303
304   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
305   public Textarea hidden(Object hidden) {
306      super.hidden(hidden);
307      return this;
308   }
309
310   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
311   public Textarea id(String id) {
312      super.id(id);
313      return this;
314   }
315
316   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
317   public Textarea lang(String lang) {
318      super.lang(lang);
319      return this;
320   }
321
322   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
323   public Textarea onabort(String onabort) {
324      super.onabort(onabort);
325      return this;
326   }
327
328   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
329   public Textarea onblur(String onblur) {
330      super.onblur(onblur);
331      return this;
332   }
333
334   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
335   public Textarea oncancel(String oncancel) {
336      super.oncancel(oncancel);
337      return this;
338   }
339
340   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
341   public Textarea oncanplay(String oncanplay) {
342      super.oncanplay(oncanplay);
343      return this;
344   }
345
346   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
347   public Textarea oncanplaythrough(String oncanplaythrough) {
348      super.oncanplaythrough(oncanplaythrough);
349      return this;
350   }
351
352   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
353   public Textarea onchange(String onchange) {
354      super.onchange(onchange);
355      return this;
356   }
357
358   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
359   public Textarea onclick(String onclick) {
360      super.onclick(onclick);
361      return this;
362   }
363
364   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
365   public Textarea oncuechange(String oncuechange) {
366      super.oncuechange(oncuechange);
367      return this;
368   }
369
370   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
371   public Textarea ondblclick(String ondblclick) {
372      super.ondblclick(ondblclick);
373      return this;
374   }
375
376   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
377   public Textarea ondurationchange(String ondurationchange) {
378      super.ondurationchange(ondurationchange);
379      return this;
380   }
381
382   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
383   public Textarea onemptied(String onemptied) {
384      super.onemptied(onemptied);
385      return this;
386   }
387
388   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
389   public Textarea onended(String onended) {
390      super.onended(onended);
391      return this;
392   }
393
394   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
395   public Textarea onerror(String onerror) {
396      super.onerror(onerror);
397      return this;
398   }
399
400   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
401   public Textarea onfocus(String onfocus) {
402      super.onfocus(onfocus);
403      return this;
404   }
405
406   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
407   public Textarea oninput(String oninput) {
408      super.oninput(oninput);
409      return this;
410   }
411
412   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
413   public Textarea oninvalid(String oninvalid) {
414      super.oninvalid(oninvalid);
415      return this;
416   }
417
418   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
419   public Textarea onkeydown(String onkeydown) {
420      super.onkeydown(onkeydown);
421      return this;
422   }
423
424   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
425   public Textarea onkeypress(String onkeypress) {
426      super.onkeypress(onkeypress);
427      return this;
428   }
429
430   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
431   public Textarea onkeyup(String onkeyup) {
432      super.onkeyup(onkeyup);
433      return this;
434   }
435
436   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
437   public Textarea onload(String onload) {
438      super.onload(onload);
439      return this;
440   }
441
442   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
443   public Textarea onloadeddata(String onloadeddata) {
444      super.onloadeddata(onloadeddata);
445      return this;
446   }
447
448   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
449   public Textarea onloadedmetadata(String onloadedmetadata) {
450      super.onloadedmetadata(onloadedmetadata);
451      return this;
452   }
453
454   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
455   public Textarea onloadstart(String onloadstart) {
456      super.onloadstart(onloadstart);
457      return this;
458   }
459
460   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
461   public Textarea onmousedown(String onmousedown) {
462      super.onmousedown(onmousedown);
463      return this;
464   }
465
466   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
467   public Textarea onmouseenter(String onmouseenter) {
468      super.onmouseenter(onmouseenter);
469      return this;
470   }
471
472   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
473   public Textarea onmouseleave(String onmouseleave) {
474      super.onmouseleave(onmouseleave);
475      return this;
476   }
477
478   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
479   public Textarea onmousemove(String onmousemove) {
480      super.onmousemove(onmousemove);
481      return this;
482   }
483
484   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
485   public Textarea onmouseout(String onmouseout) {
486      super.onmouseout(onmouseout);
487      return this;
488   }
489
490   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
491   public Textarea onmouseover(String onmouseover) {
492      super.onmouseover(onmouseover);
493      return this;
494   }
495
496   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
497   public Textarea onmouseup(String onmouseup) {
498      super.onmouseup(onmouseup);
499      return this;
500   }
501
502   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
503   public Textarea onmousewheel(String onmousewheel) {
504      super.onmousewheel(onmousewheel);
505      return this;
506   }
507
508   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
509   public Textarea onpause(String onpause) {
510      super.onpause(onpause);
511      return this;
512   }
513
514   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
515   public Textarea onplay(String onplay) {
516      super.onplay(onplay);
517      return this;
518   }
519
520   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
521   public Textarea onplaying(String onplaying) {
522      super.onplaying(onplaying);
523      return this;
524   }
525
526   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
527   public Textarea onprogress(String onprogress) {
528      super.onprogress(onprogress);
529      return this;
530   }
531
532   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
533   public Textarea onratechange(String onratechange) {
534      super.onratechange(onratechange);
535      return this;
536   }
537
538   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
539   public Textarea onreset(String onreset) {
540      super.onreset(onreset);
541      return this;
542   }
543
544   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
545   public Textarea onresize(String onresize) {
546      super.onresize(onresize);
547      return this;
548   }
549
550   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
551   public Textarea onscroll(String onscroll) {
552      super.onscroll(onscroll);
553      return this;
554   }
555
556   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
557   public Textarea onseeked(String onseeked) {
558      super.onseeked(onseeked);
559      return this;
560   }
561
562   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
563   public Textarea onseeking(String onseeking) {
564      super.onseeking(onseeking);
565      return this;
566   }
567
568   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
569   public Textarea onselect(String onselect) {
570      super.onselect(onselect);
571      return this;
572   }
573
574   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
575   public Textarea onshow(String onshow) {
576      super.onshow(onshow);
577      return this;
578   }
579
580   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
581   public Textarea onstalled(String onstalled) {
582      super.onstalled(onstalled);
583      return this;
584   }
585
586   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
587   public Textarea onsubmit(String onsubmit) {
588      super.onsubmit(onsubmit);
589      return this;
590   }
591
592   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
593   public Textarea onsuspend(String onsuspend) {
594      super.onsuspend(onsuspend);
595      return this;
596   }
597
598   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
599   public Textarea ontimeupdate(String ontimeupdate) {
600      super.ontimeupdate(ontimeupdate);
601      return this;
602   }
603
604   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
605   public Textarea ontoggle(String ontoggle) {
606      super.ontoggle(ontoggle);
607      return this;
608   }
609
610   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
611   public Textarea onvolumechange(String onvolumechange) {
612      super.onvolumechange(onvolumechange);
613      return this;
614   }
615
616   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
617   public Textarea onwaiting(String onwaiting) {
618      super.onwaiting(onwaiting);
619      return this;
620   }
621
622   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
623   public Textarea spellcheck(Object spellcheck) {
624      super.spellcheck(spellcheck);
625      return this;
626   }
627
628   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
629   public Textarea style(String style) {
630      super.style(style);
631      return this;
632   }
633
634   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
635   public Textarea tabindex(Object tabindex) {
636      super.tabindex(tabindex);
637      return this;
638   }
639
640   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
641   public Textarea title(String title) {
642      super.title(title);
643      return this;
644   }
645
646   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
647   public Textarea translate(Object translate) {
648      super.translate(translate);
649      return this;
650   }
651
652   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElementRawText */
653   public Textarea text(Object text) {
654      super.text(text);
655      return this;
656   }
657
658   // </FluentSetters>
659}