net.rim.device.api.ui
Interface FocusChangeListener


public interface FocusChangeListener

Listener interface for handling changes in focus within fields.

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

Three kinds of focus events should be handled: FOCUS_GAINED, FOCUS_LOST, and FOCUS_CHANGED.

See Also:
Field.setFocusListener(FocusChangeListener)

Field Summary
static int FOCUS_CHANGED
          Field prompting the event signals a change in focus.
static int FOCUS_GAINED
          Field prompting the event has gained the focus.
static int FOCUS_LOST
          Field prompting the event has lost the focus.
 
Method Summary
 void focusChanged(Field field, int eventType)
          Called by a field when focus enters, leaves or changes.
 

Field Detail

FOCUS_CHANGED

public static final int FOCUS_CHANGED
Field prompting the event signals a change in focus.

FOCUS_GAINED

public static final int FOCUS_GAINED
Field prompting the event has gained the focus.

FOCUS_LOST

public static final int FOCUS_LOST
Field prompting the event has lost the focus.
Method Detail

focusChanged

public void focusChanged(Field field,
                         int eventType)
Called by a field when focus enters, leaves or changes.

Parameters:
field - The field that caused the focus event.
eventType - Indicates the type of focus event.



Copyright 1999-2009 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.