com.ibm.commons.iloader.node
Interface DataNodeListener

All Superinterfaces:
java.util.EventListener
All Known Implementing Classes:
DataNodeAdapter

public interface DataNodeListener
extends java.util.EventListener

Interface that may be used in order to get all the data node events. It handles the following events :

The user may use the provided adapter (DataNodeAdapter), which provide a empty implementation of all the methods.


Method Summary
 void onCurrentChanged(DataNode source)
          Notify the view that the node current data have changed.
 void onInvalidate(DataNode source)
          Notify the view that the node data have completly changed.
 void onItemInserted(DataNode source, int position)
          Notify the view that one object have been inserted into the node.
 void onItemRemoved(DataNode source, int position)
          Notify the view that one object have been removed into the node.
 void onMetaDataChanged(DataNode source)
          Notify the view that the node meta data have changed.
 void onModifiedChanged(DataNode source)
          Notify the view that the modified flag has changed.
 void onReadOnlyChanged(DataNode source)
          Notify the view that the readonly mode has changed.
 void onUserNotification(DataNode source, java.lang.String key, java.lang.Object param)
          Genneralized notification message.
 void onValueChanged(DataNode source, int record, java.lang.Object object, IAttribute attribute)
          Notify the view that almost one property of the current object in the node have changed.
 void onValueChanged2(DataNode source, int record, java.lang.Object object, IMember member)
           
 

Method Detail

onMetaDataChanged

void onMetaDataChanged(DataNode source)
Notify the view that the node meta data have changed. The meta data describe all the columns (properties) of the data node.


onModifiedChanged

void onModifiedChanged(DataNode source)
Notify the view that the modified flag has changed.


onReadOnlyChanged

void onReadOnlyChanged(DataNode source)
Notify the view that the readonly mode has changed.


onInvalidate

void onInvalidate(DataNode source)
Notify the view that the node data have completly changed. This event is called when something has changed, without more precision. May be one or more record have been deleted/inserted, or all the rows have becamed changed (for example, when a node has been synchronized with a parent node).
At this stage, the new row count and the current record number can be safetly got from the data node.


onCurrentChanged

void onCurrentChanged(DataNode source)
Notify the view that the node current data have changed. The new current record can be safetly accessed from the data node.


onValueChanged

void onValueChanged(DataNode source,
                    int record,
                    java.lang.Object object,
                    IAttribute attribute)
Notify the view that almost one property of the current object in the node have changed. The new property value may be accessed from the data node. If more that one property have changed, the the property parameter is null. Do not rely on a non null property parameter !

Parameters:
record - the record number that have been modified
property - the changed property (can be null if more that one property have changed

onValueChanged2

void onValueChanged2(DataNode source,
                     int record,
                     java.lang.Object object,
                     IMember member)

onItemInserted

void onItemInserted(DataNode source,
                    int position)
Notify the view that one object have been inserted into the node. The new row count has been increased and a new row has been inserted at a specific position.
If the record has been inserted at the begining of the data node, then the parameter value is '0'
If the record has been inserted at the end of the data node then the parameter value equals to the data node item count.

Parameters:
position - the position where the item has been inserted
bookmark - the bookmark of the inserted item

onItemRemoved

void onItemRemoved(DataNode source,
                   int position)
Notify the view that one object have been removed into the node. Warning : the data node item count is already updated when this method is called.

Parameters:
position - the position of the removed item
bookmark - the bookmark of the removed item

onUserNotification

void onUserNotification(DataNode source,
                        java.lang.String key,
                        java.lang.Object param)
Genneralized notification message. This message has no precise signification, which is application defined. It is ignored by all the standard graphical objects.

Parameters:
key - the user defined key
param - the user defined param (may be null!)