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-embed-element"><embed></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="embed") 031public class Embed extends HtmlElementVoid { 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 Embed 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-embed-src">src</a> attribute. 052 * 053 * <p> 054 * Address of the resource. 055 * 056 * <p> 057 * The value can be of any of the following types: {@link URI}, {@link URL}, {@link String}. 058 * Strings must be valid URIs. 059 * 060 * <p> 061 * URIs defined by {@link UriResolver} can be used for values. 062 * 063 * @param src 064 * The new value for this attribute. 065 * Typically a {@link URL} or {@link String}. 066 * @return This object (for method chaining). 067 */ 068 public final Embed src(Object src) { 069 attrUri("src", src); 070 return this; 071 } 072 073 /** 074 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-embed-type">type</a> attribute. 075 * 076 * <p> 077 * Type of embedded resource. 078 * 079 * @param type The new value for this attribute. 080 * @return This object (for method chaining). 081 */ 082 public final Embed type(String type) { 083 attr("type", type); 084 return this; 085 } 086 087 /** 088 * <a class="doclink" href="https://www.w3.org/TR/html5/embedded-content-0.html#attr-dim-width">width</a> attribute. 089 * 090 * <p> 091 * Horizontal dimension. 092 * 093 * @param width 094 * The new value for this attribute. 095 * Typically a {@link Number} or {@link String}. 096 * @return This object (for method chaining). 097 */ 098 public final Embed width(Object width) { 099 attr("width", width); 100 return this; 101 } 102 103 104 //-------------------------------------------------------------------------------- 105 // Overridden methods 106 //-------------------------------------------------------------------------------- 107 108 @Override /* HtmlElement */ 109 public final Embed _class(String _class) { 110 super._class(_class); 111 return this; 112 } 113 114 @Override /* HtmlElement */ 115 public final Embed id(String id) { 116 super.id(id); 117 return this; 118 } 119 120 @Override /* HtmlElement */ 121 public final Embed style(String style) { 122 super.style(style); 123 return this; 124 } 125}