001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.juneau.bean.html5; 018 019import org.apache.juneau.annotation.*; 020 021/** 022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#the-progress-element"><progress></a> 023 * element. 024 * 025 * <p> 026 * The progress element represents the completion progress of a task. It is used to display 027 * the progress of an operation, such as file uploads, downloads, or any other task that 028 * has a defined completion state. The progress element can show both determinate progress 029 * (when the total amount of work is known) and indeterminate progress (when the total amount 030 * of work is unknown). It is typically rendered as a progress bar that fills up as the task 031 * progresses. 032 * 033 * <h5 class='section'>Examples:</h5> 034 * <p class='bcode w800'> 035 * <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*; 036 * 037 * <jc>// Simple progress bar</jc> 038 * Progress <jv>simple</jv> = <jsm>progress</jsm>() 039 * .value(50) 040 * .max(100); 041 * 042 * <jc>// Progress with styling</jc> 043 * Progress <jv>styled</jv> = <jsm>progress</jsm>() 044 * ._class(<js>"file-upload-progress"</js>) 045 * .value(75) 046 * .max(100); 047 * 048 * <jc>// Progress with complex content</jc> 049 * Progress <jv>complex</jv> = <jsm>progress</jsm>(<js>"60% complete"</js>) 050 * .value(60) 051 * .max(100); 052 * 053 * <jc>// Progress with ID</jc> 054 * Progress <jv>withId</jv> = <jsm>progress</jsm>() 055 * .id(<js>"download-progress"</js>) 056 * .value(30) 057 * .max(100); 058 * 059 * <jc>// Progress with styling</jc> 060 * Progress <jv>styled2</jv> = <jsm>progress</jsm>() 061 * .style(<js>"width: 300px; height: 20px;"</js>) 062 * .value(40) 063 * .max(100); 064 * 065 * <jc>// Progress with multiple attributes</jc> 066 * Progress <jv>multiple</jv> = <jsm>progress</jsm>(<js>"85% complete"</js>) 067 * .value(85) 068 * .max(100) 069 * .title(<js>"Upload Progress: 85%"</js>); 070 * 071 * <jc>// Progress with form</jc> 072 * Progress <jv>withForm</jv> = <jsm>progress</jsm>() 073 * .form(<js>"upload-form"</js>) 074 * .value(25) 075 * .max(100); 076 * 077 * // Indeterminate progress 078 * Progress indeterminate = new Progress() 079 * .children("Loading..."); 080 * </p> 081 * 082 * <h5 class='section'>See Also:</h5><ul> 083 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 084 * </ul> 085 */ 086@Bean(typeName = "progress") 087public class Progress extends HtmlElementMixed { 088 089 /** 090 * Creates an empty {@link Progress} element. 091 */ 092 public Progress() {} 093 094 /** 095 * Creates a {@link Progress} element with the specified child nodes. 096 * 097 * @param children The child nodes. 098 */ 099 public Progress(Object...children) { 100 children(children); 101 } 102 103 @Override /* Overridden from HtmlElement */ 104 public Progress _class(String value) { // NOSONAR - Intentional naming. 105 super._class(value); 106 return this; 107 } 108 109 @Override /* Overridden from HtmlElement */ 110 public Progress accesskey(String value) { 111 super.accesskey(value); 112 return this; 113 } 114 115 @Override /* Overridden from HtmlElement */ 116 public Progress attr(String key, Object val) { 117 super.attr(key, val); 118 return this; 119 } 120 121 @Override /* Overridden from HtmlElement */ 122 public Progress attrUri(String key, Object val) { 123 super.attrUri(key, val); 124 return this; 125 } 126 127 @Override /* Overridden from HtmlElementMixed */ 128 public Progress child(Object value) { 129 super.child(value); 130 return this; 131 } 132 133 @Override /* Overridden from HtmlElementMixed */ 134 public Progress children(Object...value) { 135 super.children(value); 136 return this; 137 } 138 139 @Override /* Overridden from HtmlElement */ 140 public Progress contenteditable(Object value) { 141 super.contenteditable(value); 142 return this; 143 } 144 145 @Override /* Overridden from HtmlElement */ 146 public Progress dir(String value) { 147 super.dir(value); 148 return this; 149 } 150 151 @Override /* Overridden from HtmlElement */ 152 public Progress hidden(Object value) { 153 super.hidden(value); 154 return this; 155 } 156 157 @Override /* Overridden from HtmlElement */ 158 public Progress id(String value) { 159 super.id(value); 160 return this; 161 } 162 163 @Override /* Overridden from HtmlElement */ 164 public Progress lang(String value) { 165 super.lang(value); 166 return this; 167 } 168 169 /** 170 * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-progress-max">max</a> attribute. 171 * 172 * <p> 173 * Upper bound of range. 174 * 175 * @param value 176 * The new value for this attribute. 177 * Typically a {@link Number} or {@link String}. 178 * @return This object. 179 */ 180 public Progress max(Object value) { 181 attr("max", value); 182 return this; 183 } 184 185 @Override /* Overridden from HtmlElement */ 186 public Progress onabort(String value) { 187 super.onabort(value); 188 return this; 189 } 190 191 @Override /* Overridden from HtmlElement */ 192 public Progress onblur(String value) { 193 super.onblur(value); 194 return this; 195 } 196 197 @Override /* Overridden from HtmlElement */ 198 public Progress oncancel(String value) { 199 super.oncancel(value); 200 return this; 201 } 202 203 @Override /* Overridden from HtmlElement */ 204 public Progress oncanplay(String value) { 205 super.oncanplay(value); 206 return this; 207 } 208 209 @Override /* Overridden from HtmlElement */ 210 public Progress oncanplaythrough(String value) { 211 super.oncanplaythrough(value); 212 return this; 213 } 214 215 @Override /* Overridden from HtmlElement */ 216 public Progress onchange(String value) { 217 super.onchange(value); 218 return this; 219 } 220 221 @Override /* Overridden from HtmlElement */ 222 public Progress onclick(String value) { 223 super.onclick(value); 224 return this; 225 } 226 227 @Override /* Overridden from HtmlElement */ 228 public Progress oncuechange(String value) { 229 super.oncuechange(value); 230 return this; 231 } 232 233 @Override /* Overridden from HtmlElement */ 234 public Progress ondblclick(String value) { 235 super.ondblclick(value); 236 return this; 237 } 238 239 @Override /* Overridden from HtmlElement */ 240 public Progress ondurationchange(String value) { 241 super.ondurationchange(value); 242 return this; 243 } 244 245 @Override /* Overridden from HtmlElement */ 246 public Progress onemptied(String value) { 247 super.onemptied(value); 248 return this; 249 } 250 251 @Override /* Overridden from HtmlElement */ 252 public Progress onended(String value) { 253 super.onended(value); 254 return this; 255 } 256 257 @Override /* Overridden from HtmlElement */ 258 public Progress onerror(String value) { 259 super.onerror(value); 260 return this; 261 } 262 263 @Override /* Overridden from HtmlElement */ 264 public Progress onfocus(String value) { 265 super.onfocus(value); 266 return this; 267 } 268 269 @Override /* Overridden from HtmlElement */ 270 public Progress oninput(String value) { 271 super.oninput(value); 272 return this; 273 } 274 275 @Override /* Overridden from HtmlElement */ 276 public Progress oninvalid(String value) { 277 super.oninvalid(value); 278 return this; 279 } 280 281 @Override /* Overridden from HtmlElement */ 282 public Progress onkeydown(String value) { 283 super.onkeydown(value); 284 return this; 285 } 286 287 @Override /* Overridden from HtmlElement */ 288 public Progress onkeypress(String value) { 289 super.onkeypress(value); 290 return this; 291 } 292 293 @Override /* Overridden from HtmlElement */ 294 public Progress onkeyup(String value) { 295 super.onkeyup(value); 296 return this; 297 } 298 299 @Override /* Overridden from HtmlElement */ 300 public Progress onload(String value) { 301 super.onload(value); 302 return this; 303 } 304 305 @Override /* Overridden from HtmlElement */ 306 public Progress onloadeddata(String value) { 307 super.onloadeddata(value); 308 return this; 309 } 310 311 @Override /* Overridden from HtmlElement */ 312 public Progress onloadedmetadata(String value) { 313 super.onloadedmetadata(value); 314 return this; 315 } 316 317 @Override /* Overridden from HtmlElement */ 318 public Progress onloadstart(String value) { 319 super.onloadstart(value); 320 return this; 321 } 322 323 @Override /* Overridden from HtmlElement */ 324 public Progress onmousedown(String value) { 325 super.onmousedown(value); 326 return this; 327 } 328 329 @Override /* Overridden from HtmlElement */ 330 public Progress onmouseenter(String value) { 331 super.onmouseenter(value); 332 return this; 333 } 334 335 @Override /* Overridden from HtmlElement */ 336 public Progress onmouseleave(String value) { 337 super.onmouseleave(value); 338 return this; 339 } 340 341 @Override /* Overridden from HtmlElement */ 342 public Progress onmousemove(String value) { 343 super.onmousemove(value); 344 return this; 345 } 346 347 @Override /* Overridden from HtmlElement */ 348 public Progress onmouseout(String value) { 349 super.onmouseout(value); 350 return this; 351 } 352 353 @Override /* Overridden from HtmlElement */ 354 public Progress onmouseover(String value) { 355 super.onmouseover(value); 356 return this; 357 } 358 359 @Override /* Overridden from HtmlElement */ 360 public Progress onmouseup(String value) { 361 super.onmouseup(value); 362 return this; 363 } 364 365 @Override /* Overridden from HtmlElement */ 366 public Progress onmousewheel(String value) { 367 super.onmousewheel(value); 368 return this; 369 } 370 371 @Override /* Overridden from HtmlElement */ 372 public Progress onpause(String value) { 373 super.onpause(value); 374 return this; 375 } 376 377 @Override /* Overridden from HtmlElement */ 378 public Progress onplay(String value) { 379 super.onplay(value); 380 return this; 381 } 382 383 @Override /* Overridden from HtmlElement */ 384 public Progress onplaying(String value) { 385 super.onplaying(value); 386 return this; 387 } 388 389 @Override /* Overridden from HtmlElement */ 390 public Progress onprogress(String value) { 391 super.onprogress(value); 392 return this; 393 } 394 395 @Override /* Overridden from HtmlElement */ 396 public Progress onratechange(String value) { 397 super.onratechange(value); 398 return this; 399 } 400 401 @Override /* Overridden from HtmlElement */ 402 public Progress onreset(String value) { 403 super.onreset(value); 404 return this; 405 } 406 407 @Override /* Overridden from HtmlElement */ 408 public Progress onresize(String value) { 409 super.onresize(value); 410 return this; 411 } 412 413 @Override /* Overridden from HtmlElement */ 414 public Progress onscroll(String value) { 415 super.onscroll(value); 416 return this; 417 } 418 419 @Override /* Overridden from HtmlElement */ 420 public Progress onseeked(String value) { 421 super.onseeked(value); 422 return this; 423 } 424 425 @Override /* Overridden from HtmlElement */ 426 public Progress onseeking(String value) { 427 super.onseeking(value); 428 return this; 429 } 430 431 @Override /* Overridden from HtmlElement */ 432 public Progress onselect(String value) { 433 super.onselect(value); 434 return this; 435 } 436 437 @Override /* Overridden from HtmlElement */ 438 public Progress onshow(String value) { 439 super.onshow(value); 440 return this; 441 } 442 443 @Override /* Overridden from HtmlElement */ 444 public Progress onstalled(String value) { 445 super.onstalled(value); 446 return this; 447 } 448 449 @Override /* Overridden from HtmlElement */ 450 public Progress onsubmit(String value) { 451 super.onsubmit(value); 452 return this; 453 } 454 455 @Override /* Overridden from HtmlElement */ 456 public Progress onsuspend(String value) { 457 super.onsuspend(value); 458 return this; 459 } 460 461 @Override /* Overridden from HtmlElement */ 462 public Progress ontimeupdate(String value) { 463 super.ontimeupdate(value); 464 return this; 465 } 466 467 @Override /* Overridden from HtmlElement */ 468 public Progress ontoggle(String value) { 469 super.ontoggle(value); 470 return this; 471 } 472 473 @Override /* Overridden from HtmlElement */ 474 public Progress onvolumechange(String value) { 475 super.onvolumechange(value); 476 return this; 477 } 478 479 @Override /* Overridden from HtmlElement */ 480 public Progress onwaiting(String value) { 481 super.onwaiting(value); 482 return this; 483 } 484 485 @Override /* Overridden from HtmlElement */ 486 public Progress spellcheck(Object value) { 487 super.spellcheck(value); 488 return this; 489 } 490 491 @Override /* Overridden from HtmlElement */ 492 public Progress style(String value) { 493 super.style(value); 494 return this; 495 } 496 497 @Override /* Overridden from HtmlElement */ 498 public Progress tabindex(Object value) { 499 super.tabindex(value); 500 return this; 501 } 502 503 @Override /* Overridden from HtmlElement */ 504 public Progress title(String value) { 505 super.title(value); 506 return this; 507 } 508 509 @Override /* Overridden from HtmlElement */ 510 public Progress translate(Object value) { 511 super.translate(value); 512 return this; 513 } 514 515 /** 516 * <a class="doclink" href="https://www.w3.org/TR/html5/forms.html#attr-progress-value">value</a> attribute. 517 * 518 * <p> 519 * Current value of the element. 520 * 521 * @param value 522 * The new value for this attribute. 523 * Typically a {@link Number} or {@link String}. 524 * @return This object. 525 */ 526 public Progress value(Object value) { 527 attr("value", value); 528 return this; 529 } 530}