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