public class FormattedSizeConverter extends FormattedNumberConverter
Modifier and Type | Field and Description |
---|---|
static String |
CONVERTER_ID |
double |
GIGA |
double |
KILO |
protected Boolean |
m_bUseAbbreviation |
protected String |
m_sUnits |
double |
MEGA |
String |
RESOUCRE_ROOT |
m_DecFormat, m_sPattern
BAD_PARAMETER_LONG_ID, BAD_PARAMETER_SHORT_ID, BAD_STRING_LONG_ID, BAD_STRING_SHORT_ID, BAD_TYPE_LONG_ID, BAD_TYPE_SHORT_ID, m_bshowCAFErrorMsg, m_clientLocale, m_CustomMessage
DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE_PARAM_NAME
Constructor and Description |
---|
FormattedSizeConverter() |
Modifier and Type | Method and Description |
---|---|
protected String |
formatStringValue(String value,
String add,
String units) |
Object |
getAsObject(FacesContext context,
UIComponent component,
String value) |
String |
getAsString(FacesContext context,
UIComponent component,
Object value) |
String |
getAsStringLocal(Object value,
FacesContext context) |
Number |
getNumberLocal(String value,
FacesContext context) |
String |
getUnits() |
Boolean |
getUseAbbreviation() |
void |
restoreState(FacesContext context,
Object state) |
Object |
saveState(FacesContext context)
Override these two methods to get the new setting added
to the save and restored state.
|
void |
setUnits(String sValue) |
void |
setUseAbbreviation(Boolean bUse) |
getAsString, getNumber, getNumberFormater, getPattern, getRegion, isTransient, setPattern, setRegion, setTransient
getBadCommonInputMsg, getBadInputMsg, getBadInputMsg, getBadInputStringTypeMsg, getBadInputTypeMsg, getClientLocale, getClientTimeZone, getCustomErrorMsg, getshowCAFErrorMsg, isBlankValue, isStringObj, isValue, setCustomErrorMsg, setshowCAFErrorMsg, validateFromObject, validateFromString
public double GIGA
public double MEGA
public double KILO
public String RESOUCRE_ROOT
protected String m_sUnits
protected Boolean m_bUseAbbreviation
public static final String CONVERTER_ID
public Object getAsObject(FacesContext context, UIComponent component, String value)
getAsObject
in interface Converter
getAsObject
in class FormattedNumberConverter
public String getAsString(FacesContext context, UIComponent component, Object value)
getAsString
in interface Converter
getAsString
in class FormattedNumberConverter
public void setUnits(String sValue)
public String getUnits()
public void setUseAbbreviation(Boolean bUse)
public Boolean getUseAbbreviation()
public Object saveState(FacesContext context)
saveState
in interface StateHolder
saveState
in class FormattedNumberConverter
public void restoreState(FacesContext context, Object state)
restoreState
in interface StateHolder
restoreState
in class FormattedNumberConverter
public Number getNumberLocal(String value, FacesContext context)
public String getAsStringLocal(Object value, FacesContext context)