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/sections.html#the-section-element"><section></a> 023 * element. 024 * 025 * <p> 026 * The section element represents a generic section of a document or application. It is used 027 * to group related content together and create a logical structure within a document. The 028 * section element should have a heading (h1-h6) to identify the section's topic and is 029 * typically used to divide content into thematic groups. It is important for creating 030 * accessible document structure and helps screen readers understand the organization of content. 031 * 032 * <h5 class='section'>Examples:</h5> 033 * <p class='bcode w800'> 034 * <jc>// Simple section</jc> 035 * Section <jv>simple</jv> = <jsm>section</jsm>( 036 * <jsm>h2</jsm>(<js>"Introduction"</js>), 037 * <jsm>p</jsm>(<js>"This is the introduction section."</js>) 038 * ); 039 * 040 * <jc>// Section with styling</jc> 041 * Section <jv>styled</jv> = <jsm>section</jsm>( 042 * <jsm>h2</jsm>(<js>"Features"</js>), 043 * <jsm>p</jsm>(<js>"Here are the key features of our product."</js>) 044 * )._class(<js>"content-section"</js>); 045 * 046 * <jc>// Section with complex content</jc> 047 * Section <jv>complex</jv> = <jsm>section</jsm>( 048 * <jsm>h2</jsm>(<js>"Getting Started"</js>), 049 * <jsm>p</jsm>(<js>"Follow these steps to get started:"</js>), 050 * <jsm>ol</jsm>( 051 * <jsm>li</jsm>(<js>"Step 1: Install the software"</js>), 052 * <jsm>li</jsm>(<js>"Step 2: Configure settings"</js>), 053 * <jsm>li</jsm>(<js>"Step 3: Start using the application"</js>) 054 * ) 055 * ); 056 * 057 * <jc>// Section with ID</jc> 058 * Section <jv>withId</jv> = <jsm>section</jsm>( 059 * <jsm>h2</jsm>(<js>"Main Content"</js>), 060 * <jsm>p</jsm>(<js>"This is the main content section."</js>) 061 * ).id(<js>"main-content"</js>); 062 * 063 * <jc>// Section with styling</jc> 064 * Section <jv>styled2</jv> = <jsm>section</jsm>( 065 * <jsm>h2</jsm>(<js>"Styled Section"</js>), 066 * <jsm>p</jsm>(<js>"This section has custom styling."</js>) 067 * ).style(<js>"background-color: #f9f9f9; padding: 20px; margin: 10px 0;"</js>); 068 * 069 * <jc>// Section with multiple elements</jc> 070 * Section <jv>multiple</jv> = <jsm>section</jsm>( 071 * <jsm>h2</jsm>(<js>"Documentation"</js>), 072 * <jsm>p</jsm>(<js>"This section contains documentation."</js>), 073 * <jsm>ul</jsm>( 074 * <jsm>li</jsm>(<js>"API Reference"</js>), 075 * <jsm>li</jsm>(<js>"User Guide"</js>), 076 * <jsm>li</jsm>(<js>"Examples"</js>) 077 * ), 078 * <jsm>footer</jsm>(<js>"Last updated: January 2024"</js>) 079 * ); 080 * 081 * <jc>// Section with article</jc> 082 * Section <jv>withArticle</jv> = <jsm>section</jsm>( 083 * <jsm>h2</jsm>(<js>"Latest News"</js>), 084 * <jsm>article</jsm>( 085 * <jsm>h3</jsm>(<js>"News Article Title"</js>), 086 * <jsm>p</jsm>(<js>"Article content goes here."</js>) 087 * ) 088 * ); 089 * </p> 090 * 091 * <h5 class='section'>See Also:</h5><ul> 092 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 093 * </ul> 094 */ 095@Bean(typeName = "section") 096public class Section extends HtmlElementMixed { 097 098 /** 099 * Creates an empty {@link Section} element. 100 */ 101 public Section() {} 102 103 /** 104 * Creates a {@link Section} element with the specified child nodes. 105 * 106 * @param children The child nodes. 107 */ 108 public Section(Object...children) { 109 children(children); 110 } 111 112 @Override /* Overridden from HtmlElement */ 113 public Section _class(String value) { // NOSONAR - Intentional naming. 114 super._class(value); 115 return this; 116 } 117 118 @Override /* Overridden from HtmlElement */ 119 public Section accesskey(String value) { 120 super.accesskey(value); 121 return this; 122 } 123 124 @Override /* Overridden from HtmlElement */ 125 public Section attr(String key, Object val) { 126 super.attr(key, val); 127 return this; 128 } 129 130 @Override /* Overridden from HtmlElement */ 131 public Section attrUri(String key, Object val) { 132 super.attrUri(key, val); 133 return this; 134 } 135 136 @Override /* Overridden from HtmlElementMixed */ 137 public Section child(Object value) { 138 super.child(value); 139 return this; 140 } 141 142 @Override /* Overridden from HtmlElementMixed */ 143 public Section children(Object...value) { 144 super.children(value); 145 return this; 146 } 147 148 @Override /* Overridden from HtmlElement */ 149 public Section contenteditable(Object value) { 150 super.contenteditable(value); 151 return this; 152 } 153 154 @Override /* Overridden from HtmlElement */ 155 public Section dir(String value) { 156 super.dir(value); 157 return this; 158 } 159 160 @Override /* Overridden from HtmlElement */ 161 public Section hidden(Object value) { 162 super.hidden(value); 163 return this; 164 } 165 166 @Override /* Overridden from HtmlElement */ 167 public Section id(String value) { 168 super.id(value); 169 return this; 170 } 171 172 @Override /* Overridden from HtmlElement */ 173 public Section lang(String value) { 174 super.lang(value); 175 return this; 176 } 177 178 @Override /* Overridden from HtmlElement */ 179 public Section onabort(String value) { 180 super.onabort(value); 181 return this; 182 } 183 184 @Override /* Overridden from HtmlElement */ 185 public Section onblur(String value) { 186 super.onblur(value); 187 return this; 188 } 189 190 @Override /* Overridden from HtmlElement */ 191 public Section oncancel(String value) { 192 super.oncancel(value); 193 return this; 194 } 195 196 @Override /* Overridden from HtmlElement */ 197 public Section oncanplay(String value) { 198 super.oncanplay(value); 199 return this; 200 } 201 202 @Override /* Overridden from HtmlElement */ 203 public Section oncanplaythrough(String value) { 204 super.oncanplaythrough(value); 205 return this; 206 } 207 208 @Override /* Overridden from HtmlElement */ 209 public Section onchange(String value) { 210 super.onchange(value); 211 return this; 212 } 213 214 @Override /* Overridden from HtmlElement */ 215 public Section onclick(String value) { 216 super.onclick(value); 217 return this; 218 } 219 220 @Override /* Overridden from HtmlElement */ 221 public Section oncuechange(String value) { 222 super.oncuechange(value); 223 return this; 224 } 225 226 @Override /* Overridden from HtmlElement */ 227 public Section ondblclick(String value) { 228 super.ondblclick(value); 229 return this; 230 } 231 232 @Override /* Overridden from HtmlElement */ 233 public Section ondurationchange(String value) { 234 super.ondurationchange(value); 235 return this; 236 } 237 238 @Override /* Overridden from HtmlElement */ 239 public Section onemptied(String value) { 240 super.onemptied(value); 241 return this; 242 } 243 244 @Override /* Overridden from HtmlElement */ 245 public Section onended(String value) { 246 super.onended(value); 247 return this; 248 } 249 250 @Override /* Overridden from HtmlElement */ 251 public Section onerror(String value) { 252 super.onerror(value); 253 return this; 254 } 255 256 @Override /* Overridden from HtmlElement */ 257 public Section onfocus(String value) { 258 super.onfocus(value); 259 return this; 260 } 261 262 @Override /* Overridden from HtmlElement */ 263 public Section oninput(String value) { 264 super.oninput(value); 265 return this; 266 } 267 268 @Override /* Overridden from HtmlElement */ 269 public Section oninvalid(String value) { 270 super.oninvalid(value); 271 return this; 272 } 273 274 @Override /* Overridden from HtmlElement */ 275 public Section onkeydown(String value) { 276 super.onkeydown(value); 277 return this; 278 } 279 280 @Override /* Overridden from HtmlElement */ 281 public Section onkeypress(String value) { 282 super.onkeypress(value); 283 return this; 284 } 285 286 @Override /* Overridden from HtmlElement */ 287 public Section onkeyup(String value) { 288 super.onkeyup(value); 289 return this; 290 } 291 292 @Override /* Overridden from HtmlElement */ 293 public Section onload(String value) { 294 super.onload(value); 295 return this; 296 } 297 298 @Override /* Overridden from HtmlElement */ 299 public Section onloadeddata(String value) { 300 super.onloadeddata(value); 301 return this; 302 } 303 304 @Override /* Overridden from HtmlElement */ 305 public Section onloadedmetadata(String value) { 306 super.onloadedmetadata(value); 307 return this; 308 } 309 310 @Override /* Overridden from HtmlElement */ 311 public Section onloadstart(String value) { 312 super.onloadstart(value); 313 return this; 314 } 315 316 @Override /* Overridden from HtmlElement */ 317 public Section onmousedown(String value) { 318 super.onmousedown(value); 319 return this; 320 } 321 322 @Override /* Overridden from HtmlElement */ 323 public Section onmouseenter(String value) { 324 super.onmouseenter(value); 325 return this; 326 } 327 328 @Override /* Overridden from HtmlElement */ 329 public Section onmouseleave(String value) { 330 super.onmouseleave(value); 331 return this; 332 } 333 334 @Override /* Overridden from HtmlElement */ 335 public Section onmousemove(String value) { 336 super.onmousemove(value); 337 return this; 338 } 339 340 @Override /* Overridden from HtmlElement */ 341 public Section onmouseout(String value) { 342 super.onmouseout(value); 343 return this; 344 } 345 346 @Override /* Overridden from HtmlElement */ 347 public Section onmouseover(String value) { 348 super.onmouseover(value); 349 return this; 350 } 351 352 @Override /* Overridden from HtmlElement */ 353 public Section onmouseup(String value) { 354 super.onmouseup(value); 355 return this; 356 } 357 358 @Override /* Overridden from HtmlElement */ 359 public Section onmousewheel(String value) { 360 super.onmousewheel(value); 361 return this; 362 } 363 364 @Override /* Overridden from HtmlElement */ 365 public Section onpause(String value) { 366 super.onpause(value); 367 return this; 368 } 369 370 @Override /* Overridden from HtmlElement */ 371 public Section onplay(String value) { 372 super.onplay(value); 373 return this; 374 } 375 376 @Override /* Overridden from HtmlElement */ 377 public Section onplaying(String value) { 378 super.onplaying(value); 379 return this; 380 } 381 382 @Override /* Overridden from HtmlElement */ 383 public Section onprogress(String value) { 384 super.onprogress(value); 385 return this; 386 } 387 388 @Override /* Overridden from HtmlElement */ 389 public Section onratechange(String value) { 390 super.onratechange(value); 391 return this; 392 } 393 394 @Override /* Overridden from HtmlElement */ 395 public Section onreset(String value) { 396 super.onreset(value); 397 return this; 398 } 399 400 @Override /* Overridden from HtmlElement */ 401 public Section onresize(String value) { 402 super.onresize(value); 403 return this; 404 } 405 406 @Override /* Overridden from HtmlElement */ 407 public Section onscroll(String value) { 408 super.onscroll(value); 409 return this; 410 } 411 412 @Override /* Overridden from HtmlElement */ 413 public Section onseeked(String value) { 414 super.onseeked(value); 415 return this; 416 } 417 418 @Override /* Overridden from HtmlElement */ 419 public Section onseeking(String value) { 420 super.onseeking(value); 421 return this; 422 } 423 424 @Override /* Overridden from HtmlElement */ 425 public Section onselect(String value) { 426 super.onselect(value); 427 return this; 428 } 429 430 @Override /* Overridden from HtmlElement */ 431 public Section onshow(String value) { 432 super.onshow(value); 433 return this; 434 } 435 436 @Override /* Overridden from HtmlElement */ 437 public Section onstalled(String value) { 438 super.onstalled(value); 439 return this; 440 } 441 442 @Override /* Overridden from HtmlElement */ 443 public Section onsubmit(String value) { 444 super.onsubmit(value); 445 return this; 446 } 447 448 @Override /* Overridden from HtmlElement */ 449 public Section onsuspend(String value) { 450 super.onsuspend(value); 451 return this; 452 } 453 454 @Override /* Overridden from HtmlElement */ 455 public Section ontimeupdate(String value) { 456 super.ontimeupdate(value); 457 return this; 458 } 459 460 @Override /* Overridden from HtmlElement */ 461 public Section ontoggle(String value) { 462 super.ontoggle(value); 463 return this; 464 } 465 466 @Override /* Overridden from HtmlElement */ 467 public Section onvolumechange(String value) { 468 super.onvolumechange(value); 469 return this; 470 } 471 472 @Override /* Overridden from HtmlElement */ 473 public Section onwaiting(String value) { 474 super.onwaiting(value); 475 return this; 476 } 477 478 @Override /* Overridden from HtmlElement */ 479 public Section spellcheck(Object value) { 480 super.spellcheck(value); 481 return this; 482 } 483 484 @Override /* Overridden from HtmlElement */ 485 public Section style(String value) { 486 super.style(value); 487 return this; 488 } 489 490 @Override /* Overridden from HtmlElement */ 491 public Section tabindex(Object value) { 492 super.tabindex(value); 493 return this; 494 } 495 496 @Override /* Overridden from HtmlElement */ 497 public Section title(String value) { 498 super.title(value); 499 return this; 500 } 501 502 @Override /* Overridden from HtmlElement */ 503 public Section translate(Object value) { 504 super.translate(value); 505 return this; 506 } 507}