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.tabular-data#the-td-element <td>} 019 * element. 020 * 021 * <ul class='seealso'> 022 * <li class='link'>{@doc juneau-dto.HTML5} 023 * </ul> 024 */ 025@Bean(typeName="td") 026public class Td extends HtmlElementMixed { 027 028 /** 029 * {@doc HTML5.tabular-data#attr-tdth-colspan colspan} attribute. 030 * 031 * <p> 032 * Number of columns that the cell is to span. 033 * 034 * @param colspan 035 * The new value for this attribute. 036 * Typically a {@link Number} or {@link String}. 037 * @return This object (for method chaining). 038 */ 039 public final Td colspan(Object colspan) { 040 attr("colspan", colspan); 041 return this; 042 } 043 044 /** 045 * {@doc HTML5.tabular-data#attr-tdth-headers headers} attribute. 046 * 047 * <p> 048 * The header cells for this cell. 049 * 050 * @param headers The new value for this attribute. 051 * @return This object (for method chaining). 052 */ 053 public final Td headers(String headers) { 054 attr("headers", headers); 055 return this; 056 } 057 058 /** 059 * {@doc HTML5.tabular-data#attr-tdth-rowspan rowspan} attribute. 060 * 061 * <p> 062 * Number of rows that the cell is to span. 063 * 064 * @param rowspan 065 * The new value for this attribute. 066 * Typically a {@link Number} or {@link String}. 067 * @return This object (for method chaining). 068 */ 069 public final Td rowspan(Object rowspan) { 070 attr("rowspan", rowspan); 071 return this; 072 } 073 074 075 //----------------------------------------------------------------------------------------------------------------- 076 // Overridden methods 077 //----------------------------------------------------------------------------------------------------------------- 078 079 @Override /* HtmlElement */ 080 public final Td _class(String _class) { 081 super._class(_class); 082 return this; 083 } 084 085 @Override /* HtmlElement */ 086 public final Td id(String id) { 087 super.id(id); 088 return this; 089 } 090 091 @Override /* HtmlElement */ 092 public final Td style(String style) { 093 super.style(style); 094 return this; 095 } 096 097 @Override /* HtmlElementMixed */ 098 public Td children(Object...children) { 099 super.children(children); 100 return this; 101 } 102 103 @Override /* HtmlElementMixed */ 104 public Td child(Object child) { 105 super.child(child); 106 return this; 107 } 108}