Class JFormattedTextFieldHpr


public class JFormattedTextFieldHpr extends JTextComponentHpr
  • Constructor Details

    • JFormattedTextFieldHpr

      public JFormattedTextFieldHpr()
  • Method Details

    • newInstance

      public Object newInstance(RXElement anElement)
      Creates a new instance of class for given element.
      Overrides:
      newInstance in class JTextComponentHpr
    • initInstance

      public void initInstance(JComponent aComponent)
      Initializes the given instance (actually called the first time an owner is set).
      Overrides:
      initInstance in class JTextComponentHpr
    • getValue

      public Object getValue(JComponent aComponent)
      Returns a component's value.
      Overrides:
      getValue in class RJHelper
    • setValue

      public void setValue(JComponent aComponent, Object aValue)
      Description copied from class: JTextComponentHpr
      Sets the given text component to the given value.
      Overrides:
      setValue in class JTextComponentHpr
    • getNumberValue

      public Number getNumberValue(JComponent aComponent)
      Returns the component's value as an Number. Used by all the get() methods
    • getIntValue

      public int getIntValue(JComponent aComponent)
      Returns the component's value as an int. (if appropriate)
      Overrides:
      getIntValue in class JTextComponentHpr
    • getFloatValue

      public float getFloatValue(JComponent aComponent)
      Returns the component's value as a float. (if appropriate)
      Overrides:
      getFloatValue in class JTextComponentHpr
    • focusLost

      public void focusLost(JComponent aComponent, 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.
      Overrides:
      focusLost in class RJHelper
    • toXML

      public RXElement toXML(JComponent aComponent, RXArchiver anArchiver)
      XML archival
      Overrides:
      toXML in class JTextComponentHpr