|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.rim.device.api.ui.menu.CommandItem
public final class CommandItem
Specifies the text, icon, and behavior of a command item.
DefaultContextMenuProvider
,
CommandItemProvider
Constructor Summary | ||
---|---|---|
CommandItem()
Creates a command item. |
||
CommandItem(Command command)
Creates a command item. |
||
CommandItem(StringProvider text)
Creates a command item. |
||
CommandItem(StringProvider text,
Image icon)
Creates a command item. |
||
CommandItem(StringProvider text,
Image icon,
Command command)
Creates a command item. |
Method Summary | ||
---|---|---|
Command |
getCommand()
Returns the command of this command item. |
|
Image |
getIcon()
Returns the icon of this command item. |
|
StringProvider |
getStringProvider()
Returns the text of this command item. |
|
String |
getText()
Returns the text of this command item. |
|
void |
setCommand(Command command)
Sets the command of this command item. |
|
void |
setIcon(Image icon)
Sets the icon of this command item. |
|
void |
setText(StringProvider text)
Sets the text of this command item. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandItem()
public CommandItem(Command command)
command
- The Command
associated with this item.public CommandItem(StringProvider text)
text
- The text of this item.public CommandItem(StringProvider text, Image icon)
text
- The text of this item.icon
- The icon of this item. If null
, a default icon is used.public CommandItem(StringProvider text, Image icon, Command command)
text
- The text of this item.icon
- The icon of this item. If null
, a default icon is used.command
- The Command
associated with this item.Method Detail |
---|
public Command getCommand()
Command
of this command item.public String getText()
public StringProvider getStringProvider()
public Image getIcon()
If no icon was explicitly set, it looks at the CommandMetadata
information to retrieve one.
First, it checks to value associated with CommandMetadata.THEMED_ICON
. If it is not set, the default
of "command/" + getCommand().getId()
is be used.
public void setCommand(Command command)
command
- The command of this item.public void setIcon(Image icon)
icon
- The icon of this item.public void setText(StringProvider text)
text
- The text of this item.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal