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.*; 016import java.net.URI; 017 018import org.apache.juneau.*; 019import org.apache.juneau.annotation.*; 020 021/** 022 * DTO for an HTML <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#the-iframe-element"><iframe></a> 023 * element. 024 * 025 * <h5 class='section'>See Also:</h5> 026 * <ul class='doctree'> 027 * <li class='link'><a class='doclink' href='../../../../../overview-summary.html#juneau-dto.HTML5'>Overview > juneau-dto > HTML5</a> 028 * </ul> 029 */ 030@Bean(typeName="iframe") 031public class Iframe extends HtmlElementMixed { 032 033 /** 034 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-height">height</a> 035 * attribute. 036 * 037 * <p> 038 * Vertical dimension. 039 * 040 * @param height 041 * The new value for this attribute. 042 * Typically a {@link Number} or {@link String}. 043 * @return This object (for method chaining). 044 */ 045 public final Iframe height(Object height) { 046 attr("height", height); 047 return this; 048 } 049 050 /** 051 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-name">name</a> attribute. 052 * 053 * <p> 054 * Name of nested browsing context. 055 * 056 * @param name The new value for this attribute. 057 * @return This object (for method chaining). 058 */ 059 public final Iframe name(String name) { 060 attr("name", name); 061 return this; 062 } 063 064 /** 065 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-sandbox">sandbox</a> 066 * attribute. 067 * 068 * <p> 069 * Security rules for nested content. 070 * 071 * @param sandbox The new value for this attribute. 072 * @return This object (for method chaining). 073 */ 074 public final Iframe sandbox(String sandbox) { 075 attr("sandbox", sandbox); 076 return this; 077 } 078 079 /** 080 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-src">src</a> attribute. 081 * 082 * <p> 083 * Address of the resource. 084 * 085 * <p> 086 * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. 087 * Strings must be valid URIs. 088 * 089 * <p> 090 * URIs defined by {@link UriResolver} can be used for values. 091 * 092 * @param src 093 * The new value for this attribute. 094 * Typically a {@link URL} or {@link String}. 095 * @return This object (for method chaining). 096 */ 097 public final Iframe src(Object src) { 098 attrUri("src", src); 099 return this; 100 } 101 102 /** 103 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-iframe-srcdoc">srcdoc</a> 104 * attribute. 105 * 106 * <p> 107 * A document to render in the iframe. 108 * 109 * @param srcdoc The new value for this attribute. 110 * @return This object (for method chaining). 111 */ 112 public final Iframe srcdoc(String srcdoc) { 113 attr("srcdoc", srcdoc); 114 return this; 115 } 116 117 /** 118 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute. 119 * 120 * <p> 121 * Horizontal dimension. 122 * 123 * @param width 124 * The new value for this attribute. 125 * Typically a {@link Number} or {@link String}. 126 * @return This object (for method chaining). 127 */ 128 public final Iframe width(Object width) { 129 attr("width", width); 130 return this; 131 } 132 133 134 //-------------------------------------------------------------------------------- 135 // Overridden methods 136 //-------------------------------------------------------------------------------- 137 138 @Override /* HtmlElement */ 139 public final Iframe _class(String _class) { 140 super._class(_class); 141 return this; 142 } 143 144 @Override /* HtmlElement */ 145 public final Iframe id(String id) { 146 super.id(id); 147 return this; 148 } 149 150 @Override /* HtmlElement */ 151 public final Iframe style(String style) { 152 super.style(style); 153 return this; 154 } 155 156 @Override /* HtmlElementMixed */ 157 public Iframe children(Object...children) { 158 super.children(children); 159 return this; 160 } 161 162 @Override /* HtmlElementMixed */ 163 public Iframe child(Object child) { 164 super.child(child); 165 return this; 166 } 167}