org.apache.myfaces.commons.converter
Class TypedNumberConverter

java.lang.Object
  extended by org.apache.myfaces.commons.converter.ConverterBase
      extended by org.apache.myfaces.commons.converter.AbstractTypedNumberConverter
          extended by org.apache.myfaces.commons.converter.TypedNumberConverter
All Implemented Interfaces:
javax.faces.component.StateHolder, javax.faces.convert.Converter

public class TypedNumberConverter
extends AbstractTypedNumberConverter


Field Summary
static java.lang.String CONVERTER_ID
           
 
Constructor Summary
TypedNumberConverter()
           
 
Method Summary
 java.lang.Integer getMaxFractionDigits()
          The maximum number of digits in the fractional portion of the number.
 java.lang.Integer getMaxIntegerDigits()
          The maximum number of digits in the integer portion of the number.
 java.lang.Integer getMinFractionDigits()
          The minimum number of digits in the fractional portion of the number.
 java.lang.Integer getMinIntegerDigits()
          The minimum number of digits in the integer portion of the number.
 java.lang.String getPattern()
          A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat.
 java.lang.String getType()
          The type of formatting/parsing to be performed.
 boolean isGroupingUsed()
          Specifies whether output will contain grouping separators.
 boolean isIntegerOnly()
          Specifies whether only the integer part of the input will be parsed.
 void restoreState(javax.faces.context.FacesContext facesContext, java.lang.Object state)
           
 java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
           
 void setGroupingUsed(boolean groupingUsed)
           
 void setIntegerOnly(boolean integerOnly)
           
 void setMaxFractionDigits(java.lang.Integer maxFractionDigits)
           
 void setMaxIntegerDigits(java.lang.Integer maxIntegerDigits)
           
 void setMinFractionDigits(java.lang.Integer minFractionDigits)
           
 void setMinIntegerDigits(java.lang.Integer minIntegerDigits)
           
 void setPattern(java.lang.String pattern)
           
 void setType(java.lang.String type)
           
 
Methods inherited from class org.apache.myfaces.commons.converter.AbstractTypedNumberConverter
_getAsObject, _restoreState, _saveState, getAsObject, getAsString, getCurrencyCode, getCurrencySymbol, getDestType, getLocalCurrencyCode, getLocalCurrencySymbol, getLocale, isTransient, setCurrencyCode, setCurrencySymbol, setDestType, setLocale, setTransient
 
Methods inherited from class org.apache.myfaces.commons.converter.ConverterBase
getDetailMessage, getFacesContext, getFacesMessage, getStringValue, getSummaryMessage, getValueBinding, restoreAttachedState, saveAttachedState, setDetailMessage, setSummaryMessage, setValueBinding
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONVERTER_ID

public static final java.lang.String CONVERTER_ID
See Also:
Constant Field Values
Constructor Detail

TypedNumberConverter

public TypedNumberConverter()
Method Detail

isGroupingUsed

public boolean isGroupingUsed()
Description copied from class: AbstractTypedNumberConverter
Specifies whether output will contain grouping separators. Default: true.

Specified by:
isGroupingUsed in class AbstractTypedNumberConverter

setGroupingUsed

public void setGroupingUsed(boolean groupingUsed)

isIntegerOnly

public boolean isIntegerOnly()
Description copied from class: AbstractTypedNumberConverter
Specifies whether only the integer part of the input will be parsed. Default: false.

Specified by:
isIntegerOnly in class AbstractTypedNumberConverter

setIntegerOnly

public void setIntegerOnly(boolean integerOnly)

getMaxFractionDigits

public java.lang.Integer getMaxFractionDigits()
Description copied from class: AbstractTypedNumberConverter
The maximum number of digits in the fractional portion of the number.

Specified by:
getMaxFractionDigits in class AbstractTypedNumberConverter

setMaxFractionDigits

public void setMaxFractionDigits(java.lang.Integer maxFractionDigits)

getMaxIntegerDigits

public java.lang.Integer getMaxIntegerDigits()
Description copied from class: AbstractTypedNumberConverter
The maximum number of digits in the integer portion of the number.

Specified by:
getMaxIntegerDigits in class AbstractTypedNumberConverter

setMaxIntegerDigits

public void setMaxIntegerDigits(java.lang.Integer maxIntegerDigits)

getMinFractionDigits

public java.lang.Integer getMinFractionDigits()
Description copied from class: AbstractTypedNumberConverter
The minimum number of digits in the fractional portion of the number.

Specified by:
getMinFractionDigits in class AbstractTypedNumberConverter

setMinFractionDigits

public void setMinFractionDigits(java.lang.Integer minFractionDigits)

getMinIntegerDigits

public java.lang.Integer getMinIntegerDigits()
Description copied from class: AbstractTypedNumberConverter
The minimum number of digits in the integer portion of the number.

Specified by:
getMinIntegerDigits in class AbstractTypedNumberConverter

setMinIntegerDigits

public void setMinIntegerDigits(java.lang.Integer minIntegerDigits)

getPattern

public java.lang.String getPattern()
Description copied from class: AbstractTypedNumberConverter
A custom Date formatting pattern, in the format used by java.text.SimpleDateFormat.

Specified by:
getPattern in class AbstractTypedNumberConverter

setPattern

public void setPattern(java.lang.String pattern)

getType

public java.lang.String getType()
Description copied from class: AbstractTypedNumberConverter
The type of formatting/parsing to be performed. Values include: number, currency, and percentage. Default: number.

Specified by:
getType in class AbstractTypedNumberConverter

setType

public void setType(java.lang.String type)

saveState

public java.lang.Object saveState(javax.faces.context.FacesContext facesContext)
Specified by:
saveState in interface javax.faces.component.StateHolder
Overrides:
saveState in class AbstractTypedNumberConverter

restoreState

public void restoreState(javax.faces.context.FacesContext facesContext,
                         java.lang.Object state)
Specified by:
restoreState in interface javax.faces.component.StateHolder
Overrides:
restoreState in class AbstractTypedNumberConverter


Copyright © 2007-2010 The Apache Software Foundation. All Rights Reserved.