Class InputString

  extended byfi.hut.tml.xsmiles.mlfc.xforms.adaptive.AbstractControl
      extended byfi.hut.tml.xsmiles.mlfc.xforms.adaptive.InputString
All Implemented Interfaces:
java.awt.event.ActionListener, Control, java.util.EventListener, java.awt.event.FocusListener, FormControl, java.awt.event.TextListener, TypedElement

public class InputString
extends AbstractControl
implements java.awt.event.TextListener, java.awt.event.FocusListener, java.awt.event.ActionListener

Field Summary
protected  XInput fInput
Fields inherited from class fi.hut.tml.xsmiles.mlfc.xforms.adaptive.AbstractControl
fActionListener, fChangeListener, fContext, insideEvent, ownerElem
Constructor Summary
InputString(XFormsContext context, org.w3c.dom.Element elem)
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Invoked when an action occurs.
protected  void createControl()
          creates the control with the component factory
 void destroy()
          close up, free all memory (yet, do not do visible changes, such as setVisible since this will slow things up
 void focusGained(java.awt.event.FocusEvent ae)
 void focusLost(java.awt.event.FocusEvent ae)
 XComponent getComponent()
          returns the abstract component for this control.
 Data getValue()
          get the components current value
 void notifyIncrementalChange(java.awt.event.TextEvent e)
protected  void registerListener()
          internal method for setting the listener for the component
 void rewiringAboutToHappen()
          This notifies the text control to save its value before rewiring
 void textValueChanged(java.awt.event.TextEvent e)
 void updateDisplay()
          set the components value
Methods inherited from class fi.hut.tml.xsmiles.mlfc.xforms.adaptive.AbstractControl
activate, activate, addActionListener, addChangeListener, getData, getDataType, isInputControl, isWritable, setData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail


protected XInput fInput
Constructor Detail


public InputString(XFormsContext context,
                   org.w3c.dom.Element elem)
Method Detail


protected void createControl()
creates the control with the component factory


public XComponent getComponent()
returns the abstract component for this control. The abstract component can be used e.g. to style the component but all listeners should be added to the AdaptiveControl and not directly to the XComponent

Specified by:
getComponent in interface Control


public Data getValue()
get the components current value

Specified by:
getValue in interface Control


protected void registerListener()
internal method for setting the listener for the component


public void destroy()
Description copied from class: AbstractControl
close up, free all memory (yet, do not do visible changes, such as setVisible since this will slow things up

Specified by:
destroy in interface Control
destroy in class AbstractControl


public void updateDisplay()
set the components value

Specified by:
updateDisplay in interface Control


public void focusGained(java.awt.event.FocusEvent ae)
Specified by:
focusGained in interface java.awt.event.FocusListener


public void focusLost(java.awt.event.FocusEvent ae)
Specified by:
focusLost in interface java.awt.event.FocusListener


public void rewiringAboutToHappen()
This notifies the text control to save its value before rewiring

Specified by:
rewiringAboutToHappen in interface Control
rewiringAboutToHappen in class AbstractControl


public void textValueChanged(java.awt.event.TextEvent e)
Specified by:
textValueChanged in interface java.awt.event.TextListener


public void notifyIncrementalChange(java.awt.event.TextEvent e)


public void actionPerformed(java.awt.event.ActionEvent e)
Invoked when an action occurs. User has pressed enter in the field

Specified by:
actionPerformed in interface java.awt.event.ActionListener

X-Smiles 1.2