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-meter-element <meter>}
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="meter")
027public class Meter extends HtmlElementMixed {
028
029   /**
030    * {@doc HTML5.forms#attr-meter-high high} attribute.
031    *
032    * <p>
033    * Low limit of high range.
034    *
035    * @param high
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 Meter high(Object high) {
041      attr("high", high);
042      return this;
043   }
044
045   /**
046    * {@doc HTML5.forms#attr-meter-low low} attribute.
047    *
048    * <p>
049    * High limit of low range.
050    *
051    * @param low
052    *    The new value for this attribute.
053    *    Typically a {@link Number} or {@link String}.
054    * @return This object (for method chaining).
055    */
056   public final Meter low(Object low) {
057      attr("low", low);
058      return this;
059   }
060
061   /**
062    * {@doc HTML5.forms#attr-meter-max max} attribute.
063    *
064    * <p>
065    * Upper bound of range.
066    *
067    * @param max
068    *    The new value for this attribute.
069    *    Typically a {@link Number} or {@link String}.
070    * @return This object (for method chaining).
071    */
072   public final Meter max(Object max) {
073      attr("max", max);
074      return this;
075   }
076
077   /**
078    * {@doc HTML5.forms#attr-meter-min min} attribute.
079    *
080    * <p>
081    * Lower bound of range.
082    *
083    * @param min
084    *    The new value for this attribute.
085    *    Typically a {@link Number} or {@link String}.
086    * @return This object (for method chaining).
087    */
088   public final Meter min(Object min) {
089      attr("min", min);
090      return this;
091   }
092
093   /**
094    * {@doc HTML5.forms#attr-meter-optimum optimum} attribute.
095    *
096    * <p>
097    * Optimum value in gauge.
098    *
099    * @param optimum
100    *    The new value for this attribute.
101    *    Typically a {@link Number} or {@link String}.
102    * @return This object (for method chaining).
103    */
104   public final Meter optimum(Object optimum) {
105      attr("optimum", optimum);
106      return this;
107   }
108
109   /**
110    * {@doc HTML5.forms#attr-meter-value value} attribute.
111    *
112    * <p>
113    * Current value of the element.
114    *
115    * @param value
116    *    The new value for this attribute.
117    *    Typically a {@link Number} or {@link String}.
118    * @return This object (for method chaining).
119    */
120   public final Meter value(Object value) {
121      attr("value", value);
122      return this;
123   }
124
125
126   //-----------------------------------------------------------------------------------------------------------------
127   // Overridden methods
128   //-----------------------------------------------------------------------------------------------------------------
129
130   @Override /* HtmlElement */
131   public final Meter _class(String _class) {
132      super._class(_class);
133      return this;
134   }
135
136   @Override /* HtmlElement */
137   public final Meter id(String id) {
138      super.id(id);
139      return this;
140   }
141
142   @Override /* HtmlElement */
143   public final Meter style(String style) {
144      super.style(style);
145      return this;
146   }
147
148   @Override /* HtmlElementMixed */
149   public Meter children(Object...children) {
150      super.children(children);
151      return this;
152   }
153
154   @Override /* HtmlElementMixed */
155   public Meter child(Object child) {
156      super.child(child);
157      return this;
158   }
159}