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