001: /*
002: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003: *
004: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
005: *
006: * Portions Copyright Apache Software Foundation.
007: *
008: * The contents of this file are subject to the terms of either the GNU
009: * General Public License Version 2 only ("GPL") or the Common Development
010: * and Distribution License("CDDL") (collectively, the "License"). You
011: * may not use this file except in compliance with the License. You can obtain
012: * a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
013: * or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
014: * language governing permissions and limitations under the License.
015: *
016: * When distributing the software, include this License Header Notice in each
017: * file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
018: * Sun designates this particular file as subject to the "Classpath" exception
019: * as provided by Sun in the GPL Version 2 section of the License file that
020: * accompanied this code. If applicable, add the following below the License
021: * Header, with the fields enclosed by brackets [] replaced by your own
022: * identifying information: "Portions Copyrighted [year]
023: * [name of copyright owner]"
024: *
025: * Contributor(s):
026: *
027: * If you wish your version of this file to be governed by only the CDDL or
028: * only the GPL Version 2, indicate your decision by adding "[Contributor]
029: * elects to include this software in this distribution under the [CDDL or GPL
030: * Version 2] license." If you don't indicate a single choice of license, a
031: * recipient has the option to distribute your version of this file under
032: * either the CDDL, the GPL Version 2 or to extend the choice of license to
033: * its licensees as provided above. However, if you add GPL Version 2 code
034: * and therefore, elected the GPL Version 2 license, then the option applies
035: * only if the new code is made subject to such option by the copyright
036: * holder.
037: */
038:
039: package org.apache.taglibs.standard.tag.rt.fmt;
040:
041: import javax.servlet.jsp.JspTagException;
042:
043: import org.apache.taglibs.standard.tag.common.fmt.FormatNumberSupport;
044:
045: /**
046: * <p>A handler for <formatNumber> that supports rtexprvalue-based
047: * attributes.</p>
048: *
049: * @author Jan Luehe
050: */
051:
052: public class FormatNumberTag extends FormatNumberSupport {
053:
054: //*********************************************************************
055: // Accessor methods
056:
057: // 'value' attribute
058: public void setValue(Object value) throws JspTagException {
059: this .value = value;
060: this .valueSpecified = true;
061: }
062:
063: // 'type' attribute
064: public void setType(String type) throws JspTagException {
065: this .type = type;
066: }
067:
068: // 'pattern' attribute
069: public void setPattern(String pattern) throws JspTagException {
070: this .pattern = pattern;
071: }
072:
073: // 'currencyCode' attribute
074: public void setCurrencyCode(String currencyCode)
075: throws JspTagException {
076: this .currencyCode = currencyCode;
077: }
078:
079: // 'currencySymbol' attribute
080: public void setCurrencySymbol(String currencySymbol)
081: throws JspTagException {
082: this .currencySymbol = currencySymbol;
083: }
084:
085: // 'groupingUsed' attribute
086: public void setGroupingUsed(boolean isGroupingUsed)
087: throws JspTagException {
088: this .isGroupingUsed = isGroupingUsed;
089: this .groupingUsedSpecified = true;
090: }
091:
092: // 'maxIntegerDigits' attribute
093: public void setMaxIntegerDigits(int maxDigits)
094: throws JspTagException {
095: this .maxIntegerDigits = maxDigits;
096: this .maxIntegerDigitsSpecified = true;
097: }
098:
099: // 'minIntegerDigits' attribute
100: public void setMinIntegerDigits(int minDigits)
101: throws JspTagException {
102: this .minIntegerDigits = minDigits;
103: this .minIntegerDigitsSpecified = true;
104: }
105:
106: // 'maxFractionDigits' attribute
107: public void setMaxFractionDigits(int maxDigits)
108: throws JspTagException {
109: this .maxFractionDigits = maxDigits;
110: this .maxFractionDigitsSpecified = true;
111: }
112:
113: // 'minFractionDigits' attribute
114: public void setMinFractionDigits(int minDigits)
115: throws JspTagException {
116: this .minFractionDigits = minDigits;
117: this .minFractionDigitsSpecified = true;
118: }
119: }
|