Interface FieldChangeListener

All Known Implementing Classes:
RichMapField, AbstractLocationPicker, ContactsLocationPicker, EnterLocationPicker, GPSLocationPicker, GeotaggedPhotoPicker, MapsLocationPicker, RecentLocationPicker, SuggestedLocationPicker, AutoCompleteField, Dialog, KeywordFilterField

public interface FieldChangeListener

Listener interface for handling Field change events.

Classes that want to handle change events should implement this interface. Field classes identify the listener object to handle change events with their setChangeListener method.

Note: A listener may get notified by an unexpected field. For example, suppose one registers to listen to a ChoiceField. If the user puts the field into "change option" mode, this function will be called from that instance. Use Field.getOriginal() to find out what the original field is.

See Also:
Field.setChangeListener(FieldChangeListener), Field.getOriginal()

Field Summary
          Indicates field change was done programmatically.
Method Summary
 void fieldChanged(Field field, int context)
          Invoked by a field when a property changes.

Field Detail


static final int PROGRAMMATIC
Indicates field change was done programmatically.

See Also:
Constant Field Values

Method Detail


void fieldChanged(Field field,
                  int context)
Invoked by a field when a property changes.

field - The field that changed.
context - Information specifying the origin of the change. The context value is used to provide detailed information about how the field was changed. For example, see ChoiceField.CONTEXT_CHANGE_OPTION for the context information in ChoiceField. Please check individual fields for more details. context is FieldChangeListener.PROGRAMMATIC if the field was changed programmatically, that is, not by user interaction.

Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.