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