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

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.xforms.adaptive.AbstractControl
All Implemented Interfaces:
Control, FormControl, TypedElement
Direct Known Subclasses:
AbstractRange, InputBoolean, InputDate, InputString, OutputAny

public abstract class AbstractControl
extends java.lang.Object
implements Control, TypedElement


Field Summary
protected  java.awt.event.ActionListener fActionListener
           
protected  XChangeListener fChangeListener
           
protected  XFormsContext fContext
           
protected  boolean insideEvent
          whether I'm inside update event to prevent loops
protected  org.w3c.dom.Element ownerElem
           
 
Constructor Summary
AbstractControl(XFormsContext context, org.w3c.dom.Element elem)
           
 
Method Summary
protected  void activate(java.awt.event.ActionEvent event)
          call this method when the control has been activated
protected  void activate(java.lang.String command)
          call this method when the control has been activated
 void addActionListener(java.awt.event.ActionListener listener)
          add a listener for actions in the component
 void addChangeListener(XChangeListener listener)
          add a listener for changes in the component
 void destroy()
          close up, free all memory (yet, do not do visible changes, such as setVisible since this will slow things up
 Data getData()
           
 short getDataType()
           
 boolean isInputControl()
           
 boolean isWritable()
           
 void rewiringAboutToHappen()
          This notifies the text control to save its value before rewiring
 void setData(Data d)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fi.hut.tml.xsmiles.mlfc.xforms.adaptive.Control
getComponent, getValue, updateDisplay
 

Field Detail

fContext

protected XFormsContext fContext

fChangeListener

protected XChangeListener fChangeListener

fActionListener

protected java.awt.event.ActionListener fActionListener

insideEvent

protected boolean insideEvent
whether I'm inside update event to prevent loops


ownerElem

protected org.w3c.dom.Element ownerElem
Constructor Detail

AbstractControl

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

addChangeListener

public void addChangeListener(XChangeListener listener)
add a listener for changes in the component

Specified by:
addChangeListener in interface Control

addActionListener

public void addActionListener(java.awt.event.ActionListener listener)
add a listener for actions in the component

Specified by:
addActionListener in interface Control

rewiringAboutToHappen

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

Specified by:
rewiringAboutToHappen in interface Control

isWritable

public boolean isWritable()
Specified by:
isWritable in interface FormControl

destroy

public void destroy()
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

activate

protected void activate(java.lang.String command)
call this method when the control has been activated


activate

protected void activate(java.awt.event.ActionEvent event)
call this method when the control has been activated


isInputControl

public boolean isInputControl()
Specified by:
isInputControl in interface TypedElement

getDataType

public short getDataType()
Specified by:
getDataType in interface TypedElement

getData

public Data getData()
Specified by:
getData in interface TypedElement

setData

public void setData(Data d)
Specified by:
setData in interface TypedElement


X-Smiles 1.2