Package com.ribs.helpers
Class JFormattedTextFieldHpr
- java.lang.Object
- 
- com.ribs.RJHelper
- 
- com.ribs.helpers.JTextComponentHpr
- 
- com.ribs.helpers.JFormattedTextFieldHpr
 
 
 
- 
 public class JFormattedTextFieldHpr extends JTextComponentHpr 
- 
- 
Constructor SummaryConstructors Constructor Description JFormattedTextFieldHpr()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfocusLost(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Implemented to make sure formatter validates the data whenever the focus is lost (temporarily or permanently).floatgetFloatValue(javax.swing.JComponent aComponent)Returns the component's value as a float.intgetIntValue(javax.swing.JComponent aComponent)Returns the component's value as an int.java.lang.NumbergetNumberValue(javax.swing.JComponent aComponent)Returns the component's value as an Number.java.lang.ObjectgetValue(javax.swing.JComponent aComponent)Returns a component's value.voidinitInstance(javax.swing.JComponent aComponent)Initializes the given instance (actually called the first time an owner is set).java.lang.ObjectnewInstance(RXElement anElement)Creates a new instance of class for given element.voidsetValue(javax.swing.JComponent aComponent, java.lang.Object aValue)Sets the given text component to the given value.RXElementtoXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)XML archival- 
Methods inherited from class com.ribs.helpers.JTextComponentHprfromXML, getSendActionOnDropString, getSendActionOnReturn, getStringValue, setSendActionOnDropString, setSendActionOnReturn, setValue, setValue, setValue
 - 
Methods 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
 
- 
 
- 
- 
- 
Method Detail- 
newInstancepublic java.lang.Object newInstance(RXElement anElement) Creates a new instance of class for given element.- Overrides:
- newInstancein class- JTextComponentHpr
 
 - 
initInstancepublic void initInstance(javax.swing.JComponent aComponent) Initializes the given instance (actually called the first time an owner is set).- Overrides:
- initInstancein class- JTextComponentHpr
 
 - 
getValuepublic java.lang.Object getValue(javax.swing.JComponent aComponent) Returns a component's value.
 - 
setValuepublic void setValue(javax.swing.JComponent aComponent, java.lang.Object aValue)Description copied from class:JTextComponentHprSets the given text component to the given value.- Overrides:
- setValuein class- JTextComponentHpr
 
 - 
getNumberValuepublic java.lang.Number getNumberValue(javax.swing.JComponent aComponent) Returns the component's value as an Number. Used by all the get() methods 
 - 
getIntValuepublic int getIntValue(javax.swing.JComponent aComponent) Returns the component's value as an int. (if appropriate)- Overrides:
- getIntValuein class- JTextComponentHpr
 
 - 
getFloatValuepublic float getFloatValue(javax.swing.JComponent aComponent) Returns the component's value as a float. (if appropriate)- Overrides:
- getFloatValuein class- JTextComponentHpr
 
 - 
focusLostpublic void focusLost(javax.swing.JComponent aComponent, java.awt.event.FocusEvent fe)Implemented 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.
 - 
toXMLpublic RXElement toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver) XML archival- Overrides:
- toXMLin class- JTextComponentHpr
 
 
- 
 
-