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-rb-element"><rb></a> 023 * element. 024 * 025 * <p> 026 * The rb element represents the base text component of a ruby annotation. It is used within 027 * a ruby element to mark up the base text that is being annotated. The rb element is part of 028 * the ruby annotation system and is used to provide pronunciation or translation information 029 * for text in languages that use complex writing systems, such as Japanese, Chinese, or Korean. 030 * It is typically used with rt (ruby text) elements to provide annotations above or below 031 * the base text. 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 ruby base</jc> 038 * Rb <jv>simple</jv> = <jsm>rb</jsm>(<js>"漢字"</js>); 039 * 040 * <jc>// Rb with styling</jc> 041 * Rb <jv>styled</jv> = <jsm>rb</jsm>(<js>"日本語"</js>) 042 * .class_(<js>"ruby-base"</js>); 043 * 044 * <jc>// Rb with complex content</jc> 045 * Rb <jv>complex</jv> = <jsm>rb</jsm>( 046 * <js>"複雑な"</js>, 047 * <jsm>strong</jsm>(<js>"漢字"</js>), 048 * <js>"の例"</js> 049 * ); 050 * 051 * <jc>// Rb with ID</jc> 052 * Rb <jv>withId</jv> = <jsm>rb</jsm>(<js>"漢字"</js>) 053 * .id(<js>"ruby-base-1"</js>); 054 * 055 * <jc>// Rb with styling</jc> 056 * Rb <jv>styled2</jv> = <jsm>rb</jsm>(<js>"漢字"</js>) 057 * .style(<js>"font-size: 1.2em; color: #333;"</js>); 058 * 059 * <jc>// Rb with multiple elements</jc> 060 * Rb <jv>multiple</jv> = <jsm>rb</jsm>( 061 * <js>"複雑な"</js>, 062 * <jsm>rb</jsm>(<js>"漢字"</js>), 063 * <js>"の"</js>, 064 * <jsm>rb</jsm>(<js>"例"</js>) 065 * ); 066 * 067 * // Rb with links 068 * Rb withLinks = new Rb() 069 * .children( 070 * "漢字", 071 * new A().href("/dictionary/kanji").children("辞書") 072 * ); 073 * </p> 074 * 075 * <h5 class='section'>See Also:</h5><ul> 076 * <li class='link'><a class="doclink" href="https://juneau.apache.org/docs/topics/JuneauBeanHtml5">juneau-bean-html5</a> 077 * </ul> 078 */ 079@Marshalled(typeName = "rb") 080public class Rb extends HtmlElementMixed<Rb> { 081 082 /** 083 * Creates an empty {@link Rb} element. 084 */ 085 public Rb() {} 086 087 /** 088 * Creates a {@link Rb} element with the specified {@link Rb#children(Object[])} nodes. 089 * 090 * @param children The {@link Rb#children(Object[])} nodes. Must not be <jk>null</jk>. 091 */ 092 public Rb(Object...children) { 093 children(children); 094 } 095}