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.marshall.*; 020 021/** 022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/text-level-semantics.html#the-wbr-element"><wbr></a> 023 * element. 024 * 025 * <p> 026 * The wbr element represents a word break opportunity. It is used to indicate where a line 027 * break may occur in text, allowing the browser to break long words or URLs at appropriate 028 * points when necessary. The wbr element is a void element that does not contain any content 029 * and is typically used within long words, URLs, or other text that might overflow their 030 * container. It provides a hint to the browser about where it's acceptable to break the text. 031 * 032 * <h5 class='section'>Examples:</h5> 033 * <p class='bcode w800'> 034 * <jk>import static</jk> org.apache.juneau.bean.html5.HtmlBuilder.*; 035 * 036 * <jc>// Simple word break</jc> 037 * Wbr <jv>simple</jv> = <jsm>wbr</jsm>(); 038 * 039 * <jc>// Wbr with styling</jc> 040 * Wbr <jv>styled</jv> = <jsm>wbr</jsm>() 041 * .class_(<js>"word-break"</js>); 042 * 043 * <jc>// Wbr with ID</jc> 044 * Wbr <jv>withId</jv> = <jsm>wbr</jsm>() 045 * .id(<js>"word-break-1"</js>); 046 * 047 * <jc>// Wbr with styling</jc> 048 * Wbr <jv>styled2</jv> = <jsm>wbr</jsm>() 049 * .style(<js>"display: inline;"</js>); 050 * 051 * <jc>// Wbr in long word</jc> 052 * P <jv>longWord</jv> = <jsm>p</jsm>( 053 * <js>"This is a very long word: "</js>, 054 * <js>"supercalifragilisticexpialidocious"</js>, 055 * <jsm>wbr</jsm>(), 056 * <js>" that might need to break."</js> 057 * ); 058 * 059 * <jc>// Wbr in URL</jc> 060 * P longUrl = p() 061 * .children( 062 * "Visit: ", 063 * "https://www.example.com/very/long/path/to/resource", 064 * wbr(), 065 * " for more information." 066 * ); 067 * 068 * // Wbr in code 069 * P code = p() 070 * .children( 071 * "Function: ", 072 * "veryLongFunctionName", 073 * wbr(), 074 * "()" 075 * ); 076 * </p> 077 * 078 * <p> 079 * The following convenience methods are provided for constructing instances of this bean: 080 * <ul class='javatree'> 081 * <li class='jc'>{@link HtmlBuilder} 082 * <ul class='javatree'> 083 * <li class='jm'>{@link HtmlBuilder#wbr() wbr()} 084 * </ul> 085 * </ul> 086 * </p> 087 * 088 * <h5 class='section'>See Also:</h5><ul> 089 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 090 * </ul> 091 */ 092@Marshalled(typeName = "wbr") 093public class Wbr extends HtmlElementVoid<Wbr> { 094 095 /** 096 * Creates an empty {@link Wbr} element. 097 */ 098 public Wbr() { /* Empty constructor. */ } 099 100}