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