at.spardat.xma.boot.component
Interface IComponent


public interface IComponent

This class defines the interface common for all cliend side components. Application data can be exchanged between components via name-value-pairs. Each component defines its own set of name-value-pairs which are supported by the component. Such name-value-pairs are called properties here.


Method Summary
 void addEventListener(IComponentListener listener)
          Adds a ComponentListner to the listeners of the component.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a PropertyChangeListener to the listeners of the component.
 void dispose()
          Frees all allocated recources of the Component.
 java.util.Properties getProperties()
          Gives all properties of the component.
 java.lang.String getProperty(java.lang.String name)
          Gives the value of a property.
 IRtXMASessionClient getRTSession()
          Get the session of the component.
 void invoke(org.eclipse.swt.widgets.Composite parent)
          This method is called to start the Component on the client side.
 void removeEventListener(IComponentListener listener)
          Remove a ComponentListener form the listners of the component.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Remove a PropertyChangeListener form the listners of the component.
 void setProperties(java.util.Properties input)
          Sets all properties of the component.
 void setProperty(java.lang.String name, java.lang.String value)
          Sets one property of the component.
 

Method Detail

addEventListener

public void addEventListener(IComponentListener listener)
Adds a ComponentListner to the listeners of the component. All listeners are notified of all property-changes and component-events.

Parameters:
listener - the new listener to register

removeEventListener

public void removeEventListener(IComponentListener listener)
Remove a ComponentListener form the listners of the component. This ComponentListner will not be notified of propertiy-changes and component-events any more.

Parameters:
listener - the ComponentListener to remove

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a PropertyChangeListener to the listeners of the component. All listeners are notified of all property-changes.

Parameters:
listener - the new listener to register

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Remove a PropertyChangeListener form the listners of the component. This PropertyChangeListener will not be notified of propertiy-changes any more.

Parameters:
listener - the PropertyChangeListener to remove

setProperties

public void setProperties(java.util.Properties input)
Sets all properties of the component. This method completly resets the set of properties of the component to the set given as input. If there are registered ComponentListeners, all ComponentListeners are notifyed of each property-change.

Parameters:
input - the new set of properties

setProperty

public void setProperty(java.lang.String name,
                        java.lang.String value)
Sets one property of the component. If there are registered ComponentListeners and the value of the property is differend from its old value, all ComponentListeners are notifyed of the property-change.

Parameters:
name - the name of the property to change
value - the new value of the property

getProperty

public java.lang.String getProperty(java.lang.String name)
Gives the value of a property. If the property is not defined null is returned.

Parameters:
name - the name of the property
Returns:
the value of the named property

getProperties

public java.util.Properties getProperties()
Gives all properties of the component.

Returns:
the properties of the component.

invoke

public void invoke(org.eclipse.swt.widgets.Composite parent)
This method is called to start the Component on the client side. This method must be implemented by the application programmer. It will typicaly create a DialogPage, copy some input data into the Page and start the DialogPage by calling DialogPage.invoke(). For modal components this method must block until the component is closed. For nonmodal components this method returns imediatly after the component is started. This method must not be called for visually embedded Components.

Parameters:
parent - The shell of the dialog will be created as child of parent.

dispose

public void dispose()
Frees all allocated recources of the Component. This includes freeing all still living statefull PageModels at the server and disposing all SWT-resources like Images.


getRTSession

public IRtXMASessionClient getRTSession()
Get the session of the component.

Returns:
the client side session this component belongs to.