org.pm4j.core.pm.impl
Class PmAttrNumBase<T extends java.lang.Number>

java.lang.Object
  extended by org.pm4j.core.pm.impl.PmObjectBase
      extended by org.pm4j.core.pm.impl.PmAttrBase<T,T>
          extended by org.pm4j.core.pm.impl.PmAttrNumBase<T>
All Implemented Interfaces:
java.lang.Comparable<PmObject>, PmAttr<T>, PmAttrNumber<T>, PmDataInput, PmObject
Direct Known Subclasses:
PmAttrBigDecimalImpl, PmAttrDoubleImpl, PmAttrIntegerImpl, PmAttrLongImpl, PmAttrShortImpl

public abstract class PmAttrNumBase<T extends java.lang.Number>
extends PmAttrBase<T,T>
implements PmAttrNumber<T>


Nested Class Summary
protected static class PmAttrNumBase.MetaData
           
 
Nested classes/interfaces inherited from class org.pm4j.core.pm.impl.PmObjectBase
PmObjectBase.NameBuilder, PmObjectBase.NameBuilderAbsoluteName, PmObjectBase.NameBuilderShortName, PmObjectBase.NameBuilderTitle
 
Nested classes/interfaces inherited from interface org.pm4j.core.pm.PmAttr
PmAttr.Converter<T>
 
Field Summary
 
Fields inherited from class org.pm4j.core.pm.impl.PmObjectBase
pmCacheLog
 
Fields inherited from interface org.pm4j.core.pm.PmObject
STYLE_CLASS_DISABLED, STYLE_CLASS_ERROR, STYLE_CLASS_INFO, STYLE_CLASS_REQUIRED, STYLE_CLASS_WARN
 
Constructor Summary
PmAttrNumBase(PmObject pmParent)
           
 
Method Summary
 int compareTo(PmObject otherPm)
          The default implementation compares the results of PmAttrBase.getValueLocalized() according to the collation sequence of the current Locale.
protected  int getMaxLenDefault()
          The default implementation calculates the number of digits required for the maximal value as provided by PmAttrNumber.getMax().
protected  java.text.NumberFormat getNumberFormat(java.lang.String formatString)
           
 
Methods inherited from class org.pm4j.core.pm.impl.PmAttrBase
accept, clearCachedPmValues, clearPmInvalidValues, commitBufferedPmChanges, convertBackingValueToPmValue, convertPmValueToBackingValue, equalValues, getBackingValue, getBackingValueImpl, getConverter, getDefaultValue, getDefaultValueImpl, getFormatDefaultResKey, getFormatString, getMaxLen, getMinLen, getNullOptionDefault, getOptionSet, getOptionSetImpl, getOptionValues, getPmParentElement, getPmStyleClassesImpl, getUncachedValidValue, getValue, getValueAsString, getValueImpl, getValueLocalized, initMetaData, initMetaDataBeanConstraint, isBufferedPmValueMode, isEmptyValue, isPmEnabledImpl, isPmReadonlyImpl, isPmValueChanged, isPmVisibleImpl, isRequired, isSupportingAsStringValues, isValidatingOnSetPmValue, makeMetaData, makeOptionSetDef, pmValidate, resetPmValues, rollbackBufferedPmChanges, setBackingValue, setBackingValueImpl, setPmValueChanged, setValue, setValueAsString, setValueImpl, validate
 
Methods inherited from class org.pm4j.core.pm.impl.PmObjectBase
addToPmComposite, canSetPmTitle, ensurePmMetaDataInitialization, findAnnotationsInPmHierarchy, getPmConversation, getPmConversationImpl, getPmIconPath, getPmMetaData, getPmMetaDataWithoutPmInitCall, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmResKey, getPmResKeyBase, getPmResLoaderCtxtClasses, getPmShortTitle, getPmStyleClasses, getPmTitle, getPmTitleDef, getPmTitleImpl, getPmTooltip, getPmTooltipImpl, getVisiblePmCommands, getVisiblePmCommands, isMetaDataInitialized, isPmEnabled, isPmReadonly, isPmValid, isPmVisible, onPmChildStateChange, onPmInit, onPmValueChange, readCacheStrategy, removePmChild, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.pm4j.core.pm.PmAttrNumber
getMax, getMaxLen, getMin
 
Methods inherited from interface org.pm4j.core.pm.PmAttr
getFormatString, getMinLen, getOptionSet, getValue, getValueAsString, getValueLocalized, isPmValueChanged, isRequired, resetPmValues, setPmValueChanged, setValue, setValueAsString
 
Methods inherited from interface org.pm4j.core.pm.PmDataInput
commitBufferedPmChanges, isBufferedPmValueMode, pmValidate, rollbackBufferedPmChanges
 
Methods inherited from interface org.pm4j.core.pm.PmObject
accept, canSetPmTitle, getPmConversation, getPmIconPath, getPmName, getPmParent, getPmProperty, getPmRelativeName, getPmShortTitle, getPmStyleClasses, getPmTitle, getPmTooltip, isPmEnabled, isPmReadonly, isPmValid, isPmVisible, setPmEnabled, setPmParent, setPmProperty, setPmTitle, setPmVisible
 

Constructor Detail

PmAttrNumBase

public PmAttrNumBase(PmObject pmParent)
Method Detail

compareTo

public int compareTo(PmObject otherPm)
Description copied from class: PmAttrBase
The default implementation compares the results of PmAttrBase.getValueLocalized() according to the collation sequence of the current Locale.

Specified by:
compareTo in interface java.lang.Comparable<PmObject>
Specified by:
compareTo in interface PmObject
Overrides:
compareTo in class PmAttrBase<T extends java.lang.Number,T extends java.lang.Number>
Parameters:
otherPm - The PM to compare.
Returns:
The usual Comparable result: a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.

getNumberFormat

protected java.text.NumberFormat getNumberFormat(java.lang.String formatString)
Parameters:
formatString - The (language specific) format string. May be empty or null.
Returns:
The associated number format.
In case of an empty or null formatString, a DecimalFormat for the current PM locale will be returned.

getMaxLenDefault

protected int getMaxLenDefault()
The default implementation calculates the number of digits required for the maximal value as provided by PmAttrNumber.getMax().