net.rim.blackberry.api.bbm.platform.ui.chat.container
Class BasicMessageListManager

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
                          |
                          +--net.rim.blackberry.api.bbm.platform.ui.chat.container.BasicMessageListManager
All Implemented Interfaces:
AdjustmentListener, FieldVisibleRectChangeListener, IComponent, InputMethodListener, ToggleFieldProvider

public class BasicMessageListManager
extends MessageListManager
implements ToggleFieldProvider

MessageListManager that knows how to toggle its display. If the state is not collapsed, a grey layer is drawn over the field to indicate it is not in foreground. Otherwise, the behavior is the same as the behavior of the parent.

Since:
BBM SDK 1.0

Field Summary
protected  boolean _isCollapsed
          If the state is collapsed, this field is showing.
protected  int[] GREY_LAYER
          Layer that will be used for indicating the field is hidden.
 
Fields inherited from class net.rim.blackberry.api.bbm.platform.ui.chat.container.MessageListManager
_fields, BORDER_STYLE_BUBBLE, MESSAGE_STYLE_GROUP_MESSAGES_SAME_SENDER, MESSAGE_STYLE_SHOW_SENDER_DISPLAY_NAME, SCROLL_HOTKEY_BOTTOM, SCROLL_HOTKEY_TOP
 
Constructor Summary
BasicMessageListManager(long style, long messageDisplayStyle, int borderStyle)
           
 
Method Summary
 Field getToggleField()
          Returns this field.
 boolean isCollapsed()
          Indicates whether the toggle field represents a collapsed state.
protected  boolean isScrollCopyable()
          Disable copying while scrolling since this field will overlap with the reply field.
 void paint(Graphics graphics)
          If the state of the field is not collapsed, paints a grey layer on top of the field to indicate it is disabled.
 void toggle()
          Toggles the value returned by ToggleFieldProvider.isCollapsed().
 
Methods inherited from class net.rim.blackberry.api.bbm.platform.ui.chat.container.MessageListManager
addGroupedMessage, addMessage, addNonGroupedMessage, createDivider, getFields, moveFocus, removeAllMessages, scroll, scrollToField, sublayout
 

Field Detail

_isCollapsed

protected boolean _isCollapsed
If the state is collapsed, this field is showing.
Since:
BBM SDK 1.0

GREY_LAYER

protected int[] GREY_LAYER
Layer that will be used for indicating the field is hidden.
Since:
BBM SDK 1.0
Constructor Detail

BasicMessageListManager

public BasicMessageListManager(long style,
                               long messageDisplayStyle,
                               int borderStyle)
Since:
BBM SDK 1.0
See Also:
MessageListManager.MessageListManager(long style, long messageDisplayStyle, int borderStyle)
Method Detail

getToggleField

public Field getToggleField()
Returns this field.
Since:
BBM SDK 1.0
See Also:
ToggleFieldProvider.getToggleField()

isCollapsed

public boolean isCollapsed()
Description copied from interface: ToggleFieldProvider
Indicates whether the toggle field represents a collapsed state. May be called from a non-event thread.
Since:
BBM SDK 1.0
See Also:
ToggleFieldProvider.isCollapsed()

isScrollCopyable

protected boolean isScrollCopyable()
Disable copying while scrolling since this field will overlap with the reply field.
Returns:
true if the state is collapsed; otherwise, false
Since:
BBM SDK 1.0

paint

public void paint(Graphics graphics)
If the state of the field is not collapsed, paints a grey layer on top of the field to indicate it is disabled.
Parameters:
graphics - graphics context
Since:
BBM SDK 1.0

toggle

public void toggle()
Description copied from interface: ToggleFieldProvider
Toggles the value returned by ToggleFieldProvider.isCollapsed(). Repaints the field. This must only be called from the event thread.
Since:
BBM SDK 1.0
See Also:
ToggleFieldProvider.toggle()



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.