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.tabular-data#the-table-element <table>}
019 * element.
020 *
021 * <ul class='seealso'>
022 *    <li class='link'>{@doc DtoHtml5}
023 * </ul>
024 */
025@Bean(typeName="table")
026public class Table extends HtmlElementContainer {
027
028   /**
029    * Creates an empty {@link Table} element.
030    */
031   public Table() {}
032
033   /**
034    * Creates a {@link Table} element with the specified child nodes.
035    *
036    * @param children The child nodes.
037    */
038   public Table(Object...children) {
039      children(children);
040   }
041
042   /**
043    * {@doc ExtHTML5.tabular-data#attr-table-border border} attribute.
044    *
045    * @param border
046    *    The new value for this attribute.
047    *    Typically a {@link Number} or {@link String}.
048    * @return This object (for method chaining).
049    */
050   public final Table border(Object border) {
051      attr("border", border);
052      return this;
053   }
054
055
056   //-----------------------------------------------------------------------------------------------------------------
057   // Overridden methods
058   //-----------------------------------------------------------------------------------------------------------------
059
060   @Override /* HtmlElement */
061   public final Table _class(String _class) {
062      super._class(_class);
063      return this;
064   }
065
066   @Override /* HtmlElement */
067   public final Table id(String id) {
068      super.id(id);
069      return this;
070   }
071
072   @Override /* HtmlElement */
073   public final Table style(String style) {
074      super.style(style);
075      return this;
076   }
077
078   @Override /* HtmlElementContainer */
079   public final Table children(Object...children) {
080      super.children(children);
081      return this;
082   }
083
084   @Override /* HtmlElementContainer */
085   public final Table child(Object child) {
086      super.child(child);
087      return this;
088   }
089}