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