net.rim.device.api.ui.component
Class ButtonFieldFactory

java.lang.Object
  extended by net.rim.device.api.ui.component.ButtonFieldFactory

public class ButtonFieldFactory
extends Object

Assists in creation of ButtonField instances using information contained within Command instances.

Since:
BlackBerry API 6.0.0

Method Summary
 ButtonField create(Command command)
          Creates a button and sets it's Command and associated context.
 ButtonField create(Command command, Object context)
          Creates a button and sets it's Command and associated context.
static ButtonFieldFactory getInstance()
          Returns ButtonFieldFactory singleton instance.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

create

public ButtonField create(Command command)
Creates a button and sets it's Command and associated context. Also, supports the following CommandMetadata attributes: (CommandMetadata.BITMAP_ICON String Sets icon using resource name (CommandMetadata.PREDEFINED_ICON int Sets icon using int constant defined in Bitmap (CommandMetadata.THEMED_ICON String Sets icon using theme tag (CommandMetadata.ALIGNMENT String Sets internal alignment of button and / or image. Valid values: "left", "right", "top", "bottom". (CommandMetadata.LABEL String Sets button label (CommandMetadata.LABEL_ORIENTATION String Sets label orientation if there is an icon. Valid values: "left", "right" If any invalid value retrieved from CommandMetadata will be ignored. Method never returns null. If command is null then ButtonField will be created with null command.

Parameters:
command - Command instance to use for Button
Returns:
ButtonField instance
Since:
BlackBerry API 6.0.0

create

public ButtonField create(Command command,
                          Object context)
Creates a button and sets it's Command and associated context. Also, supports the following CommandMetadata attributes: (CommandMetadata.BITMAP_ICON String Sets icon using resource name (CommandMetadata.PREDEFINED_ICON int Sets icon using int constant defined in Bitmap (CommandMetadata.THEMED_ICON String Sets icon using theme tag (CommandMetadata.ALIGNMENT String Sets internal alignment of button and / or image. Valid values: "left", "right", "top", "bottom". (CommandMetadata.LABEL String Sets button label (CommandMetadata.LABEL_ORIENTATION String Sets label orientation if there is an icon. Valid values: "left", "right" If any invalid value retrieved from CommandMetadata will be ignored. Method never returns null. If command and / or context is null then ButtonField will be created with null command and / or context.

Parameters:
command - Command instance to use for Button
context - Command context
Returns:
ButtonField instance
Since:
BlackBerry API 6.0.0

getInstance

public static ButtonFieldFactory getInstance()
Returns ButtonFieldFactory singleton instance.

Since:
BlackBerry API 6.0.0





Copyright 1999-2010 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. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.