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