public class SoftButton extends RPCStruct
A simulated button or keyboard key that is displayed on a touch screen.
Parameter List
| Name | Type | Description | Reg. | Notes | Version |
|---|---|---|---|---|---|
| type | SoftButtonType | Describes, whether it is text, highlighted text, icon, or dynamic image. | SmartDeviceLink 2.0 | ||
| text | String | Optional text to display (if defined as TEXT or BOTH) | N | Min: 0; Maxlength: 500 | SmartDeviceLink 2.0 |
| image | Image | Optional image struct for SoftButton (if defined as IMAGE or BOTH). | SmartDeviceLink 2.0 | ||
| isHighlighted | Boolean | True, if highlighted False, if not highlighted | N | SmartDeviceLink 2.0 | |
| softButtonID | Integer | Value which is returned via OnButtonPress / OnButtonEvent | Min: 0; Max: 65535 | SmartDeviceLink 2.0 | |
| systemAction | SystemAction | Parameter indicating whether selecting a SoftButton shall call a specific system action. This is intended to allow Notifications to bring the callee into full / focus; or in the case of persistent overlays, the overlay can persist when a SoftButton is pressed. | N | defvalue: DEFAULT_ACTION | SmartDeviceLink 2.0 |
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_IMAGE |
static String |
KEY_IS_HIGHLIGHTED |
static String |
KEY_SOFT_BUTTON_ID |
static String |
KEY_SYSTEM_ACTION |
static String |
KEY_TEXT |
static String |
KEY_TYPE |
KEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
SoftButton() |
SoftButton(Hashtable<String,Object> hash)
Constructs a new SoftButton object indicated by the Hashtable
parameter
|
SoftButton(SoftButtonType type,
Integer softButtonID)
Constructs a new SoftButton object
|
| Modifier and Type | Method and Description |
|---|---|
Image |
getImage() |
Boolean |
getIsHighlighted() |
Integer |
getSoftButtonID() |
SystemAction |
getSystemAction() |
String |
getText() |
SoftButtonType |
getType() |
SoftButton |
setImage(Image image) |
SoftButton |
setIsHighlighted(Boolean isHighlighted) |
SoftButton |
setSoftButtonID(Integer softButtonID) |
SoftButton |
setSystemAction(SystemAction systemAction) |
SoftButton |
setText(String text) |
SoftButton |
setType(SoftButtonType type) |
clone, deserializeJSON, equals, format, formatObject, getBoolean, getBulkData, getDouble, getFloat, getInteger, getLong, getMessageTypeName, getObject, getStore, getStoreValue, getString, getValue, getValueForString, hashCode, hasKey, isPayloadProtected, serializeJSON, serializeJSON, setBulkData, setPayloadProtected, setValuepublic static final String KEY_IS_HIGHLIGHTED
public static final String KEY_SOFT_BUTTON_ID
public static final String KEY_SYSTEM_ACTION
public static final String KEY_TEXT
public static final String KEY_TYPE
public static final String KEY_IMAGE
public SoftButton()
public SoftButton(Hashtable<String,Object> hash)
Constructs a new SoftButton object indicated by the Hashtable parameter
hash - The Hashtable to usepublic SoftButton(@NonNull
SoftButtonType type,
@NonNull
Integer softButtonID)
type - Describes, whether it is text, highlighted text, icon, or dynamic image.softButtonID - Value which is returned via OnButtonPress / OnButtonEventpublic SoftButton setType(@NonNull SoftButtonType type)
public SoftButtonType getType()
public SoftButton setText(String text)
public String getText()
public SoftButton setImage(Image image)
public Image getImage()
public SoftButton setIsHighlighted(Boolean isHighlighted)
public Boolean getIsHighlighted()
public SoftButton setSoftButtonID(@NonNull Integer softButtonID)
public Integer getSoftButtonID()
public SoftButton setSystemAction(SystemAction systemAction)
public SystemAction getSystemAction()