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