1 package com.smartdevicelink.proxy.rpc;
\r
3 import java.util.Hashtable;
\r
5 import com.smartdevicelink.proxy.RPCStruct;
\r
6 import com.smartdevicelink.proxy.constants.Names;
\r
9 * Contains information about a SoftButton's capabilities.
\r
10 * <p><b>Parameter List
\r
11 * <table border="1" rules="all">
\r
15 * <th>Description</th>
\r
16 * <th>SmartDeviceLink Ver. Available</th>
\r
19 * <td>shortPressAvailable</td>
\r
21 * <td>The button supports a short press.
\r
22 * Whenever the button is pressed short, onButtonPressed( SHORT) will be invoked.
\r
24 * <td>SmartDeviceLink 2.0</td>
\r
27 * <td>longPressAvailable</td>
\r
29 * <td>The button supports a LONG press.
\r
30 * Whenever the button is pressed long, onButtonPressed( LONG) will be invoked.
\r
32 * <td>SmartDeviceLink 2.0</td>
\r
35 * <td>upDownAvailable</td>
\r
37 * <td>The button supports "button down" and "button up". Whenever the button is pressed, onButtonEvent( DOWN) will be invoked.
\r
38 * Whenever the button is released, onButtonEvent( UP) will be invoked. *
\r
40 * <td>SmartDeviceLink 2.0</td>
\r
43 * <td>imageSupported</td>
\r
45 * <td>The button supports referencing a static or dynamic image.
\r
47 * <td>SmartDeviceLink 2.0</td>
\r
50 * @since SmartDeviceLink 2.0
\r
52 public class SoftButtonCapabilities extends RPCStruct {
\r
55 * Constructs a newly allocated SoftButtonCapabilities object
\r
57 public SoftButtonCapabilities() { }
\r
60 * Constructs a newly allocated SoftButtonCapabilities object indicated by the Hashtable parameter
\r
61 * @param hash The Hashtable to use
\r
63 public SoftButtonCapabilities(Hashtable hash) {
\r
68 * set the button supports a short press.
\r
69 * @param shortPressAvailable whether the button supports a short press.
\r
71 public void setShortPressAvailable(Boolean shortPressAvailable) {
\r
72 if (shortPressAvailable != null) {
\r
73 store.put(Names.shortPressAvailable, shortPressAvailable);
\r
75 store.remove(Names.shortPressAvailable);
\r
80 * get whether the button supports a short press.
\r
81 * @return whether the button supports a short press
\r
83 public Boolean getShortPressAvailable() {
\r
84 return (Boolean) store.get( Names.shortPressAvailable);
\r
88 * set the button supports a LONG press.
\r
89 * @param longPressAvailable whether the button supports a long press
\r
91 public void setLongPressAvailable(Boolean longPressAvailable) {
\r
92 if (longPressAvailable != null) {
\r
93 store.put(Names.longPressAvailable, longPressAvailable);
\r
95 store.remove(Names.longPressAvailable);
\r
100 * get whether the button supports a LONG press.
\r
101 * @return whether the button supports a LONG press
\r
103 public Boolean getLongPressAvailable() {
\r
104 return (Boolean) store.get( Names.longPressAvailable);
\r
108 * set the button supports "button down" and "button up".
\r
109 * @param upDownAvailable the button supports "button down" and "button up".
\r
111 public void setUpDownAvailable(Boolean upDownAvailable) {
\r
112 if (upDownAvailable != null) {
\r
113 store.put(Names.upDownAvailable, upDownAvailable);
\r
115 store.remove(Names.upDownAvailable);
\r
120 * get the button supports "button down" and "button up".
\r
121 * @return the button supports "button down" and "button up".
\r
123 public Boolean getUpDownAvailable() {
\r
124 return (Boolean) store.get( Names.upDownAvailable);
\r
128 * set the button supports referencing a static or dynamic image.
\r
129 * @param imageSupported whether the button supports referencing a static or dynamic image.
\r
131 public void setImageSupported(Boolean imageSupported) {
\r
132 if (imageSupported != null) {
\r
133 store.put(Names.imageSupported, imageSupported);
\r
135 store.remove(Names.imageSupported);
\r
140 * get the button supports referencing a static or dynamic image.
\r
141 * @return the button supports referencing a static or dynamic image.
\r
143 public Boolean getImageSupported() {
\r
144 return (Boolean) store.get( Names.imageSupported);
\r