|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--net.rim.device.api.ui.Field
|
+--net.rim.device.api.ui.ScrollView
|
+--net.rim.device.api.ui.Manager
|
+--net.rim.blackberry.api.bbm.platform.ui.chat.container.MessageListManager
Manager for conversation messages. Each message knows how to draw itself. If you have a message
that needs to draw itself in a specific way, you can add it to this manager by making it
implement MessageFieldProvider. Your conversation should only have one instance of this manager.
The border style bit will be respected for fields that are of type IncomingTextMessageField and
OutgoingTextMessageField. If you want to have the same border around your field, you can use
ChatBorderFactory to create the border.
| Field Summary | ||
protected VerticalFieldManager |
_fields
Contains all the fields. |
|
static int |
BORDER_STYLE_BUBBLE
Bubble border around text messages. |
|
static long |
MESSAGE_STYLE_GROUP_MESSAGES_SAME_SENDER
Place consecutive messages from the same sender into one container. |
|
static long |
MESSAGE_STYLE_SHOW_SENDER_DISPLAY_NAME
Show the display name of the sender. |
|
static int |
SCROLL_HOTKEY_BOTTOM
Use this to scroll to the bottom of the manager. |
|
static int |
SCROLL_HOTKEY_TOP
Use this to scroll to the top of the manager. |
|
| Constructor Summary | ||
MessageListManager(long style,
long messageDisplayStyle,
int borderStyle)
Constructs an instance of the field. |
||
| Method Summary | ||
protected void |
addGroupedMessage(Manager lastField,
MessageFieldProvider message)
Appends the message to the last field of this manager, which is a container. |
|
void |
addMessage(MessageFieldProvider message)
Adds a message field to the manager respecting the style specified when the manager was constructed. |
|
protected void |
addNonGroupedMessage(MessageFieldProvider message)
Adds the message to the container of the message as returned by MessageFieldProvider.createFieldContainer();
if the container is null, uses a VerticalFieldManager. |
|
protected Field |
createDivider()
Returns a new instance of the divider for separating the sender field from the sender's messages. |
|
protected Field |
getFields()
Returns the manager which contains all the fields. |
|
protected int |
moveFocus(int amount,
int status,
int time)
Ensures that horizontal scrolls do not leave this manager. |
|
void |
removeAllMessages()
Remove all message fields that have been added to the manager. |
|
Field |
scroll(int flag)
Scrolls the manager according to the flag passed. |
|
void |
scrollToField(Field field)
Scrolls to the provided field. |
|
protected void |
sublayout(int width,
int height)
Layout the field which contains all the messages. |
|
| Field Detail |
public static final int BORDER_STYLE_BUBBLE
public static final long MESSAGE_STYLE_GROUP_MESSAGES_SAME_SENDER
public static final long MESSAGE_STYLE_SHOW_SENDER_DISPLAY_NAME
public static final int SCROLL_HOTKEY_BOTTOM
public static final int SCROLL_HOTKEY_TOP
| Constructor Detail |
public MessageListManager(long style,
long messageDisplayStyle,
int borderStyle)
style - style bit passed to the supermessageDisplayStyle - style bit dictating how message should be displayed: MESSAGE_STYLE_*borderStyle - style bit dictating which border to use for messages: BORDER_STYLE_*| Method Detail |
protected void addGroupedMessage(Manager lastField, MessageFieldProvider message)
lastField - last field in this managermessage - message to be addedpublic void addMessage(MessageFieldProvider message)
message - message fieldprotected void addNonGroupedMessage(MessageFieldProvider message)
MessageFieldProvider.createFieldContainer();
if the container is null, uses a VerticalFieldManager.
Respects the border style display style bits.message - message to be addedprotected Field createDivider()
protected Field getFields()
protected int moveFocus(int amount,
int status,
int time)
amount - If positive, move focus forward this many index positions;
if negative, move focus backwards this many index positions.status - Trackwheel event modifiers.time - Number of milliseconds since the device was turned on.amount parameter.public void removeAllMessages()
public Field scroll(int flag)
flag - Some identifier of the position that history manager is required
to scroll to.public void scrollToField(Field field)
field - field to which to scroll.
protected void sublayout(int width,
int height)
width - available widthheight - available height
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
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.