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

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.ReplyFieldManager
All Implemented Interfaces:
AdjustmentListener, FieldVisibleRectChangeListener, IComponent, InputMethodListener

public class ReplyFieldManager
extends Manager

Manager to layout ReplyField and SmileyButton horizontally. The manager lays out the smiley button and gives the rest of the width to the reply field. Left-to-Rightness is respected by this manager.

Since:
BBM SDK 1.0

Constructor Summary
ReplyFieldManager()
          Creates an instance of the manager with a default background.
ReplyFieldManager(Bitmap backgroundBitmap)
          Creates an instance of the manager.
ReplyFieldManager(int[] backgroundColors)
          Creates an instance of the manager.
 
Method Summary
protected  int moveFocus(int amount, int status, int time)
          Ensures that horizontal scrolls do not leave this manager.
protected  int nextFocus(int direction, int axis)
          Scrolling down skips the smiley field.
protected  void sublayout(int maxWidth, int maxHeight)
          Lays out the reply field and smiley fields.
 

Constructor Detail

ReplyFieldManager

public ReplyFieldManager()
Creates an instance of the manager with a default background.
Since:
BBM SDK 1.0

ReplyFieldManager

public ReplyFieldManager(Bitmap backgroundBitmap)
Creates an instance of the manager. The provided bitmap will be used to create a background for this manager. The bitmap will be drawn using Graphics#tileRop( int rop, int x, int y, int width, int height, Bitmap source, int left, int top ).
Throws:
IllegalArgumentException - if the provided image is null
Since:
BBM SDK 1.0

ReplyFieldManager

public ReplyFieldManager(int[] backgroundColors)
Creates an instance of the manager. The provided colors will be used to create a background for this manager. The colors will be passed to Graphics#drawShadedFilledPath( int[] xPts, int[] yPts, byte[] pointTypes, int[] colors, int[] offsets ).
Throws:
IllegalArgumentException - if the provided colors array is null
Since:
BBM SDK 1.0
Method Detail

moveFocus

protected int moveFocus(int amount,
                        int status,
                        int time)
Ensures that horizontal scrolls do not leave this manager.
Since:
BBM SDK 1.0
See Also:
Manager#moveFocus(int amount, int status, int time)

nextFocus

protected int nextFocus(int direction,
                        int axis)
Scrolling down skips the smiley field.
Parameters:
direction - Direction the focus is moving within the field
axis - The axis of movement
Returns:
-1 if scrolling vertically; otherwise, falls back on the super implementation
Since:
BBM SDK 1.0

sublayout

protected void sublayout(int maxWidth,
                         int maxHeight)
Lays out the reply field and smiley fields. Gives all the width not taken up by the smiley field to the reply field.
Parameters:
maxWidth - width available for this manager
maxHeight - height available for this manager
Throws:
IllegalStateException - if the manager does not have exactly two fields
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.