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 org.apache.juneau.annotation.*; 016 017/** 018 * DTO for an HTML {@doc HTML5.embedded-content-0#the-object-element <object>} 019 * element. 020 * 021 * <ul class='seealso'> 022 * <li class='link'>{@doc juneau-dto.HTML5} 023 * </ul> 024 */ 025@Bean(typeName="object") 026public class Object2 extends HtmlElementMixed { 027 028 /** 029 * {@doc HTML5.embedded-content-0#attr-object-data data} attribute. 030 * 031 * <p> 032 * Address of the resource. 033 * 034 * @param data The new value for this attribute. 035 * @return This object (for method chaining). 036 */ 037 public final Object2 data(String data) { 038 attr("data", data); 039 return this; 040 } 041 042 /** 043 * {@doc HTML5.forms#attr-fae-form form} attribute. 044 * 045 * <p> 046 * Associates the control with a form element. 047 * 048 * @param form The new value for this attribute. 049 * @return This object (for method chaining). 050 */ 051 public final Object2 form(String form) { 052 attr("form", form); 053 return this; 054 } 055 056 /** 057 * {@doc HTML5.embedded-content-0#attr-dim-height height} 058 * attribute. 059 * 060 * <p> 061 * Vertical dimension. 062 * 063 * @param height 064 * The new value for this attribute. 065 * Typically a {@link Number} or {@link String}. 066 * @return This object (for method chaining). 067 */ 068 public final Object2 height(Object height) { 069 attr("height", height); 070 return this; 071 } 072 073 /** 074 * {@doc HTML5.embedded-content-0#attr-object-name name} attribute. 075 * 076 * <p> 077 * Name of nested browsing context. 078 * 079 * @param name The new value for this attribute. 080 * @return This object (for method chaining). 081 */ 082 public final Object2 name(String name) { 083 attr("name", name); 084 return this; 085 } 086 087 /** 088 * {@doc HTML5.embedded-content-0#attr-object-type type} attribute. 089 * 090 * <p> 091 * Type of embedded resource. 092 * 093 * @param type The new value for this attribute. 094 * @return This object (for method chaining). 095 */ 096 public final Object2 type(String type) { 097 attr("type", type); 098 return this; 099 } 100 101 /** 102 * {@doc HTML5.embedded-content-0#attr-object-typemustmatch typemustmatch} 103 * attribute. 104 * 105 * <p> 106 * Whether the type attribute and the Content-Type value need to match for the resource to be used. 107 * 108 * @param typemustmatch 109 * The new value for this attribute. 110 * Typically a {@link Boolean} or {@link String}. 111 * @return This object (for method chaining). 112 */ 113 public final Object2 typemustmatch(Object typemustmatch) { 114 attr("typemustmatch", typemustmatch); 115 return this; 116 } 117 118 /** 119 * {@doc HTML5.embedded-content-0#attr-hyperlink-usemap usemap} 120 * attribute. 121 * 122 * <p> 123 * Name of image map to use. 124 * 125 * @param usemap The new value for this attribute. 126 * @return This object (for method chaining). 127 */ 128 public final Object2 usemap(String usemap) { 129 attr("usemap", usemap); 130 return this; 131 } 132 133 /** 134 * {@doc HTML5.embedded-content-0#attr-dim-width width} attribute. 135 * 136 * <p> 137 * Horizontal dimension. 138 * 139 * @param width 140 * The new value for this attribute. 141 * Typically a {@link Number} or {@link String}. 142 * @return This object (for method chaining). 143 */ 144 public final Object2 width(Object width) { 145 attr("width", width); 146 return this; 147 } 148 149 150 //----------------------------------------------------------------------------------------------------------------- 151 // Overridden methods 152 //----------------------------------------------------------------------------------------------------------------- 153 154 @Override /* HtmlElement */ 155 public final Object2 _class(String _class) { 156 super._class(_class); 157 return this; 158 } 159 160 @Override /* HtmlElement */ 161 public final Object2 id(String id) { 162 super.id(id); 163 return this; 164 } 165 166 @Override /* HtmlElement */ 167 public final Object2 style(String style) { 168 super.style(style); 169 return this; 170 } 171 172 @Override /* HtmlElementMixed */ 173 public Object2 children(Object...children) { 174 super.children(children); 175 return this; 176 } 177 178 @Override /* HtmlElementMixed */ 179 public Object2 child(Object child) { 180 super.child(child); 181 return this; 182 } 183}