Package com.ribs.helpers
Class JFormattedTextFieldHpr
java.lang.Object
com.ribs.RJHelper
com.ribs.helpers.JTextComponentHpr
com.ribs.helpers.JFormattedTextFieldHpr
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidfocusLost(JComponent aComponent, FocusEvent fe) Implemented to make sure formatter validates the data whenever the focus is lost (temporarily or permanently).floatgetFloatValue(JComponent aComponent) Returns the component's value as a float.intgetIntValue(JComponent aComponent) Returns the component's value as an int.getNumberValue(JComponent aComponent) Returns the component's value as an Number.getValue(JComponent aComponent) Returns a component's value.voidinitInstance(JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).newInstance(RXElement anElement) Creates a new instance of class for given element.voidsetValue(JComponent aComponent, Object aValue) Sets the given text component to the given value.toXML(JComponent aComponent, RXArchiver anArchiver) XML archivalMethods inherited from class com.ribs.helpers.JTextComponentHprfromXML, getSendActionOnDropString, getSendActionOnReturn, getStringValue, setSendActionOnDropString, setSendActionOnReturn, setValue, setValue, setValueMethods inherited from class com.ribs.RJHelperadd, focusGained, fromXMLDeep, get, getActionListener, getAutoscrolls, getAutosizing, getBackground, getBindKey, getBooleanValue, getBoolValue, getCallback, getChangeListener, getColorValue, getComponent, getComponentCount, getFocusListener, getForeground, getMaster, getMaximumSize, getMinimumSize, getOwner, getRibHeight, getRibWidth, getRibX, getRibY, getSendActionOnFocusLost, getSubstitutionClassString, isOpaque, performBindKeyGet, performBindKeySet, sendAction, setAutoscrolls, setAutosizing, setBackground, setBindKey, setCallback, setForeground, setMaster, setMaximumSize, setMinimumSize, setOpaque, setOwner, setSendActionOnFocusLost, setSubstitutionClassString, setValue, setValue, setValue, takeFloatValue, takeIntValue, testOutBeanBag, toXMLDeep
- 
Constructor Details- 
JFormattedTextFieldHprpublic JFormattedTextFieldHpr()
 
- 
- 
Method Details- 
newInstanceCreates a new instance of class for given element.- Overrides:
- newInstancein class- JTextComponentHpr
 
- 
initInstanceInitializes the given instance (actually called the first time an owner is set).- Overrides:
- initInstancein class- JTextComponentHpr
 
- 
getValueReturns a component's value.
- 
setValueDescription copied from class:JTextComponentHprSets the given text component to the given value.- Overrides:
- setValuein class- JTextComponentHpr
 
- 
getNumberValueReturns the component's value as an Number. Used by all the get() methods 
- 
getIntValueReturns the component's value as an int. (if appropriate)- Overrides:
- getIntValuein class- JTextComponentHpr
 
- 
getFloatValueReturns the component's value as a float. (if appropriate)- Overrides:
- getFloatValuein class- JTextComponentHpr
 
- 
focusLostImplemented to make sure formatter validates the data whenever the focus is lost (temporarily or permanently). Note that if the vale in the text field is invalid, focus will be allowed to changed, but the value in the text field will revert to what it was before the invalid edit. You would think the setFocusLostBehavior(COMMIT_OR_REVERT) would do this, but it doesn't. Plus it ignores temporary focus events.
- 
toXMLXML archival- Overrides:
- toXMLin class- JTextComponentHpr
 
 
-