net.rim.blackberry.api.bbm.platform.ui.chat
Interface MessageFieldProvider

All Known Implementing Classes:
TextMessageField, OutgoingTextMessageField, IncomingTextMessageField

public interface MessageFieldProvider

Fields that want to be added to the MessageListManager for display need to implement this interface. For example, if you have a system message you would like to display in a specific color, you can implement this interface.

Since:
BBM SDK 1.0

Method Summary
 Manager createFieldContainer()
          Returns a manager which will contain the message field as returned by getField().
 Field createSenderField()
          Provides the field with the display name of the sender.
 Field getField()
          Returns a field which can be added to the MessageListManager for display.
 boolean shouldGroupWithLastField(Manager container)
          Indicates whether the message should be appended to the last field.
 

Method Detail

createFieldContainer

public Manager createFieldContainer()
Returns a manager which will contain the message field as returned by getField(). If null is provided, a VerticalFieldManager will be used.
Returns:
manager which will contain the message field
Since:
BBM SDK 1.0

createSenderField

public Field createSenderField()
Provides the field with the display name of the sender. Override if you want to customize the way the sender field is shown.
Returns:
field with the display name of the sender
Since:
BBM SDK 1.0

getField

public Field getField()
Returns a field which can be added to the MessageListManager for display.
Returns:
field which can be added to the MessageListManager for display
Since:
BBM SDK 1.0

shouldGroupWithLastField

public boolean shouldGroupWithLastField(Manager container)
Indicates whether the message should be appended to the last field. For example, if you want consecutive messages from the same sender to be grouped, implement this method to support the logic.
Parameters:
container - last field in the message list
Returns:
true if the message should be placed inside the container; false, otherwise
Since:
BBM SDK 1.0



Copyright 1999- 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.