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 ExtHTML5.sections#the-body-element <body>} 019 * element. 020 * 021 * <ul class='seealso'> 022 * <li class='link'>{@doc DtoHtml5} 023 * </ul> 024 */ 025@Bean(typeName="body") 026public class Body extends HtmlElementMixed { 027 028 /** 029 * Creates an empty {@link Body} element. 030 */ 031 public Body() {} 032 033 /** 034 * Creates a {@link Body} element with the specified child nodes. 035 * 036 * @param children The child nodes. 037 */ 038 public Body(Object...children) { 039 children(children); 040 } 041 042 /** 043 * {@doc ExtHTML5.webappapis#handler-window-onafterprint onafterprint} 044 * attribute. 045 * 046 * @param onafterprint The new value for this attribute. 047 * @return This object (for method chaining). 048 */ 049 public final Body onafterprint(String onafterprint) { 050 attr("onafterprint", onafterprint); 051 return this; 052 } 053 054 /** 055 * {@doc ExtHTML5.webappapis#handler-window-onbeforeunload onbeforeunload} 056 * attribute. 057 * 058 * @param onbeforeunload The new value for this attribute. 059 * @return This object (for method chaining). 060 */ 061 public final Body onbeforeunload(String onbeforeunload) { 062 attr("onbeforeunload", onbeforeunload); 063 return this; 064 } 065 066 /** 067 * {@doc ExtHTML5.webappapis#handler-window-onmessage onmessage} 068 * attribute. 069 * 070 * @param onmessage The new value for this attribute. 071 * @return This object (for method chaining). 072 */ 073 public final Body onmessage(String onmessage) { 074 attr("onmessage", onmessage); 075 return this; 076 } 077 078 /** 079 * {@doc ExtHTML5.webappapis#handler-window-ononline ononline} 080 * attribute. 081 * 082 * @param ononline The new value for this attribute. 083 * @return This object (for method chaining). 084 */ 085 public final Body ononline(String ononline) { 086 attr("ononline", ononline); 087 return this; 088 } 089 090 /** 091 * {@doc ExtHTML5.webappapis#handler-window-onpageshow onpageshow} 092 * attribute. 093 * 094 * @param onpageshow The new value for this attribute. 095 * @return This object (for method chaining). 096 */ 097 public final Body onpageshow(String onpageshow) { 098 attr("onpageshow", onpageshow); 099 return this; 100 } 101 102 /** 103 * {@doc ExtHTML5.webappapis#handler-window-onstorage onstorage} 104 * attribute. 105 * 106 * @param onstorage The new value for this attribute. 107 * @return This object (for method chaining). 108 */ 109 public final Body onstorage(String onstorage) { 110 attr("onstorage", onstorage); 111 return this; 112 } 113 114 115 //----------------------------------------------------------------------------------------------------------------- 116 // Overridden methods 117 //----------------------------------------------------------------------------------------------------------------- 118 119 @Override /* HtmlElement */ 120 public final Body _class(String _class) { 121 super._class(_class); 122 return this; 123 } 124 125 @Override /* HtmlElement */ 126 public final Body id(String id) { 127 super.id(id); 128 return this; 129 } 130 131 @Override /* HtmlElement */ 132 public final Body style(String style) { 133 super.style(style); 134 return this; 135 } 136 137 @Override /* HtmlElementMixed */ 138 public Body children(Object...children) { 139 super.children(children); 140 return this; 141 } 142 143 @Override /* HtmlElementMixed */ 144 public Body child(Object child) { 145 super.child(child); 146 return this; 147 } 148}