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 java.net.*;
016
017import org.apache.juneau.*;
018import org.apache.juneau.annotation.*;
019import org.apache.juneau.internal.*;
020
021/**
022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-img-element">&lt;img&gt;</a>
023 * element.
024 *
025 * <h5 class='section'>See Also:</h5><ul>
026 *    <li class='link'><a class="doclink" href="../../../../../index.html#jd.Html5">Overview &gt; juneau-dto &gt; HTML5</a>
027
028 * </ul>
029 */
030@Bean(typeName="img")
031@FluentSetters
032public class Img extends HtmlElementVoid {
033
034   /**
035    * Creates an empty {@link Img} element.
036    */
037   public Img() {}
038
039   /**
040    * Creates an {@link Img} element with the specified {@link Img#src(Object)} attribute.
041    *
042    * @param src The {@link Img#src(Object)} attribute.
043    */
044   public Img(Object src) {
045      src(src);
046   }
047
048   /**
049    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-alt">alt</a> attribute.
050    *
051    * <p>
052    * Replacement text for use when images are not available.
053    *
054    * @param alt The new value for this attribute.
055    * @return This object.
056    */
057   public final Img alt(String alt) {
058      attr("alt", alt);
059      return this;
060   }
061
062   /**
063    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-crossorigin">crossorigin</a>
064    * attribute.
065    *
066    * <p>
067    * How the element handles cross-origin requests.
068    *
069    * @param crossorigin The new value for this attribute.
070    * @return This object.
071    */
072   public final Img crossorigin(String crossorigin) {
073      attr("crossorigin", crossorigin);
074      return this;
075   }
076
077   /**
078    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height">height</a>
079    * attribute.
080    *
081    * <p>
082    * Vertical dimension.
083    *
084    * @param height
085    *    The new value for this attribute.
086    *    Typically a {@link Number} or {@link String}.
087    * @return This object.
088    */
089   public final Img height(Object height) {
090      attr("height", height);
091      return this;
092   }
093
094   /**
095    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-ismap">ismap</a> attribute.
096    *
097    * <p>
098    * Whether the image is a server-side image map.
099    *
100    * @param ismap
101    *    The new value for this attribute.
102    *    Typically a {@link Boolean} or {@link String}.
103    * @return This object.
104    */
105   public final Img ismap(Object ismap) {
106      attr("ismap", deminimize(ismap, "ismap"));
107      return this;
108   }
109
110   /**
111    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-img-src">src</a> attribute.
112    *
113    * <p>
114    * Address of the resource.
115    *
116    * <p>
117    * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}.
118    * Strings must be valid URIs.
119    *
120    * <p>
121    * URIs defined by {@link UriResolver} can be used for values.
122    *
123    * @param src
124    *    The new value for this attribute.
125    *    Typically a {@link URL} or {@link String}.
126    * @return This object.
127    */
128   public final Img src(Object src) {
129      attrUri("src", src);
130      return this;
131   }
132
133   /**
134    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-hyperlink-usemap">usemap</a>
135    * attribute.
136    *
137    * <p>
138    * Name of image map to use.
139    *
140    * @param usemap The new value for this attribute.
141    * @return This object.
142    */
143   public final Img usemap(String usemap) {
144      attr("usemap", usemap);
145      return this;
146   }
147
148   /**
149    * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute.
150    *
151    * <p>
152    * Horizontal dimension.
153    *
154    * @param width
155    *    The new value for this attribute.
156    *    Typically a {@link Number} or {@link String}.
157    * @return This object.
158    */
159   public final Img width(Object width) {
160      attr("width", width);
161      return this;
162   }
163
164
165   //-----------------------------------------------------------------------------------------------------------------
166   // Overridden methods
167   //-----------------------------------------------------------------------------------------------------------------
168
169   // <FluentSetters>
170
171   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
172   public Img _class(String _class) {
173      super._class(_class);
174      return this;
175   }
176
177   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
178   public Img accesskey(String accesskey) {
179      super.accesskey(accesskey);
180      return this;
181   }
182
183   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
184   public Img contenteditable(Object contenteditable) {
185      super.contenteditable(contenteditable);
186      return this;
187   }
188
189   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
190   public Img dir(String dir) {
191      super.dir(dir);
192      return this;
193   }
194
195   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
196   public Img hidden(Object hidden) {
197      super.hidden(hidden);
198      return this;
199   }
200
201   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
202   public Img id(String id) {
203      super.id(id);
204      return this;
205   }
206
207   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
208   public Img lang(String lang) {
209      super.lang(lang);
210      return this;
211   }
212
213   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
214   public Img onabort(String onabort) {
215      super.onabort(onabort);
216      return this;
217   }
218
219   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
220   public Img onblur(String onblur) {
221      super.onblur(onblur);
222      return this;
223   }
224
225   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
226   public Img oncancel(String oncancel) {
227      super.oncancel(oncancel);
228      return this;
229   }
230
231   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
232   public Img oncanplay(String oncanplay) {
233      super.oncanplay(oncanplay);
234      return this;
235   }
236
237   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
238   public Img oncanplaythrough(String oncanplaythrough) {
239      super.oncanplaythrough(oncanplaythrough);
240      return this;
241   }
242
243   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
244   public Img onchange(String onchange) {
245      super.onchange(onchange);
246      return this;
247   }
248
249   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
250   public Img onclick(String onclick) {
251      super.onclick(onclick);
252      return this;
253   }
254
255   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
256   public Img oncuechange(String oncuechange) {
257      super.oncuechange(oncuechange);
258      return this;
259   }
260
261   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
262   public Img ondblclick(String ondblclick) {
263      super.ondblclick(ondblclick);
264      return this;
265   }
266
267   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
268   public Img ondurationchange(String ondurationchange) {
269      super.ondurationchange(ondurationchange);
270      return this;
271   }
272
273   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
274   public Img onemptied(String onemptied) {
275      super.onemptied(onemptied);
276      return this;
277   }
278
279   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
280   public Img onended(String onended) {
281      super.onended(onended);
282      return this;
283   }
284
285   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
286   public Img onerror(String onerror) {
287      super.onerror(onerror);
288      return this;
289   }
290
291   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
292   public Img onfocus(String onfocus) {
293      super.onfocus(onfocus);
294      return this;
295   }
296
297   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
298   public Img oninput(String oninput) {
299      super.oninput(oninput);
300      return this;
301   }
302
303   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
304   public Img oninvalid(String oninvalid) {
305      super.oninvalid(oninvalid);
306      return this;
307   }
308
309   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
310   public Img onkeydown(String onkeydown) {
311      super.onkeydown(onkeydown);
312      return this;
313   }
314
315   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
316   public Img onkeypress(String onkeypress) {
317      super.onkeypress(onkeypress);
318      return this;
319   }
320
321   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
322   public Img onkeyup(String onkeyup) {
323      super.onkeyup(onkeyup);
324      return this;
325   }
326
327   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
328   public Img onload(String onload) {
329      super.onload(onload);
330      return this;
331   }
332
333   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
334   public Img onloadeddata(String onloadeddata) {
335      super.onloadeddata(onloadeddata);
336      return this;
337   }
338
339   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
340   public Img onloadedmetadata(String onloadedmetadata) {
341      super.onloadedmetadata(onloadedmetadata);
342      return this;
343   }
344
345   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
346   public Img onloadstart(String onloadstart) {
347      super.onloadstart(onloadstart);
348      return this;
349   }
350
351   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
352   public Img onmousedown(String onmousedown) {
353      super.onmousedown(onmousedown);
354      return this;
355   }
356
357   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
358   public Img onmouseenter(String onmouseenter) {
359      super.onmouseenter(onmouseenter);
360      return this;
361   }
362
363   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
364   public Img onmouseleave(String onmouseleave) {
365      super.onmouseleave(onmouseleave);
366      return this;
367   }
368
369   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
370   public Img onmousemove(String onmousemove) {
371      super.onmousemove(onmousemove);
372      return this;
373   }
374
375   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
376   public Img onmouseout(String onmouseout) {
377      super.onmouseout(onmouseout);
378      return this;
379   }
380
381   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
382   public Img onmouseover(String onmouseover) {
383      super.onmouseover(onmouseover);
384      return this;
385   }
386
387   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
388   public Img onmouseup(String onmouseup) {
389      super.onmouseup(onmouseup);
390      return this;
391   }
392
393   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
394   public Img onmousewheel(String onmousewheel) {
395      super.onmousewheel(onmousewheel);
396      return this;
397   }
398
399   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
400   public Img onpause(String onpause) {
401      super.onpause(onpause);
402      return this;
403   }
404
405   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
406   public Img onplay(String onplay) {
407      super.onplay(onplay);
408      return this;
409   }
410
411   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
412   public Img onplaying(String onplaying) {
413      super.onplaying(onplaying);
414      return this;
415   }
416
417   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
418   public Img onprogress(String onprogress) {
419      super.onprogress(onprogress);
420      return this;
421   }
422
423   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
424   public Img onratechange(String onratechange) {
425      super.onratechange(onratechange);
426      return this;
427   }
428
429   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
430   public Img onreset(String onreset) {
431      super.onreset(onreset);
432      return this;
433   }
434
435   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
436   public Img onresize(String onresize) {
437      super.onresize(onresize);
438      return this;
439   }
440
441   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
442   public Img onscroll(String onscroll) {
443      super.onscroll(onscroll);
444      return this;
445   }
446
447   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
448   public Img onseeked(String onseeked) {
449      super.onseeked(onseeked);
450      return this;
451   }
452
453   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
454   public Img onseeking(String onseeking) {
455      super.onseeking(onseeking);
456      return this;
457   }
458
459   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
460   public Img onselect(String onselect) {
461      super.onselect(onselect);
462      return this;
463   }
464
465   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
466   public Img onshow(String onshow) {
467      super.onshow(onshow);
468      return this;
469   }
470
471   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
472   public Img onstalled(String onstalled) {
473      super.onstalled(onstalled);
474      return this;
475   }
476
477   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
478   public Img onsubmit(String onsubmit) {
479      super.onsubmit(onsubmit);
480      return this;
481   }
482
483   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
484   public Img onsuspend(String onsuspend) {
485      super.onsuspend(onsuspend);
486      return this;
487   }
488
489   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
490   public Img ontimeupdate(String ontimeupdate) {
491      super.ontimeupdate(ontimeupdate);
492      return this;
493   }
494
495   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
496   public Img ontoggle(String ontoggle) {
497      super.ontoggle(ontoggle);
498      return this;
499   }
500
501   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
502   public Img onvolumechange(String onvolumechange) {
503      super.onvolumechange(onvolumechange);
504      return this;
505   }
506
507   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
508   public Img onwaiting(String onwaiting) {
509      super.onwaiting(onwaiting);
510      return this;
511   }
512
513   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
514   public Img spellcheck(Object spellcheck) {
515      super.spellcheck(spellcheck);
516      return this;
517   }
518
519   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
520   public Img style(String style) {
521      super.style(style);
522      return this;
523   }
524
525   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
526   public Img tabindex(Object tabindex) {
527      super.tabindex(tabindex);
528      return this;
529   }
530
531   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
532   public Img title(String title) {
533      super.title(title);
534      return this;
535   }
536
537   @Override /* GENERATED - org.apache.juneau.dto.html5.HtmlElement */
538   public Img translate(Object translate) {
539      super.translate(translate);
540      return this;
541   }
542
543   // </FluentSetters>
544}