fi.hut.tml.xsmiles.mlfc.xforms.adaptive
Class InputString

java.lang.Object
  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

fInput

protected XInput fInput
Constructor Detail

InputString

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

createControl

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


getComponent

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

getValue

public Data getValue()
get the components current value

Specified by:
getValue in interface Control

registerListener

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


destroy

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
Overrides:
destroy in class AbstractControl

updateDisplay

public void updateDisplay()
set the components value

Specified by:
updateDisplay in interface Control

focusGained

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

focusLost

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

rewiringAboutToHappen

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

Specified by:
rewiringAboutToHappen in interface Control
Overrides:
rewiringAboutToHappen in class AbstractControl

textValueChanged

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

notifyIncrementalChange

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

actionPerformed

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