001 /** 002 * Copyright 2005-2013 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016 package org.kuali.rice.kns.datadictionary.control; 017 018 019 /** 020 The currency element defines an HTML text control for 021 entering dollar and cents amounts. Only two decimals to 022 the right of the decimal point are allowed. Formatted 023 value is displayed with commas. 024 025 Used Properties: size, formattedMaxLength 026 */ 027 @Deprecated 028 public class CurrencyControlDefinition extends ControlDefinitionBase { 029 private static final long serialVersionUID = 1650000676894176080L; 030 031 /** 032 * the maxLength for text that has been formatted. ie if maxLength=5. [12345]. but after going through the formatter the value 033 * is [12,345.00] and will no longer fit in a field whos maxLength=5. formattedMaxLength solves this problem. 034 */ 035 protected Integer formattedMaxLength; 036 037 public CurrencyControlDefinition() { 038 } 039 040 /** 041 * 042 * @see org.kuali.rice.krad.datadictionary.control.ControlDefinition#isCurrency() 043 */ 044 public boolean isCurrency() { 045 return true; 046 } 047 048 /** 049 * @see java.lang.Object#toString() 050 */ 051 public String toString() { 052 return "CurrencyControlDefinition"; 053 } 054 055 /** 056 * @return Returns the formattedMaxLength parameter for currency controls. 057 */ 058 public Integer getFormattedMaxLength() { 059 return formattedMaxLength; 060 } 061 062 /** 063 * the maxLength for text that has been formatted. ie if maxLength=5. [12345]. but after going through the formatter the value 064 * is [12,345.00] and will no longer fit in a field whos maxLength=5. formattedMaxLength solves this problem. 065 */ 066 public void setFormattedMaxLength(Integer formattedMaxLength) { 067 this.formattedMaxLength = formattedMaxLength; 068 } 069 070 }