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.forms#the-fieldset-element <fieldset>}
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="fieldset")
027public class Fieldset extends HtmlElementMixed {
028
029   /**
030    * {@doc HTML5.forms#attr-fieldset-disabled disabled} attribute.
031    *
032    * <p>
033    * Whether the form control is disabled.
034    *
035    * @param disabled
036    *    The new value for this attribute.
037    *    Typically a {@link Boolean} or {@link String}.
038    * @return This object (for method chaining).
039    */
040   public final Fieldset disabled(Boolean disabled) {
041      attr("disabled", deminimize(disabled, "disabled"));
042      return this;
043   }
044
045   /**
046    * {@doc HTML5.forms#attr-fae-form form} attribute.
047    *
048    * <p>
049    * Associates the control with a form element.
050    *
051    * @param form The new value for this attribute.
052    * @return This object (for method chaining).
053    */
054   public final Fieldset form(String form) {
055      attr("form", form);
056      return this;
057   }
058
059   /**
060    * {@doc HTML5.forms#attr-fe-name name} attribute.
061    *
062    * <p>
063    * Name of form control to use for form submission and in the form.elements API.
064    *
065    * @param name The new value for this attribute.
066    * @return This object (for method chaining).
067    */
068   public final Fieldset name(String name) {
069      attr("name", name);
070      return this;
071   }
072
073
074   //-----------------------------------------------------------------------------------------------------------------
075   // Overridden methods
076   //-----------------------------------------------------------------------------------------------------------------
077
078   @Override /* HtmlElement */
079   public final Fieldset _class(String _class) {
080      super._class(_class);
081      return this;
082   }
083
084   @Override /* HtmlElement */
085   public final Fieldset id(String id) {
086      super.id(id);
087      return this;
088   }
089
090   @Override /* HtmlElement */
091   public final Fieldset style(String style) {
092      super.style(style);
093      return this;
094   }
095
096   @Override /* HtmlElementMixed */
097   public Fieldset children(Object...children) {
098      super.children(children);
099      return this;
100   }
101
102   @Override /* HtmlElementMixed */
103   public Fieldset child(Object child) {
104      super.child(child);
105      return this;
106   }
107}