|
|||||||||
| 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.component.ButtonField
|
+--net.rim.blackberry.api.bbm.platform.ui.chat.component.SmileyButton
Smiley Button that can be used to display available emoticons. This field can be used
together with the ReplyField inside a ReplyFieldManager.
| Field Summary | ||
protected Runnable |
_clickedRunnable
Executes when the button is clicked. |
|
protected ActiveAutoTextEditField |
_fieldToGiveFocusTo
If the smiley button has focus and the user starts typing, this field is given focus. |
|
protected Bitmap |
_focusBackground
Image used for drawing the focus background. |
|
protected Bitmap |
_smiley
Smiley image |
|
| Constructor Summary | ||
SmileyButton()
Creates an instance of the field with default images. |
||
SmileyButton(Bitmap focusBackground,
Bitmap smiley)
Creates an instance of the field with provided bitmaps. |
||
| Method Summary | ||
void |
click()
Posts the runnable on the event thread. |
|
protected void |
drawFocus(Graphics graphics,
boolean on)
Draws focus for the field. |
|
Runnable |
getClickRunnable()
Returns the runnable which will be executed when the user clicks on the button. |
|
int |
getPreferredHeight()
Returns preferred height which is the smiley size. |
|
int |
getPreferredWidth()
Returns preferred width which is the smiley size. |
|
protected boolean |
keyChar(char key,
int status,
int time)
Overrides to invoke the runnable when the field is clicked or to give focus away to the previously specified field. |
|
protected void |
layout(int width,
int height)
Sets the extent. |
|
protected boolean |
navigationUnclick(int status,
int time)
Overrides to invoke click(). |
|
protected void |
paint(Graphics graphics)
Paints the smiley button. |
|
void |
setClickRunnable(Runnable runnable)
Sets the runnable. |
|
void |
setFieldToGiveFocusTo(ActiveAutoTextEditField field)
Sets the field which will gain focus if the user starts typing while the smiley button has focus. |
|
protected boolean |
touchEvent(TouchEvent message)
Overrides to invoke the runnable when the field is clicked or to give focus away to the previously specified field. |
|
| Field Detail |
protected Runnable _clickedRunnable
protected ActiveAutoTextEditField _fieldToGiveFocusTo
protected Bitmap _focusBackground
| Constructor Detail |
public SmileyButton()
public SmileyButton(Bitmap focusBackground, Bitmap smiley)
focusBackground - image used for drawing the smiley background when button has focussmiley - smiley imageIllegalArgumentException - if dimensions do not match (heights must match, widths must match)NullPointerException - if a null bitmap is provided| Method Detail |
protected void drawFocus(Graphics graphics, boolean on)
graphics - graphics context for drawing the focuson - true if the focus should be set; otherwise, falsepublic Runnable getClickRunnable()
public int getPreferredHeight()
public int getPreferredWidth()
protected boolean keyChar(char key,
int status,
int time)
ButtonField#keyChar(char key, int status, int time)
protected void layout(int width,
int height)
width - Amount of available horizontal spaceheight - Amount of available vertical space
protected boolean navigationUnclick(int status,
int time)
click().ButtonField#navigationUnclick(int status, int time)protected void paint(Graphics graphics)
graphics - graphics context for drawing in this fieldpublic void setClickRunnable(Runnable runnable)
public void setFieldToGiveFocusTo(ActiveAutoTextEditField field)
field - field to give focus toprotected boolean touchEvent(TouchEvent message)
TouchEvent.UNCLICK and the super implementation otherwiseButtonField#touchEvent(TouchEvent message)
|
|||||||||
| 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.