net.rim.blackberry.api.bbm.platform.ui.chat.decor
Class ChatBorderFactory

java.lang.Object
  |
  +--net.rim.blackberry.api.bbm.platform.ui.chat.decor.ChatBorderFactory

public final class ChatBorderFactory
extends Object

Creates borders for chat messages. For example, to create a bubble border around an outgoing chat message, you can use:

 Field messageOutgoing = createMessageField(); // your own implementation or OutgoingTextMessageField
 Field messageIncoming = createMessageField(); // your own implementation or IncomingTextMessageField
 messageOutgoing.setBorder(ChatBorderFactory.createOutgoingBubbleBorder()); // be sure to adjust the padding/margins
 messageIncoming.setBorder(ChatBorderFactory.createIncomingBubbleBorder(BUBBLE_COLOR_ORANGE); // be sure to adjust the padding/margins
 

Since:
BBM SDK 1.0

Field Summary
static int BUBBLE_COLOR_BLUE
          Bubble border color.
static int BUBBLE_COLOR_DEEP_ORANGE
          Bubble border color.
static int BUBBLE_COLOR_DEEP_YELLOW
          Bubble border color.
static int BUBBLE_COLOR_GREEN
          Bubble border color.
static int BUBBLE_COLOR_ORANGE
          Bubble border color.
static int BUBBLE_COLOR_PURPLE
          Bubble border color.
static int BUBBLE_COLOR_ROSE
          Bubble border color.
static int BUBBLE_COLOR_TEAL
          Bubble border color.
static int BUBBLE_COLOR_VIOLET
          Bubble border color.
static int BUBBLE_COLOR_YELLOW
          Bubble border color.
 
Method Summary
static Border createIncomingBubbleBorder(int color)
          Returns a bubble border for an incoming message.
static Border createOutgoingBubbleBorder()
          Returns a bubble border for an outgoing message.
static Border getDarkRoundedBorder()
          Returns a dark rounded border.
static Border getRoundedBorder()
          Returns a rounded border.
 

Field Detail

BUBBLE_COLOR_BLUE

public static final int BUBBLE_COLOR_BLUE
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_DEEP_ORANGE

public static final int BUBBLE_COLOR_DEEP_ORANGE
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_DEEP_YELLOW

public static final int BUBBLE_COLOR_DEEP_YELLOW
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_GREEN

public static final int BUBBLE_COLOR_GREEN
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_ORANGE

public static final int BUBBLE_COLOR_ORANGE
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_PURPLE

public static final int BUBBLE_COLOR_PURPLE
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_ROSE

public static final int BUBBLE_COLOR_ROSE
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_TEAL

public static final int BUBBLE_COLOR_TEAL
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_VIOLET

public static final int BUBBLE_COLOR_VIOLET
Bubble border color.
Since:
BBM SDK 1.0

BUBBLE_COLOR_YELLOW

public static final int BUBBLE_COLOR_YELLOW
Bubble border color.
Since:
BBM SDK 1.0
Method Detail

createIncomingBubbleBorder

public static Border createIncomingBubbleBorder(int color)
Returns a bubble border for an incoming message.
Parameters:
color - one of BUBBLE_COLOR_ constants
Returns:
bubble border
Since:
BBM SDK 1.0

createOutgoingBubbleBorder

public static Border createOutgoingBubbleBorder()
Returns a bubble border for an outgoing message. Returns a grey colored bubble border.
Returns:
bubble border
Since:
BBM SDK 1.0

getDarkRoundedBorder

public static Border getDarkRoundedBorder()
Returns a dark rounded border.
Returns:
a rounded border
Since:
BBM SDK 1.0

getRoundedBorder

public static Border getRoundedBorder()
Returns a rounded border.
Returns:
a rounded border
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.