public class SoftButtonCapabilities extends RPCStruct
Contains information about a SoftButton's capabilities.
Parameter List
| Name | Type | Description | SmartDeviceLink Ver. Available |
|---|---|---|---|
| shortPressAvailable | Boolean | The button supports a short press. Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked. | SmartDeviceLink 2.0 |
| longPressAvailable | Boolean | The button supports a LONG press. Whenever the button is pressed long, onButtonPressed( LONG) will be invoked. | SmartDeviceLink 2.0 |
| upDownAvailable | Boolean | The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent( DOWN) will be invoked. Whenever the button is released, onButtonEvent( UP) will be invoked. * | SmartDeviceLink 2.0 |
| imageSupported | Boolean | The button supports referencing a static or dynamic image. | SmartDeviceLink 2.0 |
| Modifier and Type | Field and Description |
|---|---|
static String |
KEY_IMAGE_SUPPORTED |
static String |
KEY_LONG_PRESS_AVAILABLE |
static String |
KEY_SHORT_PRESS_AVAILABLE |
static String |
KEY_TEXT_SUPPORTED |
static String |
KEY_UP_DOWN_AVAILABLE |
KEY_BULK_DATA, KEY_PROTECTED, store| Constructor and Description |
|---|
SoftButtonCapabilities()
Constructs a newly allocated SoftButtonCapabilities object
|
SoftButtonCapabilities(Boolean shortPressAvailable,
Boolean longPressAvailable,
Boolean upDownAvailable,
Boolean imageSupported)
Constructs a newly allocated SoftButtonCapabilities object
|
SoftButtonCapabilities(Hashtable<String,Object> hash)
Constructs a newly allocated SoftButtonCapabilities object indicated by the Hashtable parameter
|
| Modifier and Type | Method and Description |
|---|---|
void |
format(Version rpcVersion,
boolean formatParams)
This method should clean the the RPC to make sure it is compliant with the spec.
|
Boolean |
getImageSupported()
get the button supports referencing a static or dynamic image.
|
Boolean |
getLongPressAvailable()
get whether the button supports a LONG press.
|
Boolean |
getShortPressAvailable()
get whether the button supports a short press.
|
Boolean |
getTextSupported()
get the text support.
|
Boolean |
getUpDownAvailable()
get the button supports "button down" and "button up".
|
SoftButtonCapabilities |
setImageSupported(Boolean imageSupported)
set the button supports referencing a static or dynamic image.
|
SoftButtonCapabilities |
setLongPressAvailable(Boolean longPressAvailable)
set the button supports a LONG press.
|
SoftButtonCapabilities |
setShortPressAvailable(Boolean shortPressAvailable)
set the button supports a short press.
|
SoftButtonCapabilities |
setTextSupported(Boolean textSupported)
set the text support.
|
SoftButtonCapabilities |
setUpDownAvailable(Boolean upDownAvailable)
set the button supports "button down" and "button up".
|
clone, deserializeJSON, equals, 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_IMAGE_SUPPORTED
public static final String KEY_SHORT_PRESS_AVAILABLE
public static final String KEY_LONG_PRESS_AVAILABLE
public static final String KEY_UP_DOWN_AVAILABLE
public static final String KEY_TEXT_SUPPORTED
public SoftButtonCapabilities()
public SoftButtonCapabilities(Hashtable<String,Object> hash)
hash - The Hashtable to usepublic SoftButtonCapabilities(@NonNull
Boolean shortPressAvailable,
@NonNull
Boolean longPressAvailable,
@NonNull
Boolean upDownAvailable,
@NonNull
Boolean imageSupported)
shortPressAvailable - The button supports a short press.longPressAvailable - The button supports a LONG pressupDownAvailable - The button supports "button down" and "button up".imageSupported - The button supports referencing a static or dynamic image.public void format(Version rpcVersion, boolean formatParams)
RPCStructpublic SoftButtonCapabilities setShortPressAvailable(@NonNull Boolean shortPressAvailable)
shortPressAvailable - whether the button supports a short press.public Boolean getShortPressAvailable()
public SoftButtonCapabilities setLongPressAvailable(@NonNull Boolean longPressAvailable)
longPressAvailable - whether the button supports a long presspublic Boolean getLongPressAvailable()
public SoftButtonCapabilities setUpDownAvailable(@NonNull Boolean upDownAvailable)
upDownAvailable - the button supports "button down" and "button up".public Boolean getUpDownAvailable()
public SoftButtonCapabilities setImageSupported(@NonNull Boolean imageSupported)
imageSupported - whether the button supports referencing a static or dynamic image.public Boolean getImageSupported()
public SoftButtonCapabilities setTextSupported(Boolean textSupported)
textSupported - whether the button supports the use of text or not.public Boolean getTextSupported()